Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

MDL-34793 mod_assign Fix rendering error that causes student view to …

…break in some cases.

When feedback is switched on for a assignment, and the teacher enters a grade through the gradebook, the student
view would become broken, throwing a coding error. Added check that $status->grade is not empty before passing
to assign_feedback_XXX::is_empty(), as that function expects an object.
  • Loading branch information...
commit 8c0cf5be669400c090853fb9984c6f65d8206ffb 1 parent 470d47f
@merrill-oakland merrill-oakland authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  mod/assign/renderer.php
View
2  mod/assign/renderer.php
@@ -321,7 +321,7 @@ public function render_assign_feedback_status(assign_feedback_status $status) {
}
foreach ($status->feedbackplugins as $plugin) {
- if ($plugin->is_enabled() && $plugin->is_visible() && !$plugin->is_empty($status->grade)) {
+ if ($plugin->is_enabled() && $plugin->is_visible() && !empty($status->grade) && !$plugin->is_empty($status->grade)) {
$row = new html_table_row();
$cell1 = new html_table_cell($plugin->get_name());
$pluginfeedback = new assign_feedback_plugin_feedback($plugin, $status->grade, assign_feedback_plugin_feedback::SUMMARY, $status->coursemoduleid, $status->returnaction, $status->returnparams);
Please sign in to comment.
Something went wrong with that request. Please try again.