mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 08:56:36 +02:00
Merge branch 'MDL-71400-311' of git://github.com/mihailges/moodle into MOODLE_311_STABLE
This commit is contained in:
commit
6abbca9754
2 changed files with 10 additions and 5 deletions
|
@ -46,4 +46,4 @@ $string['processgrades'] = 'Import grades';
|
||||||
$string['skiprecord'] = 'Skip record';
|
$string['skiprecord'] = 'Skip record';
|
||||||
$string['updaterecord'] = 'Update record';
|
$string['updaterecord'] = 'Update record';
|
||||||
$string['uploadgrades'] = 'Upload grading worksheet';
|
$string['uploadgrades'] = 'Upload grading worksheet';
|
||||||
$string['updatedgrades'] = 'Updated {$a} grades and feedback';
|
$string['updatedgrades'] = 'Updated <strong>{$a->gradeupdatescount}</strong> grades and <strong>{$a->feedbackupdatescount}</strong> feedback instances.';
|
||||||
|
|
|
@ -131,7 +131,8 @@ class assign_feedback_offline extends assign_feedback_plugin {
|
||||||
$adminconfig = $this->assignment->get_admin_config();
|
$adminconfig = $this->assignment->get_admin_config();
|
||||||
$gradebookplugin = $adminconfig->feedback_plugin_for_gradebook;
|
$gradebookplugin = $adminconfig->feedback_plugin_for_gradebook;
|
||||||
|
|
||||||
$updatecount = 0;
|
$updategradecount = 0;
|
||||||
|
$updatefeedbackcount = 0;
|
||||||
while ($record = $gradeimporter->next()) {
|
while ($record = $gradeimporter->next()) {
|
||||||
$user = $record->user;
|
$user = $record->user;
|
||||||
$modified = $record->modified;
|
$modified = $record->modified;
|
||||||
|
@ -179,7 +180,7 @@ class assign_feedback_offline extends assign_feedback_plugin {
|
||||||
$grade->grader = $USER->id;
|
$grade->grader = $USER->id;
|
||||||
if ($this->assignment->update_grade($grade)) {
|
if ($this->assignment->update_grade($grade)) {
|
||||||
$this->assignment->notify_grade_modified($grade);
|
$this->assignment->notify_grade_modified($grade);
|
||||||
$updatecount += 1;
|
$updategradecount += 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -197,7 +198,7 @@ class assign_feedback_offline extends assign_feedback_plugin {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($newvalue != $oldvalue) {
|
if ($newvalue != $oldvalue) {
|
||||||
$updatecount += 1;
|
$updatefeedbackcount += 1;
|
||||||
$grade = $this->assignment->get_user_grade($record->user->id, true);
|
$grade = $this->assignment->get_user_grade($record->user->id, true);
|
||||||
$this->assignment->notify_grade_modified($grade);
|
$this->assignment->notify_grade_modified($grade);
|
||||||
$plugin->set_editor_text($field, $newvalue, $grade->id);
|
$plugin->set_editor_text($field, $newvalue, $grade->id);
|
||||||
|
@ -222,7 +223,11 @@ class assign_feedback_offline extends assign_feedback_plugin {
|
||||||
false,
|
false,
|
||||||
$this->assignment->get_course_module()->id,
|
$this->assignment->get_course_module()->id,
|
||||||
get_string('importgrades', 'assignfeedback_offline')));
|
get_string('importgrades', 'assignfeedback_offline')));
|
||||||
$o .= $renderer->box(get_string('updatedgrades', 'assignfeedback_offline', $updatecount));
|
$strparams = [
|
||||||
|
'gradeupdatescount' => $updategradecount,
|
||||||
|
'feedbackupdatescount' => $updatefeedbackcount,
|
||||||
|
];
|
||||||
|
$o .= $renderer->box(get_string('updatedgrades', 'assignfeedback_offline', $strparams));
|
||||||
$url = new moodle_url('view.php',
|
$url = new moodle_url('view.php',
|
||||||
array('id'=>$this->assignment->get_course_module()->id,
|
array('id'=>$this->assignment->get_course_module()->id,
|
||||||
'action'=>'grading'));
|
'action'=>'grading'));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue