mirror of
https://github.com/moodle/moodle.git
synced 2025-07-16 11:56:31 +02:00
Questoin edit popup window now closes itself automatically, see bug 3140. Thank you Eloy for the lesson in javascript.
This commit is contained in:
@ -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;
|
||||
|
Reference in New Issue
Block a user