Skip to content

Commit

Permalink
fixed bug 2782
Browse files Browse the repository at this point in the history
  • Loading branch information
gustav_delius committed Mar 29, 2005
1 parent 87475fc commit a5c5a18
Showing 1 changed file with 29 additions and 29 deletions.
58 changes: 29 additions & 29 deletions mod/quiz/mod.html
@@ -1,35 +1,6 @@
<!-- This page defines the form to create or edit an instance of this module -->
<!-- It is used from /course/mod.php. The whole instance is available as $form. -->

<!-- Some javascript to allow for the hiding of advanced options
This code was derived from mod.html in the resource module -->
<script language="javascript" type="text/javascript">
function showhide (id, set) {
divobj = document.getElementById(id);
butobj = document.getElementById(id+'button');
prefobj = document.getElementById(id+'pref');
if (set == true) {
if (prefobj.value == '1') {
divobj.style.display = 'block';
butobj.value = '<?php print_string("hideadvancedsettings") ?>';
} else {
divobj.style.display = 'none';
butobj.value = '<?php print_string("showadvancedsettings") ?>...';
}
} else {
if (prefobj.value == '1') {
divobj.style.display = 'none';
butobj.value = '<?php print_string("showadvancedsettings") ?>...';
prefobj.value = '0';
} else {
divobj.style.display = 'block';
butobj.value = '<?php print_string("hideadvancedsettings") ?>';
prefobj.value = '1';
}
}
}
</script>

<?php
require_once("$CFG->dirroot/mod/quiz/locallib.php");
// Ensure that all form variables are initialized
Expand Down Expand Up @@ -381,6 +352,35 @@

<?php if ($fix) { ?>

<!-- Some javascript to allow for the hiding of advanced options
This code was derived from mod.html in the resource module -->
<script language="javascript" type="text/javascript">
function showhide (id, set) {
divobj = document.getElementById(id);
butobj = document.getElementById(id+'button');
prefobj = document.getElementById(id+'pref');
if (set == true) {
if (prefobj.value == '1') {
divobj.style.display = 'block';
butobj.value = '<?php print_string("hideadvancedsettings") ?>';
} else {
divobj.style.display = 'none';
butobj.value = '<?php print_string("showadvancedsettings") ?>...';
}
} else {
if (prefobj.value == '1') {
divobj.style.display = 'none';
butobj.value = '<?php print_string("showadvancedsettings") ?>...';
prefobj.value = '0';
} else {
divobj.style.display = 'block';
butobj.value = '<?php print_string("hideadvancedsettings") ?>';
prefobj.value = '1';
}
}
}
</script>

<!-- Now comes a copy of the above but enclosed in a div with id optionsettings and with
the conditions reversed, so that it shows exactly the options that are usually hidden.
The visibility of this div is controlled by javascript. -->
Expand Down

0 comments on commit a5c5a18

Please sign in to comment.