Skip to content

Commit

Permalink
Merge pull request #502 from turnitin/develop
Browse files Browse the repository at this point in the history
Release v2018122101
  • Loading branch information
dwinn authored Dec 21, 2018
2 parents 5ec2cd6 + b97b882 commit 47ce502
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 5 deletions.
17 changes: 13 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
### Date: 2018-December-21
### Release: v2018122101

#### :wrench: Fixes and enhancements

---

#### Grade categories are now migrated between V1 and V2

When you migrate from Moodle Direct V1 to Moodle Direct V2, we’ll now keep the grading category associated with the V1 assignment when we perform the transition.

---

### Date: 2018-December-18
### Release: v2018121801

Expand All @@ -21,10 +34,6 @@ Are you a fan of ETS e-rater? Us too! To help you take advantage of it, you can

A new warning message when you try to change the Marks Available column - We’ve added this notification just to make sure that editing this field is what you want to do. Editing this field after you’ve finished grading, can change entries in the Moodle gradebook. Don’t worry, you can still edit this field should you need to!

#### Grade categories are now migrated

When migrating Moodle Direct V1 assignments to V2 the assignment will now keep the grading category associated with the V1 assignment.

#### A couple of backend security fixes.

---
Expand Down
6 changes: 6 additions & 0 deletions classes/v1migration/v1migration.php
Original file line number Diff line number Diff line change
Expand Up @@ -494,6 +494,12 @@ public function post_migration($v2assignmentid) {
$params['itemname'] = $this->v1assignment->name;
grade_update('mod/turnitintooltwo', $this->courseid, 'mod', 'turnitintooltwo', $v2assignmentid, 0, NULL, $params);

// Update the grade category.
$gradeitemv1 = grade_item::fetch(array('itemmodule' => 'turnitintool', 'iteminstance' => $this->v1assignment->id, 'courseid' => $this->courseid));
$gradeitemv2 = grade_item::fetch(array('itemmodule' => 'turnitintooltwo', 'iteminstance' => $v2assignmentid, 'courseid' => $this->courseid));
grade_item::set_properties($gradeitemv2, array('categoryid' => $gradeitemv1->categoryid));
$gradeitemv2->update();

// Perform a grade check to double check the grades are in the gradebook.
$v1_grades = $this->get_grades_array("turnitintool", $this->v1assignment->id, $this->courseid);
$v2_grades = $this->get_grades_array("turnitintooltwo", $v2assignmentid, $this->courseid);
Expand Down
2 changes: 1 addition & 1 deletion version.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
$plugin = new StdClass();
}

$plugin->version = 2018121801;
$plugin->version = 2018122101;
$plugin->release = "2.7+";
$plugin->requires = 2014051200;
$plugin->component = 'mod_turnitintooltwo';
Expand Down

0 comments on commit 47ce502

Please sign in to comment.