Skip to content

Commit

Permalink
Merge branch 'MDL-31702' of git://github.com/timhunt/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
Sam Hemelryk committed Mar 12, 2012
2 parents 3108b64 + ba3fedf commit 80fa598
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion mod/quiz/lang/en/quiz.php
Expand Up @@ -127,7 +127,7 @@
$string['cannotsavequestion'] = 'Cannot save question list';
$string['cannotsetgrade'] = 'Could not set a new maximum grade for the quiz';
$string['cannotsetsumgrades'] = 'Failed to set sumgrades';
$string['cannotstartgradesmismatch'] = 'Cannot start an attempt at this quiz. The quiz is supposed to be graded, but there are no questions in the quiz that are worth any marks.';
$string['cannotstartgradesmismatch'] = 'Cannot start an attempt at this quiz. The quiz is set to be graded out of {$a->grade}, but none of the questions in the quiz have a grade. This can be fixed on the \'Edit quiz\' page.';
$string['cannotstartmissingquestion'] = 'Cannot start an attempt at this quiz. The quiz definition includes a question that does not exist.';
$string['cannotstartnoquestions'] = 'Cannot start an attempt at this quiz. The quiz has not been set up yet. No questions have been added.';
$string['cannotwrite'] = 'Cannot write to export file ({$a})';
Expand Down
3 changes: 2 additions & 1 deletion mod/quiz/locallib.php
Expand Up @@ -71,7 +71,8 @@ function quiz_create_attempt($quiz, $attemptnumber, $lastattempt, $timenow, $isp

if ($quiz->sumgrades < 0.000005 && $quiz->grade > 0.000005) {
throw new moodle_exception('cannotstartgradesmismatch', 'quiz',
new moodle_url('/mod/quiz/view.php', array('q' => $quiz->id)));
new moodle_url('/mod/quiz/view.php', array('q' => $quiz->id)),
array('grade' => quiz_format_grade($quiz, $quiz->grade)));
}

if ($attemptnumber == 1 || !$quiz->attemptonlast) {
Expand Down

0 comments on commit 80fa598

Please sign in to comment.