Moodle Turnitin:添加插入额外文本的功能 [英] Moodle Turnitin: add functionality to insert extra text in assignments

查看:226
本文介绍了Moodle Turnitin:添加插入额外文本的功能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

一些大学有一个蓝卡计划,使具有特殊学习困难的学生(SpLDs)可以用蓝卡来标记他们的工作,所以导师会以适当的考虑标记它。

我们需要一种让学生更容易用蓝卡来标记他们的工作的方法,并且我已经提出了以下脚本,它将进入Moodle站点管理中的其他HTML部分,并且与Turnitin插入。 (请参阅我的其他帖子,了解适用于Moodle的脚本)



首先,学生点击按钮添加蓝卡,在作业开始时插入文本Blue Card:标题。提交表单时,JavaScript会在下一页中查找文本Blue Card,将表格单元格变为蓝色,并附加链接至阅读障碍标记准则。

解决方案

 < script type =text / javascript> 
var TurnitinBlueCardButton ='< input type =buttonid =tiib​​luecardvalue =标记蓝卡/> < a href =http://www.brookes.ac.uk/students/wellbeing/dyslexia-spld/blue-marking-cards/class =infotarget =_ blanktitle =什么是蓝色卡方案?>这是什么?< / a>< br />'

/ * TURNITIN BLUE CARD * /
if(!document.getElementById ('fitem_id_submissiontype')){
/ *什么都不做* /
} else {
document.getElementById('fitem_id_submissiontype')。insertAdjacentHTML('beforebegin',TurnitinBlueCardButton);

$ b $ * TURNITIN BLUE CARD BUTTON的事件监听器* /
if(!document.getElementById('tiibluecard')){
/ *什么都不做* /
} else {
document.getElementById(tiib​​luecard)。addEventListener('click',function(){
var title = document.getElementById('id_submissiontitle');
/ *关闭标题字段验证,因为它现在有一个值* /
title.removeAttribute('onchange');
if(!title.value){
title。 value =('Blue Card:');
} else {
title.value =('Blue Card:'+ title.value);
}
});
$ *
$ b / *在TURNITIN提交收件箱表中高亮显示蓝卡* /
if(!document.getElementById('inboxTable')){
/ *什么也不做* /
} else {
var table = document.getElementById('inboxTable');
var tbody = table.getElementsByTagName('tbody')[0];
var cells = tbody.getElementsByTagName('td'); (单元格[i] .innerHTML.includes('Blue Card')){

for(var i = 0,len = cells.length; i< len; i ++)
cells [i] .style.backgroundColor ='#99ccff';
cells [i] .innerHTML + ='[
}
}
}
< / script>

注意:代码是原样提供的,没有任何承诺适合目的也不提供任何维护或支持的承诺。



也发布在我们的团队博客上

更新:为了在Internet Explorer 11中实现这个功能,我必须更改几件事:

  / *突出显示蓝卡在TURNITIN提交收件箱表* / 
if(!document.getElementById('inboxTable')){
/ *什么都不做* /
} else {
var table = document。的getElementById( 'inboxTable');
var tbody = table.getElementsByTagName('tbody')[0];
var cells = tbody.getElementsByTagName('td'); $(b
$ b for(var i = 0,len = cells.length; i< len; i ++){
if(cells [i] .innerText.search('Blue Card')> -1){
cells [i] .style.backgroundColor ='#99ccff';
cells [i] .getElementsByTagName('a')[0] .insertAdjacentHTML('afterend','[< a href =http://www.brookes.ac.uk/staff/academic/dyslexia -spld-service / marking-work /class =infotarget =_ blanktitle =什么是蓝卡计划?>这是什么?< / a>]');
}
}
}


Some universities have a Blue Card scheme enabling students with specific learning difficulties (SpLDs) to flag their work with a blue card, so the tutor will mark it with due consideration.

We needed a way of making it easier for students to flag their work with a blue card, and I have come up with the following script, which goes into the Additional HTML section in Site Administration in Moodle, and works with the Turnitin plugin. (See my other post for a script that works with the Moodle Assignment functionality.)

First the student clicks the button to add the blue card, which inserts the text "Blue Card: " at the start of the assignment title. When the form is submitted, the JavaScript looks for the text "Blue Card" on the next page, colours the table cell blue and appends a link to the dyslexia marking guidelines.

解决方案

<script type="text/javascript">
var TurnitinBlueCardButton =  '<input type="button" id="tiibluecard" value="Flag with Blue Card"/> <a href="http://www.brookes.ac.uk/students/wellbeing/dyslexia-spld/blue-marking-cards/" class="info" target="_blank" title="What is the Blue Card scheme?">What\'s this?</a><br/>'

/* TURNITIN BLUE CARD */
if (!document.getElementById('fitem_id_submissiontype')) {
   /* do nothing */
} else {
    document.getElementById('fitem_id_submissiontype').insertAdjacentHTML('beforebegin', TurnitinBlueCardButton);
}

/* EVENT LISTENER FOR TURNITIN BLUE CARD BUTTON */
if (!document.getElementById('tiibluecard')) {
   /* do nothing */
} else {
    document.getElementById("tiibluecard").addEventListener('click', function () {  
        var title = document.getElementById('id_submissiontitle');
        /* turn off validation of title field, as it will now have a value */
        title.removeAttribute('onchange');
        if (!title.value) {
            title.value = ('Blue Card: '); 
         } else {
            title.value = ('Blue Card: ' + title.value);
         }
    });
}

/* highlight blue card in TURNITIN submission inbox table */
if (!document.getElementById('inboxTable')) {
   /* do nothing */
} else {
     var table = document.getElementById('inboxTable');
     var tbody = table.getElementsByTagName('tbody')[0];
     var cells = tbody.getElementsByTagName('td');

     for (var i=0, len=cells.length; i<len; i++){
         if (cells[i].innerHTML.includes('Blue Card')){
             cells[i].style.backgroundColor = '#99ccff';
             cells[i].innerHTML += ' [<a href="http://www.brookes.ac.uk/students/wellbeing/dyslexia-spld/blue-marking-cards/" class="info" target="_blank" title="What is the Blue Card scheme?">What\'s this?</a>]';
        }
   }
}
</script>

NB: code is supplied 'as is' without any commitment to it being fit for purpose and is also supplied without any commitment to maintenance or support.

(also posted on our team blog)

UPDATE: in order to get this to work in Internet Explorer 11, I had to change a couple of things:

/* highlight blue card in TURNITIN submission inbox table */
if (!document.getElementById('inboxTable')) {
   /* do nothing */
} else {
     var table = document.getElementById('inboxTable');
     var tbody = table.getElementsByTagName('tbody')[0];
     var cells = tbody.getElementsByTagName('td');

     for (var i=0, len=cells.length; i<len; i++){
         if (cells[i].innerText.search('Blue Card') > -1){
             cells[i].style.backgroundColor = '#99ccff';
             cells[i].getElementsByTagName('a')[0].insertAdjacentHTML('afterend', ' [<a href="http://www.brookes.ac.uk/staff/academic/dyslexia-spld-service/marking-work/" class="info" target="_blank" title="What is the Blue Card scheme?">What\'s this?</a>]');
        }
   }
}

这篇关于Moodle Turnitin:添加插入额外文本的功能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆