|
@@ 359-383 (lines=25) @@
|
| 356 |
|
$grant_parent_element = ""; |
| 357 |
|
} |
| 358 |
|
|
| 359 |
|
if ($record_item_body) { |
| 360 |
|
|
| 361 |
|
if ((!in_array($current_element, $non_HTML_tag_to_avoid))) { |
| 362 |
|
$current_question_item_body .= "<" . $name; |
| 363 |
|
foreach ($attributes as $attribute_name => $attribute_value) { |
| 364 |
|
$current_question_item_body .= " " . $attribute_name . "=\"" . $attribute_value . "\""; |
| 365 |
|
} |
| 366 |
|
$current_question_item_body .= ">"; |
| 367 |
|
} else { |
| 368 |
|
//in case of FIB question, we replace the IMS-QTI tag b y the correct answer between "[" "]", |
| 369 |
|
//we first save with claroline tags ,then when the answer will be parsed, the claroline tags will be replaced |
| 370 |
|
|
| 371 |
|
if ($current_element == 'INLINECHOICEINTERACTION') { |
| 372 |
|
$current_question_item_body .= "**claroline_start**" . $attributes['RESPONSEIDENTIFIER'] . "**claroline_end**"; |
| 373 |
|
} |
| 374 |
|
if ($current_element == 'TEXTENTRYINTERACTION') { |
| 375 |
|
$correct_answer_value = $exercise_info['question'][$current_question_ident]['correct_answers'][$current_answer_id]; |
| 376 |
|
$current_question_item_body .= "[" . $correct_answer_value . "]"; |
| 377 |
|
|
| 378 |
|
} |
| 379 |
|
if ($current_element == 'BR') { |
| 380 |
|
$current_question_item_body .= "<br />"; |
| 381 |
|
} |
| 382 |
|
} |
| 383 |
|
} |
| 384 |
|
|
| 385 |
|
switch ($current_element) { |
| 386 |
|
case 'ASSESSMENTITEM': |
|
@@ 641-665 (lines=25) @@
|
| 638 |
|
} |
| 639 |
|
|
| 640 |
|
|
| 641 |
|
if ($record_item_body) { |
| 642 |
|
|
| 643 |
|
if ((!in_array($current_element, $non_HTML_tag_to_avoid))) { |
| 644 |
|
$current_question_item_body .= "<" . $name; |
| 645 |
|
foreach ($attributes as $attribute_name => $attribute_value) { |
| 646 |
|
$current_question_item_body .= " " . $attribute_name . "=\"" . $attribute_value . "\""; |
| 647 |
|
} |
| 648 |
|
$current_question_item_body .= ">"; |
| 649 |
|
} else { |
| 650 |
|
//in case of FIB question, we replace the IMS-QTI tag b y the correct answer between "[" "]", |
| 651 |
|
//we first save with claroline tags ,then when the answer will be parsed, the claroline tags will be replaced |
| 652 |
|
|
| 653 |
|
if ($current_element == 'INLINECHOICEINTERACTION') { |
| 654 |
|
$current_question_item_body .= "**claroline_start**" . $attributes['RESPONSEIDENTIFIER'] . "**claroline_end**"; |
| 655 |
|
} |
| 656 |
|
if ($current_element == 'TEXTENTRYINTERACTION') { |
| 657 |
|
$correct_answer_value = $exercise_info['question'][$current_question_ident]['correct_answers'][$current_answer_id]; |
| 658 |
|
$current_question_item_body .= "[" . $correct_answer_value . "]"; |
| 659 |
|
|
| 660 |
|
} |
| 661 |
|
if ($current_element == 'BR') { |
| 662 |
|
$current_question_item_body .= "<br />"; |
| 663 |
|
} |
| 664 |
|
} |
| 665 |
|
} |
| 666 |
|
|
| 667 |
|
switch ($current_element) { |
| 668 |
|
case 'ASSESSMENT': |