Skip to content

Commit a0a8bd1

Browse files
Merge pull request #525 from turnitin/develop
Develop to master for release 2020070801
2 parents 74f979a + 78d3fbf commit a0a8bd1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+1007
-1723
lines changed

CHANGELOG.md

+38
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,41 @@
1+
### Date: 2020-July-07
2+
### Release: 2020070801
3+
4+
#### :zap: What's new
5+
6+
---
7+
#### We now support Moodle 3.9
8+
9+
You can find out more about Moodle 3.9 via Moodle's [release notes](https://docs.moodle.org/dev/Moodle_3.9_release_notes).
10+
11+
12+
#### Use Turnitin in a Moodle Quiz
13+
14+
Turnitin will be usable as a part of a Moodle quiz when Moodle releases the feature. When enabled for your account, simply add an essay question as one of the quiz questions. A similarity report will be generated when the student submits the quiz. Track this release on the Moodle Tracker https://tracker.moodle.org/browse/MDL-32226).
15+
16+
---
17+
18+
#### :wrench: Fixes and enhancements
19+
20+
#### Improved support for large class sizes
21+
22+
When closing the Turnitin viewer, we’d refresh the page so any updates you applied to the assignment would be reflected in Moodle. However, this refresh caused unnecessary load when a class was particularly large. When we identify increased latency like this, we’ll deactivate automatic refreshes of the inbox and prompt you to refresh the inbox manually after grading.
23+
24+
#### View shared rubrics when creating a Moodle assignment
25+
26+
When creating a Moodle assignment it is possible to view all of your Turnitin Rubrics and attach one to a class from its creation. However, a bug had prevented any rubrics that had been shared with you from appearing in this list. You’ll now find them there and ready to be added to any future assignments you create. This fixes a known issue.
27+
28+
#### General accessibility improvements
29+
30+
We’ve made a few accessibility improvements to help ensure that all Turnitin users can use the plugin with the same high-quality experience. These include:
31+
32+
- Made more elements accessible via tab navigation
33+
- You can launch the Turnitin viewer now by using the enter key on the appropriate element.
34+
- Tools tips are available for various settings and readable by a screen reader or via keyboard navigation.
35+
- General improvements to the plugin configuration screen ensuring unique ARIA labels and logical tab order.
36+
37+
---
38+
139
### Date: 2019-December-17
240
### Release: v2019121701
341

README.md

+6-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ Turnitin Plagiarism plugin for Moodle
33

44
Please be aware that the **Develop** branch should not be considered production ready, although it contains the latest fixes and features it may contain bugs. It should be avoided in favour of the **Master** branch which is the latest available branch that has been through the QA process. Please make any pull requests you would like to make to the develop branch.
55

6+
For running behat tests in Moodle 3.9 and above, please use the behat_39+ branch. There are some deprecated form settings methods in Moodle that throw warnings during behat test runs causing failures, unfortunately this is the only way around this issue as we don't want have different plugin branches per Moodle version.
7+
68
To see what has changed in recent versions of the plagiarism plugin, see the [CHANGELOG](https://github.com/turnitin/moodle-plagiarism_turnitin/blob/master/CHANGELOG.md).
79

810
If you would like to contribute to the plugin please see our [CONTRIBUTIONS](https://github.com/turnitin/moodle-plagiarism_turnitin/blob/master/CONTRIBUTIONS.md) page.
@@ -12,14 +14,17 @@ If you are having issues, please consult our [TROUBLE SHOOTING](https://github.c
1214
Installation
1315
------------
1416

15-
Before installing this plugin firstly make sure you are logged in as an Administrator and that you are using Moodle 3.1 or higher.
17+
Before installing this plugin firstly make sure you are logged in as an Administrator and that you are using Moodle 3.5 or higher.
1618

1719
The Plagiarism Plugin can be used within the following Moodle modules:
1820

1921
- Assignments
2022
- Forums
23+
- Quiz *
2124
- Workshops
2225

26+
\* This is currently only essay type answers and is also reliant on Moodle merging [this code patch](https://github.com/moodle/moodle/commit/7a8e3ec4b13408d18734ab46bdb03b2da55f317d) into their core offering. For more information see: [MDL-32226](https://tracker.moodle.org/browse/MDL-32226).
27+
2328
To install, you need to copy all the files into the plagiarism/turnitin directory in your Moodle installation. You should then go to `"Site Administration" > "Notifications"` where you should follow the on screen instructions.
2429

2530
Plagiarism plugins also need to be enabled before this plugin can be used. You can do this by going to `"Site Administration" > "Advanced Features"` and ticking the "Enable plagiarism plugins" box before saving.

ajax.php

-1
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,6 @@
372372

373373
echo json_encode($options);
374374
break;
375-
376375
}
377376

378377
if (!empty($return)) {

amd/build/open_viewer.min.js

+2-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

amd/build/peermark.min.js

+2-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

amd/build/quickmark.min.js

+2-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

amd/build/rubric.min.js

+2-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

amd/src/open_viewer.js

+24-25
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,7 @@ define(['jquery'], function($) {
3131
for (var i = 0; i < classList.length; i++) {
3232
if (classList[i].indexOf('grademark_') !== -1 && classList[i] != 'pp_grademark_open') {
3333
var classStr = classList[i].split("_");
34-
var url = "";
35-
// URL must be stored in separate div on forums.
36-
if ($('.grademark_forum_launch_' + classStr[1]).length > 0) {
37-
url = $('.grademark_forum_launch_' + classStr[1]).html();
38-
} else {
39-
url = $(this).attr("id");
40-
}
41-
that.openDV("grademark", classStr[1], classStr[2], url);
34+
that.openDV("grademark", classStr[1], classStr[2]);
4235
}
4336
}
4437
});
@@ -87,23 +80,29 @@ define(['jquery'], function($) {
8780
that.checkDVClosed(submissionid, coursemoduleid, dvWindow);
8881
}, 500);
8982
}
90-
},
83+
},
9184

92-
refreshScores: function(submission_id, coursemoduleid) {
93-
$.ajax({
94-
type: "POST",
95-
url: M.cfg.wwwroot + "/plagiarism/turnitin/ajax.php",
96-
dataType: "json",
97-
data: {
98-
action: "update_grade",
99-
submission: submission_id,
100-
cmid: coursemoduleid,
101-
sesskey: M.cfg.sesskey
102-
},
103-
success: function() {
104-
window.location = window.location;
105-
}
106-
});
107-
}
85+
refreshScores: function(submission_id, coursemoduleid) {
86+
var refreshStartTime = new Date().getTime();
87+
$.ajax({
88+
type: "POST",
89+
url: M.cfg.wwwroot + "/plagiarism/turnitin/ajax.php",
90+
dataType: "json",
91+
data: {
92+
action: "update_grade",
93+
submission: submission_id,
94+
cmid: coursemoduleid,
95+
sesskey: M.cfg.sesskey
96+
},
97+
success: function() {
98+
var requestDuration = new Date().getTime() - refreshStartTime;
99+
if (requestDuration < 3000) {
100+
window.location = window.location;
101+
} else {
102+
$('.turnitin_score_refresh_alert').show();
103+
}
104+
}
105+
});
106+
}
108107
};
109108
});

amd/src/peermark.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ define(['jquery',
1818
return {
1919
peermarkLaunch: function() {
2020
var that = this;
21-
$('.peermark_manager_launch').on('click', function() {
21+
$('.peermark_manager_launch').on('click', function(event) {
22+
event.preventDefault();
2223
that.peermarkCreateModal(ModalPeermarkManagerLaunch.TYPE);
2324
});
2425

amd/src/quickmark.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ define(['jquery',
1616
function($, Templates, ModalFactory, ModalEvents, ModalQuickmarkLaunch) {
1717
return {
1818
quickmarkLaunch: function() {
19-
$('.plagiarism_turnitin_quickmark_manager_launch').on('click', function () {
19+
$('.plagiarism_turnitin_quickmark_manager_launch').on('click', function (event) {
20+
event.preventDefault();
2021
ModalFactory.create({
2122
type: ModalQuickmarkLaunch.TYPE,
2223
templateContext: {

amd/src/rubric.js

+2-7
Original file line numberDiff line numberDiff line change
@@ -36,17 +36,12 @@ define(['jquery',
3636
});
3737
},
3838
rubricCreateModal: function(modalType) {
39-
if ($('input[name="coursemodule"]').val()) {
40-
var cmid = $('input[name="coursemodule"]').val();
41-
} else {
42-
var urlParams = new URLSearchParams(window.location.search);
43-
var cmid = urlParams.get('id');
44-
}
39+
var courseid = ($('input[name="course"]')) ? $('input[name="course"]').val() : 0;
4540

4641
ModalFactory.create({
4742
type: modalType,
4843
templateContext: {
49-
cmid: cmid,
44+
courseid: courseid,
5045
wwwroot: M.cfg.wwwroot
5146
},
5247
large: true

classes/digitalreceipt/pp_receipt_message.php

+1-4
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,7 @@ public function send_message($userid, $message, $courseid) {
4747
$eventdata->fullmessagehtml = $message;
4848
$eventdata->smallmessage = '';
4949
$eventdata->notification = 1; // This is only set to 0 for personal messages between users.
50-
51-
if ($CFG->branch >= 32) {
52-
$eventdata->courseid = $courseid;
53-
}
50+
$eventdata->courseid = $courseid;
5451

5552
message_send($eventdata);
5653
}

0 commit comments

Comments
 (0)