diff --git a/main/exercice/admin.php b/main/exercice/admin.php index bcaef8daa5..29f6ea2975 100755 --- a/main/exercice/admin.php +++ b/main/exercice/admin.php @@ -304,11 +304,7 @@ function multiple_answer_true_false_onchange(variable) { } document.getElementById(weight_id).value = array_result[result]; } - - - - - + '; diff --git a/main/exercice/exercise.lib.php b/main/exercice/exercise.lib.php index 89a87b5fda..42e58f1e72 100755 --- a/main/exercice/exercise.lib.php +++ b/main/exercice/exercise.lib.php @@ -16,12 +16,12 @@ require_once dirname(__FILE__).'/../inc/lib/fckeditor/fckeditor.php'; * Shows a question * * @param int question id - * @param bool only answers + * @param bool if true only show the questions, no exercise title etc * @param bool origin i.e = learnpath * @param int current item from the list of questions * @param int number of total questions * */ -function showQuestion($questionId, $onlyAnswers = false, $origin = false, $current_item = '', $show_title = true, $freeze = false) { +function showQuestion($questionId, $only_questions = false, $origin = false, $current_item = '', $show_title = true, $freeze = false) { // Text direction for the current language $is_ltr_text_direction = api_get_text_direction() != 'rtl'; @@ -42,7 +42,7 @@ function showQuestion($questionId, $onlyAnswers = false, $origin = false, $curre if ($answerType != HOT_SPOT) { // Question is not of type hotspot - if (!$onlyAnswers) { + if (!$only_questions) { $questionName = $objQuestionTmp->selectTitle(); $questionDescription = $objQuestionTmp->selectDescription(); @@ -141,13 +141,9 @@ function showQuestion($questionId, $onlyAnswers = false, $origin = false, $curre $s .= '