MDL-58699 mod_quiz: Require javascript for popup
If any of the access rules require the attempt to open in a new window, assume we require javascript to attempt the quiz. This makes it harder to bypass the javascript pseudo security restrictions.
This commit is contained in:
@@ -840,6 +840,9 @@ class mod_quiz_renderer extends plugin_renderer_base {
|
||||
|
||||
$button = new single_button($url, $buttontext);
|
||||
$button->class .= ' quizstartbuttondiv';
|
||||
if ($popuprequired) {
|
||||
$button->class .= ' quizsecuremoderequired';
|
||||
}
|
||||
|
||||
$popupjsoptions = null;
|
||||
if ($popuprequired && $popupoptions) {
|
||||
|
||||
+4
-2
@@ -360,11 +360,13 @@ table.quizattemptsummary .noreviewmessage {
|
||||
font-size: 0.7em;
|
||||
}
|
||||
|
||||
.quizstartbuttondiv.quizsecuremoderequired input {
|
||||
.quizstartbuttondiv.quizsecuremoderequired input,
|
||||
.quizstartbuttondiv.quizsecuremoderequired button {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.jsenabled .quizstartbuttondiv.quizsecuremoderequired input {
|
||||
.jsenabled .quizstartbuttondiv.quizsecuremoderequired input,
|
||||
.jsenabled .quizstartbuttondiv.quizsecuremoderequired button {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user