Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

MDL-35398: Quick grading feedback is now pushed to the gradebook

  • Loading branch information...
commit 97b53d6c05baf92874e63dc75c15f65beec2187e 1 parent 05165a7
Damyon Wiese authored
Showing with 10 additions and 2 deletions.
  1. +10 −2 mod/assign/locallib.php
View
12 mod/assign/locallib.php
@@ -2623,21 +2623,29 @@ private function process_save_quick_grades() {
}
$currentgrades->close();
+ $adminconfig = $this->get_admin_config();
+ $gradebookplugin = $adminconfig->feedback_plugin_for_gradebook;
+
// ok - ready to process the updates
foreach ($modifiedusers as $userid => $modified) {
$grade = $this->get_user_grade($userid, true);
$grade->grade= grade_floatval(unformat_float($modified->grade));
$grade->grader= $USER->id;
- $this->update_grade($grade);
-
// save plugins data
foreach ($this->feedbackplugins as $plugin) {
if ($plugin->is_visible() && $plugin->is_enabled() && $plugin->supports_quickgrading()) {
$plugin->save_quickgrading_changes($userid, $grade);
+ if (('assignfeedback_' . $plugin->get_type()) == $gradebookplugin) {
+ // This is the feedback plugin chose to push comments to the gradebook.
+ $grade->feedbacktext = $plugin->text_for_gradebook($grade);
+ $grade->feedbackformat = $plugin->format_for_gradebook($grade);
+ }
}
}
+ $this->update_grade($grade);
+
// save outcomes
if ($CFG->enableoutcomes) {
$data = array();
Please sign in to comment.
Something went wrong with that request. Please try again.