Skip to content

Commit

Permalink
Merge pull request #8 from talview/Del-2418
Browse files Browse the repository at this point in the history
Del 2418 : Fix proview video upload is not happening issue
  • Loading branch information
manquer authored Jul 9, 2020
2 parents f207907 + abad296 commit d096879
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions templates/tracker.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,12 @@
}
}
if(current.match('mod/quiz/view') ) {
if(window.self != window.top && window.parent.previousUrl) { //checking if the request is coming from summary
var previousUrl = window.parent.previousUrl;
if(previousUrl.match('mod/quiz/(attempt|summary)') ) {
parent.postMessage({type: 'stopProview',url: window.location.href}, childOrigin);
}
}
let div = document.getElementsByClassName("singlebutton quizstartbuttondiv");
div[0].getElementsByTagName("*")[3].addEventListener("click", function(event){
$(".moodle-dialogue-base").hide();
Expand All @@ -93,6 +99,9 @@
}
});
}
if(current.match('mod/quiz/(attempt|summary)') && window.self != window.top) {
window.parent.previousUrl = window.location.href;
}
if(!current.match('mod/quiz/(attempt|summary|startattempt|view)') && window.self != window.top ) {
parent.postMessage({type: 'stopProview',url: window.location.href}, childOrigin);
}
Expand Down

0 comments on commit d096879

Please sign in to comment.