MDL-57610 assignfeedback_editpdf: integration cleanup

* Add a note to upgrade.php to notify devs/admins of the new setting.
* Replace update_record with set_field.
* Add missing phpdoc.
This commit is contained in:
Adam Olley
2018-09-25 09:54:39 +09:30
parent bc32547da9
commit 1afbb97b6b
3 changed files with 5 additions and 3 deletions
+2
View File
@@ -119,6 +119,8 @@ information provided here is intended especially for developers.
- phone1
- phone2
- address
* Added $CFG->conversionattemptlimit setting to config.php allowing a maximum number of retries before giving up conversion
of a given document by the assignfeedback_editpdf\task\convert_submissions task. Default value: 3.
=== 3.5 ===
@@ -48,7 +48,7 @@ class observer {
/**
* Queue the submission for processing.
* @param $event The submission created/updated event.
* @param \mod_assign\event\base $event The submission created/updated event.
*/
protected static function queue_conversion($event) {
global $DB;
@@ -70,8 +70,8 @@ class convert_submissions extends scheduled_task {
// Record that we're attempting the conversion ahead of time.
// We can't do this afterwards as its possible for the conversion process to crash the script entirely.
$record->attemptedconversions++;
$DB->update_record('assignfeedback_editpdf_queue', $record);
$DB->set_field('assignfeedback_editpdf_queue', 'attemptedconversions',
$record->attemptedconversions + 1, ['id' => $record->id]);
$assignmentid = $submission->assignment;
$attemptnumber = $record->submissionattempt;