Fixed timesincestart stuff, I think. bug 2466
This commit is contained in:
@@ -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!");
|
||||
}
|
||||
|
||||
@@ -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 @@
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user