MDL-49913 mod_lesson: round question grades on import
This commit is contained in:
@@ -73,7 +73,7 @@ function lesson_save_question_options($question, $lesson) {
|
||||
$answer->jumpto = LESSON_NEXTPAGE;
|
||||
}
|
||||
$answer->timecreated = $timenow;
|
||||
$answer->grade = $question->fraction[$key] * 100;
|
||||
$answer->grade = round($question->fraction[$key] * 100);
|
||||
$answer->answer = $dataanswer;
|
||||
$answer->response = $question->feedback[$key]['text'];
|
||||
$answer->responseformat = $question->feedback[$key]['format'];
|
||||
@@ -108,7 +108,7 @@ function lesson_save_question_options($question, $lesson) {
|
||||
$answer->pageid = $question->id;
|
||||
$answer->jumpto = LESSON_NEXTPAGE;
|
||||
$answer->timecreated = $timenow;
|
||||
$answer->grade = $question->fraction[$key] * 100;
|
||||
$answer->grade = round($question->fraction[$key] * 100);
|
||||
$min = $question->answer[$key] - $question->tolerance[$key];
|
||||
$max = $question->answer[$key] + $question->tolerance[$key];
|
||||
$answer->answer = $min.":".$max;
|
||||
@@ -183,7 +183,7 @@ function lesson_save_question_options($question, $lesson) {
|
||||
$answer->lessonid = $question->lessonid;
|
||||
$answer->pageid = $question->id;
|
||||
$answer->timecreated = $timenow;
|
||||
$answer->grade = $question->fraction[$key] * 100;
|
||||
$answer->grade = round($question->fraction[$key] * 100);
|
||||
// changed some defaults
|
||||
/* Original Code
|
||||
if ($answer->grade > 50 ) {
|
||||
|
||||
Reference in New Issue
Block a user