]> git.mjollnir.org Git - moodle.git/commitdiff
gift import: MDL-18390 better way to get the question type name.
authortjhunt <tjhunt>
Fri, 13 Mar 2009 09:19:01 +0000 (09:19 +0000)
committertjhunt <tjhunt>
Fri, 13 Mar 2009 09:19:01 +0000 (09:19 +0000)
lib/weblib.php

index 95f400479cb55bf9768bb2c330c3adfec3da57cf..dbfdc9003f686bef704ac47a9e8020786fed330d 100644 (file)
@@ -4305,12 +4305,15 @@ function _print_custom_corners_end($idbase) {
  * @return string / nothing depending on the $return paramter.
  */
 function print_single_button($link, $options, $label='OK', $method='get', $notusedanymore='',
-        $return=false, $tooltip='', $disabled = false, $jsconfirmmessage='') {
+        $return=false, $tooltip='', $disabled = false, $jsconfirmmessage='', $formid = '') {
     $output = '';
+    if ($formid) {
+        $formid = ' id="' . s($formid) . '"';
+    }
     $link = str_replace('"', '&quot;', $link); //basic XSS protection
     $output .= '<div class="singlebutton">';
     // taking target out, will need to add later target="'.$target.'"
-    $output .= '<form action="'. $link .'" method="'. $method .'">';
+    $output .= '<form action="'. $link .'" method="'. $method .'"' . $formid . '>';
     $output .= '<div>';
     if ($options) {
         foreach ($options as $name => $value) {