Added helpbutton function for popup help, see also /help.php
authormartin <martin>
Mon, 11 Mar 2002 03:21:10 +0000 (03:21 +0000)
committermartin <martin>
Mon, 11 Mar 2002 03:21:10 +0000 (03:21 +0000)
lib/moodlelib.php

index a9bf51b945286435a72ddc15857b844c08187064..0c87e286f471057ce1fea1a9474bb2d402106d0f 100644 (file)
@@ -197,6 +197,13 @@ function error ($message, $link="") {
     die;
 }
 
+function helpbutton ($info, $type="file") {
+    global $CFG;
+    $url = "/help.php?$type=help.$info.php";
+    $image = "<IMG BORDER=0 ALT=help SRC=\"$CFG->wwwroot/pix/help.gif\">";
+    link_to_popup_window ($url, "popup", $image, $height=400, $width=500);
+}
+
 function notice ($message, $link="") {
     global $THEME, $HTTP_REFERER;