Skip to content

Commit

Permalink
Quiz: Fix hotspot delineation preview for admin #3508
Browse files Browse the repository at this point in the history
  • Loading branch information
AngelFQC committed Sep 9, 2020
1 parent 20b7ded commit df3aaa8
Showing 1 changed file with 27 additions and 26 deletions.
53 changes: 27 additions & 26 deletions main/inc/lib/exercise.lib.php
Expand Up @@ -1472,34 +1472,35 @@ class="window window_left_question window{$questionId}_question">
}

$answerList .= '
</ul>
</ol>
</div>
';
if ($freeze) {
$relPath = api_get_path(WEB_CODE_PATH);
echo "
<div class=\"row\">
<div class=\"col-sm-9\">
<div id=\"hotspot-preview-$questionId\"></div>
</div>
<div class=\"col-sm-3\">
$answerList
</div>
}

if ($freeze) {
$relPath = api_get_path(WEB_CODE_PATH);
echo "
<div class=\"row\">
<div class=\"col-sm-9\">
<div id=\"hotspot-preview-$questionId\"></div>
</div>
<script>
new ".($answerType == HOT_SPOT ? "HotspotQuestion" : "DelineationQuestion")."({
questionId: $questionId,
exerciseId: $exerciseId,
exeId: 0,
selector: '#hotspot-preview-$questionId',
'for': 'preview',
relPath: '$relPath'
});
</script>
";
<div class=\"col-sm-3\">
$answerList
</div>
</div>
<script>
new ".($answerType == HOT_SPOT ? "HotspotQuestion" : "DelineationQuestion")."({
questionId: $questionId,
exerciseId: $exerciseId,
exeId: 0,
selector: '#hotspot-preview-$questionId',
'for': 'preview',
relPath: '$relPath'
});
</script>
";

return;
}
return;
}

if (!$only_questions) {
Expand Down Expand Up @@ -1534,8 +1535,8 @@ class="window window_left_question window{$questionId}_question">
questionId: $questionId,
exerciseId: $exerciseId,
exeId: 0,
selector: '#question_div_' + $questionId + ' .hotspot-image, #pnl-question-' + $questionId + ' .hotspot-image',
'for': 'preview',
selector: '#question_div_' + $questionId + ' .hotspot-image',
'for': 'user',
relPath: '$relPath'
});
});
Expand Down

0 comments on commit df3aaa8

Please sign in to comment.