Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Merge branch 'MDL-26324_19' of git://github.com/timhunt/moodle into M…

…OODLE_19_STABLE
  • Loading branch information...
commit cddf3e16790cf3ca690f154f0319c125cdfdb2bf 2 parents f483e32 + 83f22aa
Eloy Lafuente (stronk7) authored March 07, 2011

Showing 1 changed file with 8 additions and 0 deletions. Show diff stats Hide diff stats

  1. 8  mod/quiz/mod_form.php
8  mod/quiz/mod_form.php
@@ -282,6 +282,14 @@ function data_preprocessing(&$default_values){
282 282
             $key = 0;
283 283
             foreach ($this->_feedbacks as $feedback){
284 284
                 $default_values['feedbacktext['.$key.']'] = $feedback->feedbacktext;
  285
+                if ($default_values['grade'] == 0) {
  286
+                    // When a quiz is un-graded, there can only be one lot of
  287
+                    // feedback. If the quiz previously had a maximum grade and
  288
+                    // several lots of feedback, we must now avoid putting text
  289
+                    // into input boxes that are disabled, but which the
  290
+                    // validation will insist are blank.
  291
+                    break;
  292
+                }
285 293
                 if ($feedback->mingrade > 0) {
286 294
                     $default_values['feedbackboundaries['.$key.']'] = (100.0 * $feedback->mingrade / $default_values['grade']) . '%';
287 295
                 }

0 notes on commit cddf3e1

Please sign in to comment.
Something went wrong with that request. Please try again.