Skip to content

Commit

Permalink
Merge branch 'MDL-37114_23' of git://github.com/timhunt/moodle into M…
Browse files Browse the repository at this point in the history
…OODLE_23_STABLE
  • Loading branch information
danpoltawski committed Dec 17, 2012
2 parents 139d78a + d057719 commit 4dd8079
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions mod/quiz/mod_form.php
Expand Up @@ -515,11 +515,16 @@ public function validation($data, $files) {
$i = 0;
while (!empty($data['feedbackboundaries'][$i] )) {
$boundary = trim($data['feedbackboundaries'][$i]);
if (strlen($boundary) > 0 && $boundary[strlen($boundary) - 1] == '%') {
$boundary = trim(substr($boundary, 0, -1));
if (is_numeric($boundary)) {
$boundary = $boundary * $data['grade'] / 100.0;
} else {
if (strlen($boundary) > 0) {
if ($boundary[strlen($boundary) - 1] == '%') {
$boundary = trim(substr($boundary, 0, -1));
if (is_numeric($boundary)) {
$boundary = $boundary * $data['grade'] / 100.0;
} else {
$errors["feedbackboundaries[$i]"] =
get_string('feedbackerrorboundaryformat', 'quiz', $i + 1);
}
} else if (!is_numeric($boundary)) {
$errors["feedbackboundaries[$i]"] =
get_string('feedbackerrorboundaryformat', 'quiz', $i + 1);
}
Expand Down

0 comments on commit 4dd8079

Please sign in to comment.