Fixed timesincestart stuff, I think. bug 2466

This commit is contained in:
moodler
2005-03-03 08:42:43 +00:00
parent 0bb3ec63a6
commit 5cae3a321c
2 changed files with 9 additions and 13 deletions
+4 -6
View File
@@ -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!");
}
+5 -7
View File
@@ -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 @@
}
}
?>
?>