Fix js code when exporting to PDF

pull/2487/head
jmontoyaa 8 years ago
parent 8ffc68d01a
commit a5fa178665
  1. 5
      main/exercise/exercise_show.php

@ -164,9 +164,8 @@ if ($allowRecordAudio && $allowTeacherCommentAudio) {
$htmlHeadXtra[] = api_get_js('record_audio/record_audio.js'); $htmlHeadXtra[] = api_get_js('record_audio/record_audio.js');
} }
$scoreJsCode = ExerciseLib::getJsCode();
if ($action != 'export') { if ($action != 'export') {
$scoreJsCode = ExerciseLib::getJsCode();
if ($origin != 'learnpath') { if ($origin != 'learnpath') {
Display::display_header(''); Display::display_header('');
} else { } else {
@ -184,7 +183,6 @@ if ($action != 'export') {
api_get_self().'?'.api_get_cidreq().'&id='.$id.'&action=export&' api_get_self().'?'.api_get_cidreq().'&id='.$id.'&action=export&'
) )
]); ]);
}
?> ?>
<script> <script>
<?php echo $scoreJsCode; ?> <?php echo $scoreJsCode; ?>
@ -228,6 +226,7 @@ if ($action != 'export') {
} }
</script> </script>
<?php <?php
}
$show_results = true; $show_results = true;
$show_only_total_score = false; $show_only_total_score = false;
$showTotalScoreAndUserChoicesInLastAttempt = true; $showTotalScoreAndUserChoicesInLastAttempt = true;

Loading…
Cancel
Save