]> git.mjollnir.org Git - moodle.git/commitdiff
merged from 1.9 :: MDL-12093 :: added function get_in_popup()
authorurs_hunkler <urs_hunkler>
Sat, 10 Nov 2007 14:53:54 +0000 (14:53 +0000)
committerurs_hunkler <urs_hunkler>
Sat, 10 Nov 2007 14:53:54 +0000 (14:53 +0000)
lib/weblib.php

index cfe80b4247b583a8f9257c576ecfc67fb99c9e94..d1299867b764df339f0059da223e3e4172dd27a5 100644 (file)
@@ -6651,5 +6651,21 @@ function fix_align_rtl($align) {
 }
 
 
+/**
+ * Returns true if the page is displayed in a popup window.
+ * Gets the information from the URL parameter inpopup.
+ *
+ * @return boolean
+ *
+ * TODO Use a central function to create the popup calls allover Moodle and 
+ * TODO In the moment only works with resources and probably questions.
+ */
+function get_in_popup() {
+    $inpopup = optional_param('inpopup', '', PARAM_BOOL);
+    
+    return ($inpopup);
+}
+
+
 // vim:autoindent:expandtab:shiftwidth=4:tabstop=4:tw=140:
 ?>
\ No newline at end of file