|
|
|
@ -42,7 +42,7 @@ class MultipleAnswerCombination extends Question { |
|
|
|
|
|
|
|
|
|
$nb_answers = isset($_POST['nb_answers']) ? $_POST['nb_answers'] : 2; |
|
|
|
|
$nb_answers += (isset($_POST['lessAnswers']) ? -1 : (isset($_POST['moreAnswers']) ? 1 : 0)); |
|
|
|
|
|
|
|
|
|
$obj_ex = $_SESSION['objExercise']; |
|
|
|
|
/* |
|
|
|
|
* |
|
|
|
|
* <th> |
|
|
|
@ -65,12 +65,13 @@ class MultipleAnswerCombination extends Question { |
|
|
|
|
</th> |
|
|
|
|
<th> |
|
|
|
|
'.get_lang('Answer').' |
|
|
|
|
</th> |
|
|
|
|
<th> |
|
|
|
|
'.get_lang('Comment').' |
|
|
|
|
</th> |
|
|
|
|
</th>'; |
|
|
|
|
// show column comment when feedback is enable |
|
|
|
|
if ($obj_ex->selectFeedbackType() != EXERCISE_FEEDBACK_TYPE_EXAM ) { |
|
|
|
|
$html .='<th>'.get_lang('Comment').'</th>'; |
|
|
|
|
} |
|
|
|
|
$html .= '</tr>'; |
|
|
|
|
|
|
|
|
|
</tr>'; |
|
|
|
|
$form -> addElement ('html', $html); |
|
|
|
|
|
|
|
|
|
$defaults = array(); |
|
|
|
@ -121,8 +122,9 @@ class MultipleAnswerCombination extends Question { |
|
|
|
|
$form->addElement('html_editor', 'answer['.$i.']',null, 'style="vertical-align:middle"', array('ToolbarSet' => 'TestProposedAnswer', 'Width' => '100%', 'Height' => '100')); |
|
|
|
|
$form->addRule('answer['.$i.']', get_lang('ThisFieldIsRequired'), 'required'); |
|
|
|
|
|
|
|
|
|
$form->addElement('html_editor', 'comment['.$i.']',null, 'style="vertical-align:middle"', array('ToolbarSet' => 'TestProposedAnswer', 'Width' => '100%', 'Height' => '100')); |
|
|
|
|
|
|
|
|
|
if ($obj_ex->selectFeedbackType() != EXERCISE_FEEDBACK_TYPE_EXAM) { |
|
|
|
|
$form->addElement('html_editor', 'comment['.$i.']',null, 'style="vertical-align:middle"', array('ToolbarSet' => 'TestProposedAnswer', 'Width' => '100%', 'Height' => '100')); |
|
|
|
|
} |
|
|
|
|
//only 1 answer the all deal ... |
|
|
|
|
//$form->addElement('text', 'weighting['.$i.']',null, 'style="vertical-align:middle;margin-left: 0em;" size="5" value="10"'); |
|
|
|
|
|
|
|
|
|