|
|
|
@ -196,21 +196,16 @@ if ($form -> validate()) { |
|
|
|
|
|
|
|
|
|
// to hide the exercise description |
|
|
|
|
echo '<style> .media { display:none;}</style>'; |
|
|
|
|
|
|
|
|
|
$show_quiz_edition = true; |
|
|
|
|
if (isset($exerciseId) && !empty($exerciseId)) { |
|
|
|
|
|
|
|
|
|
if (isset($objExercise) && !empty($objExercise->id)) { |
|
|
|
|
$TBL_LP_ITEM = Database::get_course_table(TABLE_LP_ITEM); |
|
|
|
|
$sql="SELECT max_score FROM $TBL_LP_ITEM |
|
|
|
|
WHERE item_type = '".TOOL_QUIZ."' AND path ='".Database::escape_string($exerciseId)."'"; |
|
|
|
|
WHERE item_type = '".TOOL_QUIZ."' AND path ='".Database::escape_string($objExercise->id)."'"; |
|
|
|
|
$result = Database::query($sql); |
|
|
|
|
if (Database::num_rows($result) > 0) { |
|
|
|
|
$show_quiz_edition = false; |
|
|
|
|
} |
|
|
|
|
$form->freeze(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
if ($show_quiz_edition) { |
|
|
|
|
$form->freeze(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
$form -> display (); |
|
|
|
|
} |
|
|
|
|
Display::display_footer(); |