Skip to content
Permalink
Browse files

Questoin edit popup window now closes itself automatically, see bug 3…

…140. Thank you Eloy for the lesson in javascript.
  • Loading branch information...
gustav_delius
gustav_delius committed May 19, 2005
1 parent be34c29 commit 97f0cb15f1578eb3358db29a7893a39f0a12c01c
Showing with 13 additions and 2 deletions.
  1. +13 −2 mod/quiz/edit.php
@@ -82,8 +82,19 @@
} else {
// no quiz or course was specified so we need to use the stored modform
if (!isset($SESSION->modform)) { // we will get here after editing a question in
// a popup window. Because I don't know how to close a popup window I just print a message.
notify(get_string('pleaseclose', 'quiz'));
// a popup window. So close window automatically.
?>
<script type="text/javascript">
<!--
if (self.name == 'editquestion') {
self.close();
}
-->
</script>
<noscript>
<?php notify(get_string('pleaseclose', 'quiz')); ?>
</noscript>
<?php
exit;
}
$modform = $SESSION->modform;

0 comments on commit 97f0cb1

Please sign in to comment.
You can’t perform that action at this time.