Skip to content

Commit

Permalink
MDL-21695 renaming ->help_icon() to old_help_icon() and going to intr…
Browse files Browse the repository at this point in the history
…oduce new help_icon() with new parameters and detailed debugging - hopefully this will help during the conversion to new help
  • Loading branch information
skodak committed Apr 13, 2010
1 parent 9f9193f commit 596509e
Show file tree
Hide file tree
Showing 55 changed files with 116 additions and 116 deletions.
2 changes: 1 addition & 1 deletion admin/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@
$lastcron = $DB->get_field_sql('SELECT MAX(lastcron) FROM {modules}');
if (time() - $lastcron > 3600 * 24) {
$strinstallation = get_string('installation', 'install');
$helpbutton = $OUTPUT->help_icon('install', $strinstallation);
$helpbutton = $OUTPUT->old_help_icon('install', $strinstallation);
echo $OUTPUT->box(get_string('cronwarning', 'admin').' '.$helpbutton, 'generalbox adminwarning');
}

Expand Down
2 changes: 1 addition & 1 deletion admin/roles/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,7 @@ public function display() {
protected function add_header_cells() {
global $OUTPUT;
echo '<th colspan="' . count($this->displaypermissions) . '" scope="col">' .
get_string('permission', 'role') . ' ' . $OUTPUT->help_icon('permissions', get_string('permissions', 'role')) . '</th>';
get_string('permission', 'role') . ' ' . $OUTPUT->old_help_icon('permissions', get_string('permissions', 'role')) . '</th>';
echo '<th class="risk" colspan="' . count($this->allrisks) . '" scope="col">' . get_string('risks','role') . '</th>';
}

Expand Down
2 changes: 1 addition & 1 deletion admin/roles/manage.php
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@
$table->wrap = array('nowrap', '', 'nowrap','nowrap');
$table->width = '90%';
$table->head = array(
get_string('role') . ' ' . $OUTPUT->help_icon('roles', get_string('roles')),
get_string('role') . ' ' . $OUTPUT->old_help_icon('roles', get_string('roles')),
get_string('description'),
get_string('shortname'),
get_string('edit')
Expand Down
2 changes: 1 addition & 1 deletion backup/backup_form.html
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@
echo "<tr>";
echo "<td align=\"right\" colspan=\"2\"><b>";
echo '<label for="menubackup_site_files">'.get_string ("sitefilesused").'</label>';
echo $OUTPUT->help_icon('sitefilesused', get_string('sitefilesused'));
echo $OUTPUT->old_help_icon('sitefilesused', get_string('sitefilesused'));
echo "</b></td><td colspan=\"2\">";
$course_file_options[0] = get_string("no");
$course_file_options[1] = get_string("yes");
Expand Down
8 changes: 4 additions & 4 deletions backup/restore_form.html
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@
echo '<label for="shortnamefield">'.get_string ('shortname').'</label>';
echo "</td>";
echo "<td><input type=\"text\" id=\"shortnamefield\" name=\"shortname\" maxlength=\"100\" size=\"20\" value=\"".s($form1->shortname)."\" alt=\"".get_string("shortname")."\" />" ;
echo $OUTPUT->help_icon("courseshortname", get_string("shortname"));
echo $OUTPUT->old_help_icon("courseshortname", get_string("shortname"));
if (isset($err["shortname"])) echo $OUTPUT->error_text($err["shortname"]);
echo "</td>";
echo "</tr>";
Expand All @@ -274,7 +274,7 @@
echo '<label for="fullnamefield">'.get_string ('fullname').'</label>';
echo "</td>";
echo "<td><input type=\"text\" id=\"fullnamefield\" name=\"fullname\" maxlength=\"254\" size=\"50\" value=\"".s($form1->fullname)."\" alt=\" ".get_string("fullname")."\" />" ;
echo $OUTPUT->help_icon("coursefullname", get_string("fullname"));
echo $OUTPUT->old_help_icon("coursefullname", get_string("fullname"));
if (isset($err["fullname"])) echo $OUTPUT->error_text($err["fullname"]);
echo"</td></tr>";
} else {
Expand All @@ -299,7 +299,7 @@
$yearselector = html_writer::select_time('years', "startyear", $form1->startdate);

echo $dayselector . $monthselector . $yearselector;
echo $OUTPUT->help_icon("coursestartdate", get_string("startdate"));
echo $OUTPUT->old_help_icon("coursestartdate", get_string("startdate"));
} else {
print_string('notavailable');
echo '<input type="hidden" name="startyear" value="0" />';
Expand Down Expand Up @@ -459,7 +459,7 @@
//Now print the Groups tr (assume there is no $info->backup_groups)
echo "<tr>";
echo "<td align=\"right\" colspan=\"2\"><b>";
$helplink = $OUTPUT->help_icon('grouprestore', get_string('groups'));
$helplink = $OUTPUT->old_help_icon('grouprestore', get_string('groups'));
echo '<label for="menurestore_groups">'.get_string ("groups").'</label>'.$helplink;
echo "</b></td><td colspan=\"2\">";
$group_options[RESTORE_GROUPS_NONE] = get_string('none');
Expand Down
2 changes: 1 addition & 1 deletion blocks/search_forums/block_search_forums.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ function get_content() {
'<input id="searchform_search" name="search" type="text" size="16" />';
$this->content->text .= '<button id="searchform_button" type="submit" title="'.$search.'">'.$button.'</button><br />';
$this->content->text .= '<a href="'.$CFG->wwwroot.'/mod/forum/search.php?id='.$this->page->course->id.'">'.$advancedsearch.'</a>';
$this->content->text .= $OUTPUT->help_icon('search', $advancedsearch);
$this->content->text .= $OUTPUT->old_help_icon('search', $advancedsearch);
$this->content->text .= '</fieldset></form></div>';

return $this->content;
Expand Down
2 changes: 1 addition & 1 deletion blocks/tags/block_tags.php
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ function get_content() {
$tagthisunit = get_string('tagthisunit', $tagslang);
$buttonadd = get_string('add', $tagslang);
$arrowtitle = get_string('arrowtitle', $tagslang);
$coursetaghelpbutton = $OUTPUT->help_icon('addtags', 'adding tags', $tagslang);
$coursetaghelpbutton = $OUTPUT->old_help_icon('addtags', 'adding tags', $tagslang);
$sesskey = sesskey();
$arrowright = $OUTPUT->pix_url('t/arrow_left');
$this->content->footer .= <<<EOT
Expand Down
4 changes: 2 additions & 2 deletions course/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -1647,13 +1647,13 @@ function print_section_add_menus($course, $section, $modnames, $vertical=false,

if (!empty($resources)) {
$select = new url_select($resources, '', array(''=>$straddresource), "ressection$section");
$select->set_help_icon('resource/types', $straddresource);
$select->set_old_help_icon('resource/types', $straddresource);
$output .= $OUTPUT->render($select);
}

if (!empty($activities)) {
$select = new url_select($activities, '', array(''=>$straddactivity), "section$section");
$select->set_help_icon('mods', $straddactivity);
$select->set_old_help_icon('mods', $straddactivity);
$output .= $OUTPUT->render($select);
}

Expand Down
4 changes: 2 additions & 2 deletions course/report/participation/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@
echo html_writer::select($roleoptions,'roleid',$roleid,false);
echo '<label for="menuaction">'.get_string('showactions').'</label>'."\n";
echo html_writer::select($actionoptions,'action',$action,false);
echo $OUTPUT->help_icon('participationreport', get_string('participationreport'));
echo $OUTPUT->old_help_icon('participationreport', get_string('participationreport'));
echo '<input type="submit" value="'.get_string('go').'" />'."\n</div></form>\n";

$baseurl = $CFG->wwwroot.'/course/report/participation/index.php?id='.$course->id.'&amp;roleid='
Expand Down Expand Up @@ -277,7 +277,7 @@
echo '<label for="formaction">'.get_string("withselectedusers").'</label>';
$displaylist['messageselect.php'] = get_string('messageselectadd');
echo html_writer::select($displaylist, 'formaction', '', array(''=>'choosedots'), array('id'=>'formactionselect'));
echo $OUTPUT->help_icon("participantswithselectedusers", get_string("withselectedusers"));
echo $OUTPUT->old_help_icon("participantswithselectedusers", get_string("withselectedusers"));
echo '<input type="submit" value="' . get_string('ok') . '" />'."\n";
echo '</div>';
echo '</div>'."\n";
Expand Down
8 changes: 4 additions & 4 deletions enrol/authorize/config_form.php
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@
<tr valign="top">
<td align="right">an_authcode:</td>
<td><?php echo html_writer::checkbox('an_authcode', '1', !empty($frm->an_authcode), get_string("adminauthcode", "enrol_authorize")); ?>
<?php echo $OUTPUT->help_icon('authorize/authcode', 'authcode', 'enrol'); ?><br />
<?php echo $OUTPUT->old_help_icon('authorize/authcode', 'authcode', 'enrol'); ?><br />
</td>
</tr>

Expand Down Expand Up @@ -174,20 +174,20 @@
</tr>

<tr valign="top"><td colspan="2"><h4><?php print_string("adminauthorizeccapture", "enrol_authorize") ?>
<?php echo $OUTPUT->help_icon('authorize/orderreview', 'orderreview', 'enrol'); ?>
<?php echo $OUTPUT->old_help_icon('authorize/orderreview', 'orderreview', 'enrol'); ?>
</h4></td></tr>

<tr valign="top">
<td align="right">an_review:</td>
<td><?php echo html_writer::checkbox('an_review', '1', !empty($frm->an_review), get_string("adminreview", "enrol_authorize")); ?>
<?php echo $OUTPUT->help_icon('authorize/review', get_string('adminhelpreviewtitle', 'enrol_authorize'), 'enrol'); ?><br />
<?php echo $OUTPUT->old_help_icon('authorize/review', get_string('adminhelpreviewtitle', 'enrol_authorize'), 'enrol'); ?><br />
</td>
</tr>

<tr valign="top">
<td align="right">an_capture_day:</td>
<td><input type="text" name="an_capture_day" size="2" maxlength="2" value="<?php p($frm->an_capture_day) ?>" />
<?php echo $OUTPUT->help_icon('authorize/captureday', get_string('adminhelpcapturetitle', 'enrol_authorize'), 'enrol'); ?><br />
<?php echo $OUTPUT->old_help_icon('authorize/captureday', get_string('adminhelpcapturetitle', 'enrol_authorize'), 'enrol'); ?><br />
<?php print_string("reviewday", "enrol_authorize", $frm->an_capture_day) ?></td>
</tr>

Expand Down
18 changes: 9 additions & 9 deletions enrol/imsenterprise/config.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
<input type="checkbox" value="1" name="enrol_createnewusers" <?php if ($frm->enrol_createnewusers) echo "checked=\"checked\"" ?> />
</td>
<td>
<?php echo $OUTPUT->help_icon('createnewusers', 'More detail about this option', 'enrol/imsenterprise'); ?>
<?php echo $OUTPUT->old_help_icon('createnewusers', 'More detail about this option', 'enrol/imsenterprise'); ?>
</td>
</tr>

Expand All @@ -48,7 +48,7 @@
<input type="checkbox" value="1" name="enrol_imsdeleteusers" <?php if ($frm->enrol_imsdeleteusers) echo "checked=\"checked\"" ?> />
</td>
<td>
<?php echo $OUTPUT->help_icon('deleteusers', 'More detail about this option', 'enrol/imsenterprise'); ?>
<?php echo $OUTPUT->old_help_icon('deleteusers', 'More detail about this option', 'enrol/imsenterprise'); ?>
</td>
</tr>

Expand Down Expand Up @@ -78,7 +78,7 @@
<input type="checkbox" value="1" name="enrol_imssourcedidfallback" <?php if ($frm->enrol_imssourcedidfallback) echo "checked=\"checked\"" ?> />
</td>
<td>
<?php echo $OUTPUT->help_icon('sourceddidfallback', 'More detail about this option', 'enrol/imsenterprise'); ?>
<?php echo $OUTPUT->old_help_icon('sourceddidfallback', 'More detail about this option', 'enrol/imsenterprise'); ?>
</td>
</tr>
<!--
Expand Down Expand Up @@ -138,7 +138,7 @@
<input type="text" <?php echo 'value="'.intval($frm->enrol_truncatecoursecodes).'"' ?> name="enrol_truncatecoursecodes" size="3" maxlength="3" />
</td>
<td>
<?php echo $OUTPUT->help_icon('truncatecoursecodes', 'More detail about this option', 'enrol/imsenterprise'); ?>
<?php echo $OUTPUT->old_help_icon('truncatecoursecodes', 'More detail about this option', 'enrol/imsenterprise'); ?>
</td>
</tr>

Expand All @@ -148,7 +148,7 @@
<input type="checkbox" value="1" name="enrol_createnewcourses" <?php if ($frm->enrol_createnewcourses) echo "checked=\"checked\"" ?> />
</td>
<td>
<?php echo $OUTPUT->help_icon('createnewcourses', 'More detail about this option', 'enrol/imsenterprise'); ?>
<?php echo $OUTPUT->old_help_icon('createnewcourses', 'More detail about this option', 'enrol/imsenterprise'); ?>
</td>
</tr>

Expand All @@ -158,7 +158,7 @@
<input type="checkbox" value="1" name="enrol_createnewcategories" <?php if ($frm->enrol_createnewcategories) echo "checked=\"checked\"" ?> />
</td>
<td>
<?php echo $OUTPUT->help_icon('categorisation', 'More detail about this option', 'enrol/imsenterprise'); ?>
<?php echo $OUTPUT->old_help_icon('categorisation', 'More detail about this option', 'enrol/imsenterprise'); ?>
</td>
</tr>

Expand All @@ -168,7 +168,7 @@
<input type="checkbox" value="1" name="enrol_imsunenrol" <?php if ($frm->enrol_imsunenrol) echo "checked=\"checked\"" ?> />
</td>
<td>
<?php echo $OUTPUT->help_icon('unenrol', 'More detail about this option', 'enrol/imsenterprise'); ?>
<?php echo $OUTPUT->old_help_icon('unenrol', 'More detail about this option', 'enrol/imsenterprise'); ?>
</td>
</tr>

Expand All @@ -180,7 +180,7 @@
<td align="right"><?php print_string('restricttarget', 'enrol_imsenterprise') ?>:</td>
<td colspan="2">
<input type="text" <?php echo 'value="'.htmlspecialchars($frm->enrol_imsrestricttarget).'"' ?> name="enrol_imsrestricttarget" size="20" maxlength="32" />
<?php echo $OUTPUT->help_icon('target', 'More detail about this option', 'enrol/imsenterprise'); ?>
<?php echo $OUTPUT->old_help_icon('target', 'More detail about this option', 'enrol/imsenterprise'); ?>
</td>
</tr>

Expand All @@ -190,7 +190,7 @@
<input type="checkbox" value="1" name="enrol_imscapitafix" <?php if ($frm->enrol_imscapitafix) echo "checked=\"checked\"" ?> />
</td>
<td>
<?php echo $OUTPUT->help_icon('capita', 'More detail about this option', 'enrol/imsenterprise'); ?>
<?php echo $OUTPUT->old_help_icon('capita', 'More detail about this option', 'enrol/imsenterprise'); ?>
</td>
</tr>

Expand Down
20 changes: 10 additions & 10 deletions grade/edit/tree/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -621,7 +621,7 @@ public function __construct($params) {
public function get_header_cell() {
global $OUTPUT;
$headercell = clone($this->headercell);
$headercell->text = get_string('aggregation', 'grades').$OUTPUT->help_icon('aggregation', 'aggregation', 'grade');
$headercell->text = get_string('aggregation', 'grades').$OUTPUT->old_help_icon('aggregation', 'aggregation', 'grade');
return $headercell;
}

Expand Down Expand Up @@ -677,7 +677,7 @@ class grade_edit_tree_column_extracredit extends grade_edit_tree_column {
public function get_header_cell() {
global $OUTPUT;
$headercell = clone($this->headercell);
$headercell->text = get_string('extracredit', 'grades').$OUTPUT->help_icon('aggregationcoefcombo', 'aggregationcoefcombo', 'grade');
$headercell->text = get_string('extracredit', 'grades').$OUTPUT->old_help_icon('aggregationcoefcombo', 'aggregationcoefcombo', 'grade');
return $headercell;
}

Expand Down Expand Up @@ -719,7 +719,7 @@ class grade_edit_tree_column_weight extends grade_edit_tree_column {
public function get_header_cell() {
global $OUTPUT;
$headercell = clone($this->headercell);
$headercell->text = get_string('weightuc', 'grades').$OUTPUT->help_icon('aggregationcoefweight', 'aggregationcoefweight', 'grade');
$headercell->text = get_string('weightuc', 'grades').$OUTPUT->old_help_icon('aggregationcoefweight', 'aggregationcoefweight', 'grade');
return $headercell;
}

Expand Down Expand Up @@ -814,7 +814,7 @@ public function get_header_cell() {
$headercell = clone($this->headercell);
$headercell->style .= 'width: 40px;';
$headercell->text = get_string('aggregateonlygraded', 'grades')
. $OUTPUT->help_icon('aggregateonlygraded', 'aggregateonlygraded', 'grade');
. $OUTPUT->old_help_icon('aggregateonlygraded', 'aggregateonlygraded', 'grade');
return $headercell;
}

Expand Down Expand Up @@ -851,7 +851,7 @@ public function get_header_cell() {
$headercell = clone($this->headercell);
$headercell->style .= 'width: 40px;';
$headercell->text = get_string('aggregatesubcats', 'grades')
.$OUTPUT->help_icon('aggregatesubcats', 'aggregatesubcats', 'grade');
.$OUTPUT->old_help_icon('aggregatesubcats', 'aggregatesubcats', 'grade');
return $headercell;
}

Expand Down Expand Up @@ -889,7 +889,7 @@ public function get_header_cell() {
$headercell = clone($this->headercell);
$headercell->style .= 'width: 40px;';
$headercell->text = get_string('aggregateoutcomes', 'grades')
.$OUTPUT->help_icon('aggregateoutcomes', 'aggregateoutcomes', 'grade');
.$OUTPUT->old_help_icon('aggregateoutcomes', 'aggregateoutcomes', 'grade');
return $headercell;
}

Expand Down Expand Up @@ -933,7 +933,7 @@ public function __construct($params) {
public function get_header_cell() {
global $OUTPUT;
$headercell = clone($this->headercell);
$headercell->text = get_string('droplow', 'grades').$OUTPUT->help_icon('droplow', 'droplow', 'grade');
$headercell->text = get_string('droplow', 'grades').$OUTPUT->old_help_icon('droplow', 'droplow', 'grade');
return $headercell;
}

Expand Down Expand Up @@ -966,7 +966,7 @@ public function __construct($params) {
public function get_header_cell() {
global $OUTPUT;
$headercell = clone($this->headercell);
$headercell->text = get_string('keephigh', 'grades').$OUTPUT->help_icon('keephigh', 'keephigh', 'grade');
$headercell->text = get_string('keephigh', 'grades').$OUTPUT->old_help_icon('keephigh', 'keephigh', 'grade');
return $headercell;
}

Expand Down Expand Up @@ -999,7 +999,7 @@ public function __construct($params) {
public function get_header_cell() {
global $OUTPUT;
$headercell = clone($this->headercell);
$headercell->text = get_string('multfactor', 'grades').$OUTPUT->help_icon('multfactor', 'multfactor', 'grade');
$headercell->text = get_string('multfactor', 'grades').$OUTPUT->old_help_icon('multfactor', 'multfactor', 'grade');
return $headercell;
}

Expand Down Expand Up @@ -1040,7 +1040,7 @@ class grade_edit_tree_column_plusfactor extends grade_edit_tree_column {
public function get_header_cell() {
global $OUTPUT;
$headercell = clone($this->headercell);
$headercell->text = get_string('plusfactor', 'grades').$OUTPUT->help_icon('plusfactor', 'plusfactor', 'grade');
$headercell->text = get_string('plusfactor', 'grades').$OUTPUT->old_help_icon('plusfactor', 'plusfactor', 'grade');
return $headercell;
}

Expand Down
2 changes: 1 addition & 1 deletion lib/completionlib.php
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ public function print_help_icon() {
global $PAGE, $OUTPUT;
if ($this->is_enabled() && !$PAGE->user_is_editing() && isloggedin() && !isguestuser()) {
echo '<span id = "completionprogressid" class="completionprogress">'.get_string('yourprogress','completion').' ';
echo $OUTPUT->help_icon('completionicons',get_string('completionicons','completion'),'completion');
echo $OUTPUT->old_help_icon('completionicons',get_string('completionicons','completion'),'completion');
echo '</span>';
}
}
Expand Down
6 changes: 3 additions & 3 deletions lib/deprecatedlib.php
Original file line number Diff line number Diff line change
Expand Up @@ -2733,11 +2733,11 @@ function print_textarea($usehtmleditor, $rows, $cols, $width, $height, $name, $v
* @return string|void Depending on value of $return
*/
function helpbutton($page, $title, $module='moodle', $image=true, $linktext=false, $text='', $return=false, $imagetext='') {
debugging('helpbutton() has been deprecated. Please change your code to use $OUTPUT->help_icon().');
debugging('helpbutton() has been deprecated. Please change your code to use $OUTPUT->old_help_icon().');

global $OUTPUT;

$output = $OUTPUT->help_icon($page, $title, $module, $linktext);
$output = $OUTPUT->old_help_icon($page, $title, $module, $linktext);

// hide image with CSS if needed

Expand Down Expand Up @@ -3291,7 +3291,7 @@ function popup_form($baseurl, $options, $formid, $selected='', $nothing='choose'
$select->disabled = $disabled;

$select->set_label($selectlabel);
$select->set_help_icon($help, $helptext);
$select->set_old_help_icon($help, $helptext);

$output = $OUTPUT->render($select);

Expand Down
Loading

0 comments on commit 596509e

Please sign in to comment.