Replace hotspot_solution.swf - refs #7705

1.10.x
Angel Fernando Quiroz Campos 11 years ago
parent 36eac05372
commit d9820409da
  1. 2
      main/exercice/exercise_result.php
  2. 55
      main/exercice/exercise_show.php
  3. 2
      main/exercice/result.php

@ -75,7 +75,7 @@ $interbreadcrumb[] = array(
"name" => get_lang('Exercises'),
);
$htmlHeadXtra[] = '<script src="../plugin/hotspot2/js/hotspot_solution.js"></script>';
$htmlHeadXtra[] = '<script src="' . api_get_path(WEB_CODE_PATH) . 'plugin/hotspot2/js/hotspot_solution.js"></script>';
if ($origin != 'learnpath') {
// So we are not in learnpath tool

@ -120,6 +120,8 @@ $interbreadcrumb[]= array("url" => "#","name" => get_lang('Result'));
$this_section = SECTION_COURSES;
$htmlHeadXtra[] = '<script src="' . api_get_path(WEB_CODE_PATH) . 'plugin/hotspot2/js/hotspot_solution.js"></script>';
if ($origin != 'learnpath') {
Display::display_header('');
} else {
@ -367,14 +369,25 @@ foreach ($questionList as $questionId) {
if ($show_results) {
echo '</table></td></tr>';
echo '<tr>
<td colspan="2">'.
'<object type="application/x-shockwave-flash" data="'.api_get_path(WEB_CODE_PATH).'plugin/hotspot/hotspot_solution.swf?modifyAnswers='.Security::remove_XSS($questionId).'&exe_id='.$id.'&from_db=1" width="552" height="352">
<param name="movie" value="../plugin/hotspot/hotspot_solution.swf?modifyAnswers='.Security::remove_XSS($questionId).'&exe_id='.$id.'&from_db=1" />
</object>
</td>
</tr>
</table><br/>';
echo "
<tr>
<td colspan=\"2\">
<div id=\"hotspot-solution\"></div>
<script>
$(document).on('ready', function () {
HotSpotSolution.init({
questionId: $questionId,
exerciseId: $id,
selector: '#hotspot-solution'
});
});
</script>
</td>
</tr>
</table>
<br>
";
}
} else if($answerType == HOT_SPOT_DELINEATION) {
@ -497,14 +510,24 @@ foreach ($questionList as $questionId) {
$questionScore= Database::result($resfree,0,"marks");
$totalScore+=$questionScore;
echo '</table></td></tr>';
echo '<tr>
<td colspan="2">
<object type="application/x-shockwave-flash" data="../plugin/hotspot/hotspot_solution.swf?modifyAnswers='.$questionId.'&exe_id='.$id.'&from_db=1" width="556" height="350">
<param name="movie" value="../plugin/hotspot/hotspot_solution.swf?modifyAnswers='.$questionId.'&exe_id='.$id.'&from_db=1" />
</object>
</td>
</tr>
</table>';
echo "
<tr>
<td colspan=\"2\">
<div id=\"hotspot-solution\"></div>
<script>
$(document).on('ready', function () {
HotSpotSolution.init({
questionId: $questionId,
exerciseId: $id,
selector: '#hotspot-solution'
});
});
</script>
</td>
</tr>
</table>
";
}
}

@ -53,6 +53,8 @@ if (!$is_allowedToEdit) {
}
}
$htmlHeadXtra[] = '<script src="' . api_get_path(WEB_CODE_PATH) . 'plugin/hotspot2/js/hotspot_solution.js"></script>';
if ($show_headers) {
$interbreadcrumb[] = array(
"url" => "exercise.php?".api_get_cidreq(),

Loading…
Cancel
Save