Permalink
Browse files

Fixed timesincestart stuff, I think. bug 2466

  • Loading branch information...
1 parent 0bb3ec6 commit 5cae3a321c0d2b2ebcbe23a6232a1f873b2164ac moodler committed Mar 3, 2005
Showing with 9 additions and 13 deletions.
  1. +4 −6 mod/quiz/attempt.php
  2. +5 −7 mod/quiz/imsattempt.php
View
@@ -174,12 +174,6 @@
}
}
- if($timelimit > 0) {
- if(($timelimit + 60) <= $timesincestart) {
- $quiz->timesincestart = $timesincestart;
- }
- }
-
/// Retrieve ->maxgrade for all questions
If (!($grades = quiz_get_question_grades($quiz->id, $quiz->questions))) {
$grades = array();
@@ -188,6 +182,10 @@
$questions[$qid]->maxgrade = $grade->grade;
}
+ if (isset($timesincestart)) {
+ $quiz->timesincestart = $timesincestart; // To pass it on to quiz_grade_responses
+ }
+
if (!$result = quiz_grade_responses($quiz, $questions, $unattempt->id)) {
error("Could not grade your quiz attempt!");
}
View
@@ -142,12 +142,6 @@
frageplayer_error($error);
}
- if($timelimit > 0) {
- if(($timelimit + 60) <= $timesincestart) {
- $quiz->timesincestart = $timesincestart;
- }
- }
-
/// Retrieve ->maxgrade for all questions
If (!($grades = quiz_get_question_grades($quiz->id, $quiz->questions))) {
$grades = array();
@@ -156,6 +150,10 @@
$questions[$qid]->maxgrade = $grade->grade;
}
+ if (isset($timesincestart)) {
+ $quiz->timesincestart = $timesincestart; // To pass it on to quiz_grade_responses
+ }
+
if (!$result = quiz_grade_responses($quiz, $questions)) {
frageplayer_error("Could not grade your quiz attempt");
}
@@ -296,4 +294,4 @@ function frageplayer_success($successstr, $exit = true) {
}
}
-?>
+?>

0 comments on commit 5cae3a3

Please sign in to comment.