get_flat_list();
-
- for ($i = 1; $i <= $nbrAnswers; $i++) {
- // is an delineation
- if ($answerType == HOT_SPOT_DELINEATION) {
- $option_lp = '';
-
- // setting the LP
- $isSelected = false;
- foreach ($flat_list as $id => $details) {
- $selected = '';
- if (isset($lp[$i]) && $id == $lp[$i]) {
- $isSelected = true;
- $selected = 'selected="selected"';
- }
- $option_lp .= '';
- }
+ // Loading list of LPs
+ $flat_list = $list->get_flat_list();
+
+ for ($i = 1; $i <= $nbrAnswers; $i++) {
+ // is an delineation
+ if ($answerType == HOT_SPOT_DELINEATION) {
+ $option_lp = '';
+
+ // setting the LP
+ $isSelected = false;
+ foreach ($flat_list as $id => $details) {
+ $selected = '';
+ if (isset($lp[$i]) && $id == $lp[$i]) {
+ $isSelected = true;
+ $selected = 'selected="selected"';
+ }
+ $option_lp .= '';
+ }
- if ($isSelected) {
- $option_lp = ''.$option_lp;
- } else {
- $option_lp = ''.$option_lp;
+ } else {
+ $option_lp = ''.$option_lp;
- }
+ }
- // Feedback SELECT
- $question_list = $objExercise->selectQuestionList();
- $option_feed = '';
- $option_feed .= '';
+ // Feedback SELECT
+ $question_list = $objExercise->selectQuestionList();
+ $option_feed = '';
+ $option_feed .= '';
- foreach ($question_list as $key => $questionid) {
- $selected = '';
- $question = Question::read($questionid);
- $questionTitle = strip_tags($question->selectTitle());
- $val = "Q$key: $questionTitle";
+ foreach ($question_list as $key => $questionid) {
+ $selected = '';
+ $question = Question::read($questionid);
+ $questionTitle = strip_tags($question->selectTitle());
+ $val = "Q$key: $questionTitle";
- if (isset($select_question[$i]) && $questionid == $select_question[$i]) {
- $selected = 'selected="selected"';
- }
+ if (isset($select_question[$i]) && $questionid == $select_question[$i]) {
+ $selected = 'selected="selected"';
+ }
- $option_feed .= '';
- }
+ $option_feed .= '';
+ }
- if (isset($select_question[$i]) && $select_question[$i] == -1) {
- $option_feed .= '';
- } else {
- $option_feed .= '';
- }
+ if (isset($select_question[$i]) && $select_question[$i] == -1) {
+ $option_feed .= '';
+ } else {
+ $option_feed .= '';
+ }
- //-------- IF it is a delineation
- if ($_SESSION['tmp_answers']['hotspot_type'][$i] == 'delineation') {
- $option1 = $option2 = $option3 = '';
- for ($k = 1; $k <= 100; $k++) {
- $selected1 = $selected2 = $selected3 = '';
- if ($k == $threadhold1[$i]) {
- $selected1 = 'selected="selected"';
- }
- if ($k == $threadhold2[$i]) {
- $selected2 = 'selected="selected"';
- }
- if ($k == $threadhold3[$i]) {
- $selected3 = 'selected="selected"';
- }
- $option1 .= '';
- $option2 .= '';
- $option3 .= '';
- } ?>
+ //-------- IF it is a delineation
+ if ($_SESSION['tmp_answers']['hotspot_type'][$i] == 'delineation') {
+ $option1 = $option2 = $option3 = '';
+ for ($k = 1; $k <= 100; $k++) {
+ $selected1 = $selected2 = $selected3 = '';
+ if ($k == $threadhold1[$i]) {
+ $selected1 = 'selected="selected"';
+ }
+ if ($k == $threadhold2[$i]) {
+ $selected2 = 'selected="selected"';
+ }
+ if ($k == $threadhold3[$i]) {
+ $selected3 = 'selected="selected"';
+ }
+ $option1 .= '';
+ $option2 .= '';
+ $option3 .= '';
+ } ?>
|
|
- selectFeedbackType() == EXERCISE_FEEDBACK_TYPE_DIRECT) {
- ?>
+ selectFeedbackType() == EXERCISE_FEEDBACK_TYPE_DIRECT) { ?>
|
-
+
|
+ }
+ } elseif (false) {
+ ?>
|
|
@@ -795,7 +789,7 @@ if (isset($modifyAnswers)) {
style="width: 100%">
selectFeedbackType() == EXERCISE_FEEDBACK_TYPE_DIRECT) {
- ?>
+ ?>
|
-
+
|
-
+
+ } elseif ($_SESSION['tmp_answers']['hotspot_type'][$i] == 'oar') {
+ // if it's an OAR
+ if ($i == 2) {
+ ?>
| |
* |
selectFeedbackType() == EXERCISE_FEEDBACK_TYPE_DIRECT) {
- ?>
+ ?>
|
|
-
+ echo get_lang('Scenario');
+ } ?>
+
|
-
+
|
-
+
|
|
+ value=""/>
|
+ style="width: 100%">
|
selectFeedbackType() == EXERCISE_FEEDBACK_TYPE_DIRECT) {
- ?>
+ ?>
|
-
+
|
+ }
+ }
+ //end if is delineation
+ } else {
+ $commentValue = isset($comment[$i]) ? $comment[$i] : null;
+ $responseValue = isset($reponse[$i]) ? $reponse[$i] : null; ?>
|
'TestProposedAnswer',
'cols-size' => [0, 12, 0],
];
- $form->addHtmlEditor('comment['.$i.']', null, false, false, $config);
- $renderer = $form->defaultRenderer();
- $form_template = '{content}';
- $renderer->setFormTemplate($form_template);
- $element_template = '
- {label}
- {element}';
- $renderer->setElementTemplate($element_template);
-
- $form->setDefaults(['comment['.$i.']' => $commentValue]);
- $return = $form->returnForm(); ?>
+ $form->addHtmlEditor('comment['.$i.']', null, false, false, $config);
+ $renderer = $form->defaultRenderer();
+ $form_template = '{content}';
+ $renderer->setFormTemplate($form_template);
+ $element_template = '{label} {element}';
+ $renderer->setElementTemplate($element_template);
+
+ $form->setDefaults(['comment['.$i.']' => $commentValue]);
+ $return = $form->returnForm(); ?>
| |
-
+
-
+ if ($answerType == HOT_SPOT) {
+ ?>
"/>
-
+
|
get_flat_list();
- $option_lp = '';
- $isSelected = false;
- foreach ($flat_list as $id => $details) {
- $selected = '';
- if (isset($lp_noerror) && $id == $lp_noerror) {
- $selected = 'selected="selected"';
- $isSelected = true;
- }
- $option_lp .= '';
- }
+ $list = new LearnpathList(api_get_user_id());
+ $flat_list = $list->get_flat_list();
+ $option_lp = '';
+ $isSelected = false;
+ foreach ($flat_list as $id => $details) {
+ $selected = '';
+ if (isset($lp_noerror) && $id == $lp_noerror) {
+ $selected = 'selected="selected"';
+ $isSelected = true;
+ }
+ $option_lp .= '';
+ }
- if ($isSelected) {
- $option_lp = ''.$option_lp;
- } else {
- $option_lp = ''
+ if ($isSelected) {
+ $option_lp = ''.$option_lp;
+ } else {
+ $option_lp = ''
.$option_lp;
- }
+ }
- // Feedback SELECT
- $question_list = $objExercise->selectQuestionList();
- $option_feed = '';
- $option_feed .= '';
- $selectQuestionNoError = isset($selectQuestionNoError) ? $selectQuestionNoError : null;
- foreach ($question_list as $key => $questionid) {
- $selected = '';
- $question = Question::read($questionid);
- $questionTitle = $question->selectTitle();
- $val = "Q$key: $questionTitle";
- if ($questionid == $selectQuestionNoError) {
- $selected = 'selected="selected"';
- }
- $option_feed .= '';
- }
- if ($selectQuestionNoError == -1) {
- $option_feed .= '';
- } else {
- $option_feed .= '';
- }
+ // Feedback SELECT
+ $question_list = $objExercise->selectQuestionList();
+ $option_feed = '';
+ $option_feed .= '';
+ $selectQuestionNoError = isset($selectQuestionNoError) ? $selectQuestionNoError : null;
+ foreach ($question_list as $key => $questionid) {
+ $selected = '';
+ $question = Question::read($questionid);
+ $questionTitle = $question->selectTitle();
+ $val = "Q$key: $questionTitle";
+ if ($questionid == $selectQuestionNoError) {
+ $selected = 'selected="selected"';
+ }
+ $option_feed .= '';
+ }
+ if ($selectQuestionNoError == -1) {
+ $option_feed .= '';
+ } else {
+ $option_feed .= '';
+ }
- if ($answerType == HOT_SPOT_DELINEATION) {
- ?>
+ if ($answerType == HOT_SPOT_DELINEATION) {
+ ?>
|
- selectFeedbackType() == EXERCISE_FEEDBACK_TYPE_DIRECT) {
- ?>
+ selectFeedbackType() == EXERCISE_FEEDBACK_TYPE_DIRECT) { ?>
|
|
-
+
|
-
+
|
@@ -1053,18 +1034,15 @@ if (isset($modifyAnswers)) {
|
+ name="comment_noerror">
|
- selectFeedbackType() == EXERCISE_FEEDBACK_TYPE_DIRECT) {
- ?>
+ selectFeedbackType() == EXERCISE_FEEDBACK_TYPE_DIRECT) { ?>
|
|
-
+
|
-
+
-
+