Skip to content

Commit

Permalink
Fixing EMDL-570: quiz timer update procedure in fullscreen
Browse files Browse the repository at this point in the history
The quiz timer will now update in lti fullscreen mode
  • Loading branch information
Martin Hanusch committed Sep 10, 2021
1 parent 7054f1b commit a3b75cd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
8 changes: 2 additions & 6 deletions renderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -394,8 +394,7 @@ function qtype_lti_fullscreen_'.$question->id.'() {
document.getElementById("quiz_timer_lti_'.$question->id.'");
if (quiz_timer_div && quiz_timer_div.innerHTML !== "") {
lti_fullsc_'.$question->id.'.
appendChild(document.getElementById("quiz-timer").cloneNode(true));
lti_fullsc_'.$question->id.'.appendChild(document.getElementById("quiz-timer"));
Y.one("#quiz_timer_lti_'.$question->id.'").
setStyle("display", "block");
var calculatedheight = doc.get("winHeight") -
Expand Down Expand Up @@ -426,11 +425,8 @@ function qtype_lti_fullscreen_'.$question->id.'() {
setStyle("height", viewportHeight +"px");
Y.one("#qtype_lti_framediv_'.$question->id.'").
set("height", viewportHeight +"px");
if (document.getElementById("quiz-timer")) {
var lti_fullsc_'.$question->id.' =
document.getElementById("quiz_timer_lti_'.$question->id.'");
lti_fullsc_'.$question->id.'.innerHTML = "";
document.getElementById("quiz-timer-wrapper").appendChild(document.getElementById("quiz-timer"));
Y.one("#quiz_timer_lti_'.$question->id.'").setStyle("margin-top", "0em");
Y.one("#quiz_timer_lti_'.$question->id.'").setStyle("display", "none");
}
Expand Down
2 changes: 1 addition & 1 deletion version.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
defined('MOODLE_INTERNAL') || die();

$plugin->component = 'qtype_lti';
$plugin->version = 2021080302;
$plugin->version = 2021091000;
$plugin->requires = 2018051700; // Moodle >=3.5.

$plugin->maturity = MATURITY_STABLE;
Expand Down

0 comments on commit a3b75cd

Please sign in to comment.