]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-19825 Upgraded calls to helpbutton, print_simple_box* and notify
authornicolasconnault <nicolasconnault>
Tue, 18 Aug 2009 05:19:25 +0000 (05:19 +0000)
committernicolasconnault <nicolasconnault>
Tue, 18 Aug 2009 05:19:25 +0000 (05:19 +0000)
14 files changed:
user/addnote.php
user/edit.php
user/emailupdate.php
user/extendenrol.php
user/groupaddnote.php
user/groupextendenrol.php
user/index.php
user/message.html
user/messageselect.php
user/portfolio.php
user/profile/index.php
user/repository.php
user/tabs.php
user/view.php

index 5807f4bca2bdf6824782c9eef348d2a47ade6d6a..0505967f9c409f0da3fa4ad9e5fe67cd859d7a21 100644 (file)
@@ -62,8 +62,8 @@ echo '<input type="hidden" name="id" value="'.$course->id.'" />';
 echo '<input type="hidden" name="sesskey" value="'.sesskey().'" />';
 echo '</fieldset>';
 $table->head  = array (get_string('fullname'),
-    get_string('content', 'notes') . helpbutton('writing', get_string('helpwriting'), 'moodle', true, false, '', true),
-    get_string('publishstate', 'notes') . helpbutton('status', get_string('publishstate', 'notes'), 'notes', true, false, '', true),
+    get_string('content', 'notes') . $OUTPUT->help_icon(moodle_help_icon::make('writing', get_string('helpwriting'))),
+    get_string('publishstate', 'notes') . $OUTPUT->help_icon(moodle_help_icon::make('status', get_string('publishstate', 'notes'), 'notes')),
     );
 $table->align = array ('left', 'center', 'center');
 $state_names = note_get_state_names();
index 951a98b55e7207ae6b5c2825b463cb25410df3fb..7c7b8532a3ab51e730ea4d0e352b79e9600d518a 100644 (file)
                 $a->oldemail = $usernew->email = $user->email;
 
                 $email_changed_html = $OUTPUT->box(get_string('auth_changingemailaddress', 'auth_email', $a), 'generalbox', 'notice');
-                $email_changed_html .= print_continue("$CFG->wwwroot/user/view.php?id=$user->id&amp;course=$course->id", true);
+                $email_changed_html .= $OUTPUT->continue_button("$CFG->wwwroot/user/view.php?id=$user->id&amp;course=$course->id");
                 $email_changed = true;
             }
         }
index 4971e7edccc1e348828531460b9554e9b52b3265..6d0eb00e632c90cfa2c50453fa90a1d75f1ca9de 100755 (executable)
@@ -33,7 +33,7 @@ if (empty($preferences['newemailattemptsleft'])) {
     if ($DB->get_record('user', array('email' => $user->email))) {
         $stremailnowexists = get_string('auth_emailnowexists', 'auth_email');
         echo $OUTPUT->box($stremailnowexists, 'center');
-        print_continue("$CFG->wwwroot/user/view.php?id=$user->id");
+        echo $OUTPUT->continue_button("$CFG->wwwroot/user/view.php?id=$user->id");
     } else {
         // update user email
         $DB->set_field('user', 'email', $user->email, array('id' => $user->id));
@@ -41,7 +41,7 @@ if (empty($preferences['newemailattemptsleft'])) {
         $a->email = $user->email;
         $stremailupdatesuccess = get_string('auth_emailupdatesuccess', 'auth_email', $a);
         echo $OUTPUT->box($stremailupdatesuccess, 'center');
-        print_continue("$CFG->wwwroot/user/view.php?id=$user->id");
+        echo $OUTPUT->continue_button("$CFG->wwwroot/user/view.php?id=$user->id");
     }
 
 } else {
index b4d1b0fef75c68fae02d83e23e5b993aaed5f1f5..eb6795c069f52bbf594cefbf9d80e948b689809d 100644 (file)
@@ -112,7 +112,7 @@ if($course->enrollable == 2) {
 }
 
 $title = get_string('extendenrol');
-echo $OUTPUT->heading($title . helpbutton('extendenrol', $title, 'moodle', true, false, '', true));
+echo $OUTPUT->heading($title . $OUTPUT->help_icon(moodle_help_icon::make('extendenrol', $title)));
 echo "<form method=\"post\" action=\"extendenrol.php\">\n";
 echo '<input type="hidden" name="id" value="'.$course->id.'" />';
 echo '<input type="hidden" name="sesskey" value="'.sesskey().'" />';
index 060026fdd33095c761296ba82cc91dc28118e27d..7431281bfbc5ddd4a3ae3b939e583747938f0ba3 100644 (file)
@@ -84,11 +84,11 @@ echo get_string('users'). ': ' . implode(', ', $userlist) . '.';
 echo '</p>';
 
 echo '<p>' . get_string('content', 'notes');
-helpbutton('writing', get_string('helpwriting'));
+echo $OUTPUT->help_icon(moodle_help_icon::make('writing', get_string('helpwriting')));
 echo '<br /><textarea name="content" rows="5" cols="50">' . strip_tags(@$content) . '</textarea></p>';
 
 echo '<p>' . $strpublishstate;
-helpbutton('status', $strpublishstate, 'notes');
+echo $OUTPUT->help_icon(moodle_help_icon::make('status', $strpublishstate, 'notes'));
 echo $OUTPUT->select(html_select::make($state_names, 'state', empty($state) ? NOTES_STATE_PUBLIC : $state, false));
 echo '</p>';
 
index 9900ec8dec6238cf5d199d004338c58341a65fdb..54ea3877fdc987191a25e378309042892f1e45f5 100755 (executable)
@@ -109,7 +109,7 @@ if($course->enrollable == 2) {
 }
 
 $title = get_string('groupextendenrol');
-echo $OUTPUT->heading($title . helpbutton('groupextendenrol', $title, 'moodle', true, false, '', true));
+echo $OUTPUT->heading($title . $OUTPUT->help_icon(moodle_help_icon::make('groupextendenrol', $title)));
 echo '<form method="post" action="groupextendenrol.php">';
 echo '<input type="hidden" name="id" value="'.$course->id.'" />';
 echo '<input type="hidden" name="sesskey" value="'.sesskey().'" />';
index 03b5593f89e8137b113c70c97fdadf6f9870752f..1463c86637aa8285e6f9ec53db749b11839244b9 100644 (file)
@@ -22,7 +22,7 @@
 
     $contextid    = optional_param('contextid', 0, PARAM_INT);                // one of this or
     $courseid     = optional_param('id', 0, PARAM_INT);                       // this are required
-    
+
     $PAGE->set_url('user/index.php', compact('page', 'perpage', 'mode', 'accesssince', 'search', 'roleid', 'contextid', 'courseid'));
 
     if ($contextid) {
                     }
 
                     $row->cells[1]->text .= $OUTPUT->container_end();
-                    
+
                     $row->cells[2] = new html_table_cell();
                     $row->cells[2]->add_class('links');
                     $row->cells[2]->text = '';
-                    
+
                     $links = array();
 
                     if ($CFG->bloglevel > 0) {
                     }
 
                     $links[] = html_link::make(new moodle_url($CFG->wwwroot.'/user/view.php?id='. $user->id .'&course='. $course->id), get_string('fullprofile') . '...');
-                    
+
                     foreach ($links as $link) {
                         $row->cells[2]->text .= $OUTPUT->link($link);
                     }
             $displaylist['groupextendenrol.php'] = get_string('groupextendenrol');
         }
 
-        helpbutton("participantswithselectedusers", get_string("withselectedusers"));
+        echo $OUTPUT->help_icon(moodle_help_icon::make("participantswithselectedusers", get_string("withselectedusers")));
         $select = new html_select();
         $select->options = $displaylist;
         $select->name = "formaction";
index c0ac6c7aa6b1aade8179ee940666ddb351c8c0e5..20028e99754dc4515aae538d3c5cf168ebe2bff8 100644 (file)
@@ -2,7 +2,7 @@
 <input type="hidden" name="id" value="<?php p($id) ?>" />
 <input type="hidden" name="returnto" value="<?php p($returnto) ?>" />
 <input type="hidden" name="deluser" value="" />
-<?php print_simple_box_start("center", ""); ?>
+<?php echo $OUTPUT->box_start(); ?>
 <table border="0" cellpadding="5">
 <tr valign="top">
     <td align="right"><b>
 <tr valign="top">
     <td align="right" valign="middle" nowrap="nowrap">
      <?php
-        helpbutton("reading", get_string("helpreading"), "moodle", true, true);
+        echo $OUTPUT->help_icon(moodle_help_icon::make("reading", get_string("helpreading"), "moodle", true));
         echo "<br />";
-        helpbutton("writing", get_string("helpwriting"), "moodle", true, true);
+        echo $OUTPUT->help_icon(moodle_help_icon::make("writing", get_string("helpwriting"), "moodle", true));
         echo "<br />";
-        helpbutton("questions", get_string("helpquestions"), "moodle", true, true);
+        echo $OUTPUT->help_icon(moodle_help_icon::make("questions", get_string("helpquestions"), "moodle", true));
         echo "<br />";
         if ($usehtmleditor) {
-           helpbutton("richtext2", get_string("helprichtext"), "moodle", true, true);
+           echo $OUTPUT->help_icon(moodle_help_icon::make("richtext2", get_string("helprichtext"), "moodle", true));
         } else {
            emoticonhelpbutton("theform", "message");
         }
         } else {
             choose_from_menu(format_text_menu(), "format", $format, "");
         }
-        helpbutton("textformat", get_string("helpformatting"));
+        echo $OUTPUT->help_icon(moodle_help_icon::make("textformat", get_string("helpformatting")));
      ?>
     </td>
 </tr>
 
 <tr><td align="center" colspan="2"><input type="submit" name="preview" value="<?php print_string('preview'); ?>" /></td></tr>
 </table>
-<?php print_simple_box_end(); ?>
+<?php echo $OUTPUT->box_end(); ?>
 <table align="center"><tr><th colspan="4" scope="row"><?php print_string('currentlyselectedusers'); ?></th></tr>
 <?php
     if (count($SESSION->emailto[$id])) {
index 944c305fa53dae521dc1c80c6b8cfb4003d76d17..0304a426c39ac78438083bb8497bf724048bd5e6 100644 (file)
@@ -73,7 +73,7 @@
 
     // if messaging is disabled on site, we can still allow users with capabilities to send emails instead
     if (empty($CFG->messaging)) {
-        notify(get_string('messagingdisabled','message'));  
+        echo $OUTPUT->notification(get_string('messagingdisabled','message'));
     }
 
     if ($count) {
             echo $OUTPUT->footer();
             exit;
         } else {
-            notify(get_string('nousersyet'));
+            echo $OUTPUT->notification(get_string('nousersyet'));
         }
     }
 
     echo '<p align="center"><a href="'.$returnto.'">'.get_string("keepsearching").'</a>'.((count($SESSION->emailto[$id])) ? ', '.get_string('usemessageform') : '').'</p>';
 
     if ((!empty($send) || !empty($preview) || !empty($edit)) && (empty($messagebody))) {
-        notify(get_string('allfieldsrequired'));
+        echo $OUTPUT->notification(get_string('allfieldsrequired'));
     }
 
     if (count($SESSION->emailto[$id])) {
index 606accf387ba61fabcdfce78ff3d22cf4e9e2312..93d80b43df1061825b46016a21b7bdcd9d00041b 100644 (file)
@@ -62,9 +62,9 @@ if (!empty($config)) {
         exit;
     } else {
         echo $OUTPUT->heading(get_string('configplugin', 'portfolio'));
-        print_simple_box_start();
+        echo $OUTPUT->box_start();
         $mform->display();
-        print_simple_box_end();
+        echo $OUTPUT->box_end();
         $display = false;
     }
 
@@ -75,7 +75,7 @@ if (!empty($config)) {
 
 if ($display) {
     echo $OUTPUT->heading($configstr);
-    print_simple_box_start();
+    echo $OUTPUT->box_start();
 
     if (!$instances = portfolio_instances(true, false)) {
         print_error('noinstances', 'portfolio', $CFG->wwwroot . '/user/view.php');
index 0a6f6df4f0c4b27438809f045d0a49c2f2335321..f2388839b0f6d23f2fa4b1c0040ad9c701763bbe 100644 (file)
@@ -126,7 +126,7 @@ foreach ($categories as $category) {
     if (count($table->data)) {
         print_table($table);
     } else {
-        notify($strnofields);
+        echo $OUTPUT->notification($strnofields);
     }
 
 } /// End of $categories foreach
index 6107c97aa819ad6301fe1fbc3c15aeefc15da2bb..a2b42a362269efa1d2e9ffaa0c4a1ea4debe423c 100644 (file)
@@ -33,7 +33,7 @@ $currenttab = 'repositories';
 include('tabs.php');
 
 echo $OUTPUT->heading($configstr);
-print_simple_box_start();
+echo $OUTPUT->box_start();
 
 if (!$instances = repository::get_instances($COURSE->context, $USER->id)) {
     print_error('noinstances', 'repository', $CFG->wwwroot . '/user/view.php');
index 010488d80ffdf560229b5f42ca4d3bc1ecbfa272..8d2da76cc8d1172b3f37cc8a0f490011353232ea 100644 (file)
 
     if ($currenttab == 'editprofile' && ($user->id == $USER->id) && user_not_fully_set_up($USER)) {
         /// We're being forced here to fix profile
-      notify(get_string('moreprofileinfoneeded'));
+      echo $OUTPUT->notification(get_string('moreprofileinfoneeded'));
     } else {
       /// Print out the tabs and continue!
       print_tabs($tabs, $currenttab, $inactive, $activetwo);
index b0b2741fcfdda74e5ab640eb43b008db7a41748d..6e22971327470cbad1711ec63dc91726b7a67bc0 100644 (file)
                     print_header("$strpersonalprofile: ", "$strpersonalprofile: ", $navigation, "", "", true, "&nbsp;", navmenu($course));
                     echo $OUTPUT->heading(get_string('notenrolledprofile'));
                 }
-                print_continue($_SERVER['HTTP_REFERER']);
+                echo $OUTPUT->continue_button($_SERVER['HTTP_REFERER']);
                 echo $OUTPUT->footer();
                 exit;
             }