]> git.mjollnir.org Git - moodle.git/commitdiff
Make General feedback more tolerant of whitespace. Merged from MOODLE_17_STABLE.
authortjhunt <tjhunt>
Mon, 30 Oct 2006 16:35:53 +0000 (16:35 +0000)
committertjhunt <tjhunt>
Mon, 30 Oct 2006 16:35:53 +0000 (16:35 +0000)
mod/quiz/lib.php

index dbf04a2fbdf26cef517659467f2191aed13909a4..9a4366288bfdd224dbadb9a18a3be00453f7ef9e 100644 (file)
@@ -518,7 +518,7 @@ function quiz_process_options(&$quiz) {
         $boundary = trim($quiz->feedbackboundaries[$i]);
         if (!is_numeric($boundary)) {
             if (strlen($boundary) > 0 && $boundary[strlen($boundary) - 1] == '%') {
-                $boundary = substr($boundary, 0, -1);
+                $boundary = trim(substr($boundary, 0, -1));
                 if (is_numeric($boundary)) {
                     $boundary = $boundary * $quiz->grade / 100.0;
                 } else {