mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
MDL-21217, MDL-21198 simplified/improved outputlib help icon related apis + several fixed regresions
This commit is contained in:
parent
48a67d9f01
commit
4bcc51185c
113 changed files with 442 additions and 970 deletions
|
@ -1009,7 +1009,7 @@ class assignment_base {
|
|||
} else {
|
||||
echo '<div class="format">';
|
||||
echo $OUTPUT->select(html_select::make(format_text_menu(), "format", $submission->format, false));
|
||||
echo $OUTPUT->help_icon(moodle_help_icon::make("textformat", get_string("helpformatting")));
|
||||
echo $OUTPUT->help_icon("textformat", get_string("helpformatting"));
|
||||
echo '</div>';
|
||||
}
|
||||
}
|
||||
|
@ -1418,7 +1418,7 @@ class assignment_base {
|
|||
echo '<label for="mailinfo">'.get_string('enableemailnotification','assignment').'</label>';
|
||||
echo '<input type="hidden" name="mailinfo" value="0" />';
|
||||
echo '<input type="checkbox" id="mailinfo" name="mailinfo" value="1" '.$lastmailinfo.' />';
|
||||
echo $OUTPUT->help_icon(moodle_help_icon::make('emailnotification', get_string('enableemailnotification', 'assignment'), 'assignment')).'</p></div>';
|
||||
echo $OUTPUT->help_icon('emailnotification', get_string('enableemailnotification', 'assignment'), 'assignment').'</p></div>';
|
||||
echo '</div>';
|
||||
echo '<div class="fastgbutton"><input type="submit" name="fastg" value="'.get_string('saveallfeedback', 'assignment').'" /></div>';
|
||||
echo '</div>';
|
||||
|
@ -1436,7 +1436,7 @@ class assignment_base {
|
|||
echo '</td>';
|
||||
echo '<td>';
|
||||
echo '<input type="text" id="perpage" name="perpage" size="1" value="'.$perpage.'" />';
|
||||
echo $OUTPUT->help_icon(moodle_help_icon::make('pagesize', get_string('pagesize','assignment'), 'assignment'));
|
||||
echo $OUTPUT->help_icon('pagesize', get_string('pagesize','assignment'), 'assignment');
|
||||
echo '</td></tr>';
|
||||
echo '<tr><td>';
|
||||
echo '<label for="quickgrade">'.get_string('quickgrade','assignment').'</label>';
|
||||
|
@ -1444,7 +1444,7 @@ class assignment_base {
|
|||
echo '<td>';
|
||||
$checked = $quickgrade ? 'checked="checked"' : '';
|
||||
echo '<input type="checkbox" id="quickgrade" name="quickgrade" value="1" '.$checked.' />';
|
||||
echo $OUTPUT->help_icon(moodle_help_icon::make('quickgrade', get_string('quickgrade', 'assignment'), 'assignment')).'</p></div>';
|
||||
echo $OUTPUT->help_icon('quickgrade', get_string('quickgrade', 'assignment'), 'assignment').'</p></div>';
|
||||
echo '</td></tr>';
|
||||
echo '<tr><td colspan="2">';
|
||||
echo '<input type="submit" value="'.get_string('savepreferences').'" />';
|
||||
|
|
|
@ -42,8 +42,8 @@ echo $OUTPUT->header();
|
|||
<form action="../empty.php" method="post" target="empty" id="inputForm"
|
||||
onsubmit="return empty_field_and_submit()" style="margin:0">
|
||||
<input type="text" id="input_chat_message" name="chat_message" size="50" value="" />
|
||||
<?php echo $OUTPUT->help_icon(moodle_help_icon::make('chatting', get_string('helpchatting', 'chat'), 'chat', true)); ?><br />
|
||||
<input type="checkbox" id="auto" size="50" value="" checked='true' /><label for="auto"><?php echo get_string('autoscroll', 'chat');?></label>
|
||||
<?php echo $OUTPUT->help_icon('chatting', get_string('helpchatting', 'chat'), 'chat', true); ?><br />
|
||||
<input type="checkbox" id="auto" size="50" value="" checked="checked" /><label for="auto"><?php echo get_string('autoscroll', 'chat');?></label>
|
||||
</form>
|
||||
|
||||
<form action="insert.php" method="post" target="empty" id="sendForm">
|
||||
|
|
|
@ -29,7 +29,7 @@ echo $OUTPUT->header();
|
|||
<form action="../empty.php" method="get" target="empty" id="inputform"
|
||||
onsubmit="return empty_field_and_submit();">
|
||||
<input type="text" name="chat_message" id="chat_message" size="60" value="" />
|
||||
<?php echo $OUTPUT->help_icon(moodle_help_icon::make("chatting", get_string("helpchatting", "chat"), "chat", true)); ?>
|
||||
<?php echo $OUTPUT->help_icon("chatting", get_string("helpchatting", "chat"), "chat", true); ?>
|
||||
</form>
|
||||
|
||||
<form action="<?php echo "http://$CFG->chat_serverhost:$CFG->chat_serverport/"; ?>" method="get" target="empty" id="sendform">
|
||||
|
|
|
@ -333,7 +333,7 @@ if (has_capability('mod/data:manageentries',$context)) {
|
|||
echo '<tr>';
|
||||
echo '<td align="right">'.get_string('csvfile', 'data').':</td>';
|
||||
echo '<td><input type="file" name="recordsfile" size="30" />';
|
||||
echo $OUTPUT->help_icon(moodle_help_icon::make('importcsv', get_string('csvimport', 'data'), 'data'));
|
||||
echo $OUTPUT->help_icon('importcsv', get_string('csvimport', 'data'), 'data');
|
||||
echo '</td><tr>';
|
||||
echo '<td align="right">'.get_string('fielddelimiter', 'data').':</td>';
|
||||
echo '<td><input type="text" name="fielddelimiter" size="6" />';
|
||||
|
|
|
@ -306,7 +306,7 @@ if (($mode == 'new') && (!empty($newtype)) && confirm_sesskey()) { ///
|
|||
echo '<label for="fieldform_jump">'.get_string('newfield','data').'</label>';
|
||||
$popupurl = $CFG->wwwroot.'/mod/data/field.php?d='.$data->id.'&mode=new&sesskey='. sesskey();
|
||||
echo $OUTPUT->select(html_select::make_popup_form($popupurl, 'newtype', $menufield, "fieldform"));
|
||||
echo $OUTPUT->help_icon(moodle_help_icon::make('fields', get_string('addafield','data'), 'data'));
|
||||
echo $OUTPUT->help_icon('fields', get_string('addafield','data'), 'data');
|
||||
echo '</div>';
|
||||
|
||||
echo '<div class="sortdefault">';
|
||||
|
|
|
@ -73,7 +73,7 @@ class data_field_textarea extends data_field_base {
|
|||
$str .= '<option value="'.s($key).'" '.$selected.'>'.$desc.'</option>';
|
||||
}
|
||||
$str .= '</select>';
|
||||
$str .= $OUTPUT->help_icon(moodle_help_icon::make('textformat', get_string('helpformatting'), 'moodle'));
|
||||
$str .= $OUTPUT->help_icon('textformat', get_string('helpformatting'), 'moodle');
|
||||
$str .= '</div>';
|
||||
|
||||
$str .= '</div>';
|
||||
|
|
|
@ -1549,7 +1549,7 @@ function data_print_ratings($data, $record) {
|
|||
|
||||
if ($data->scale < 0) {
|
||||
if ($scale = $DB->get_record('scale', array('id'=>abs($data->scale)))) {
|
||||
echo $OUTPUT->help_button(moodle_help_icon::make_scale_menu($data->course, $scale));
|
||||
echo $OUTPUT->help_icon_scale($data->course, $scale);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2214,7 +2214,7 @@ class PresetImporter {
|
|||
|
||||
if (!empty($currentfields) && !empty($newfields)) {
|
||||
echo "<h3>$strfieldmappings ";
|
||||
echo $OUTPUT->help_icon(moodle_help_icon::make('fieldmappings', $strfieldmappings, 'data'));
|
||||
echo $OUTPUT->help_icon('fieldmappings', $strfieldmappings, 'data');
|
||||
echo '</h3><table>';
|
||||
|
||||
foreach ($newfields as $nid => $newfield) {
|
||||
|
|
|
@ -333,7 +333,7 @@ echo '<table class="presets" cellpadding="5">';
|
|||
echo '<tr><td valign="top" colspan="2" align="center"><h3>'.$strexport.'</h3></td></tr>';
|
||||
|
||||
echo '<tr><td><label>'.$strexportaszip.'</label>';
|
||||
echo $OUTPUT->help_icon(moodle_help_icon::make('exportzip', get_string('help'), 'data', false));
|
||||
echo $OUTPUT->help_icon('exportzip', get_string('help'), 'data', false);
|
||||
echo '</td><td>';
|
||||
$options = array();
|
||||
$options['sesskey'] = sesskey();
|
||||
|
@ -343,7 +343,7 @@ echo $OUTPUT->button(html_form::make_button('preset.php', $options, $strexport))
|
|||
echo '</td></tr>';
|
||||
|
||||
echo '<tr><td><label>'.$strsaveaspreset.'</label>';
|
||||
echo $OUTPUT->help_icon(moodle_help_icon::make('savepreset', get_string('help'), 'data', false));
|
||||
echo $OUTPUT->help_icon('savepreset', get_string('help'), 'data', false);
|
||||
echo '</td><td>';
|
||||
$options = array();
|
||||
$options['sesskey'] = sesskey();
|
||||
|
@ -353,7 +353,7 @@ echo $OUTPUT->button(html_form::make_button('preset.php', $options, $strsave));
|
|||
echo '</td></tr>';
|
||||
echo '<tr><td valign="top" colspan="2" align="center"><h3>'.$strimport.'</h3></td></tr>';
|
||||
echo '<tr><td><label for="fromfile">'.$strfromfile.'</label>';
|
||||
echo $OUTPUT->help_icon(moodle_help_icon::make('importfromfile', get_string('help'), 'data', true));
|
||||
echo $OUTPUT->help_icon('importfromfile', get_string('help'), 'data', true);
|
||||
echo '</td><td>';
|
||||
echo '<form id="uploadpreset" method="post" action="preset.php">';
|
||||
echo '<fieldset class="invisiblefieldset">';
|
||||
|
@ -366,7 +366,7 @@ echo '</fieldset></form>';
|
|||
echo '</td></tr>';
|
||||
|
||||
echo '<tr valign="top"><td><label>'.$strusestandard.'</label>';
|
||||
echo $OUTPUT->help_icon(moodle_help_icon::make('usepreset', get_string('help'), 'data', true));
|
||||
echo $OUTPUT->help_icon('usepreset', get_string('help'), 'data', true);
|
||||
echo '</td><td>';
|
||||
|
||||
echo '<form id="presets" method="post" action="preset.php" >';
|
||||
|
|
|
@ -203,7 +203,7 @@ echo '<tr><td valign="top">';
|
|||
if ($mode != 'csstemplate' and $mode != 'jstemplate') {
|
||||
// Add all the available fields for this data.
|
||||
echo '<label for="availabletags">'.get_string('availabletags','data').'</label>';
|
||||
echo $OUTPUT->help_icon(moodle_help_icon::make('tags', get_string('tags'), 'data'));
|
||||
echo $OUTPUT->help_icon('tags', get_string('tags'), 'data');
|
||||
echo '<br />';
|
||||
|
||||
|
||||
|
|
|
@ -142,11 +142,7 @@ if($check_anonymously) {
|
|||
echo '</table>';
|
||||
}
|
||||
}else {
|
||||
$helpicon = new moodle_help_icon();
|
||||
$helpicon->text = get_string('insufficient_responses_for_this_group', 'feedback');
|
||||
$helpicon->page = 'insufficient_responses';
|
||||
$helpicon->module = 'feedback';
|
||||
echo $OUTPUT->heading_with_help($helpicon);
|
||||
echo $OUTPUT->heading_with_help(get_string('insufficient_responses_for_this_group', 'feedback'), 'insufficient_responses', 'feedback');
|
||||
}
|
||||
echo '</td></tr></table></div>';
|
||||
echo $OUTPUT->box_end();
|
||||
|
|
|
@ -211,7 +211,7 @@ if($do_show == 'edit') {
|
|||
if(is_array($feedbackitems)){
|
||||
$itemnr = 0;
|
||||
|
||||
$helpbutton = $OUTPUT->help_icon(moodle_help_icon::make('preview', get_string('preview','feedback'), 'feedback',true));
|
||||
$helpbutton = $OUTPUT->help_icon('preview', get_string('preview','feedback'), 'feedback',true);
|
||||
|
||||
echo $OUTPUT->heading($helpbutton . get_string('preview', 'feedback'));
|
||||
if(isset($SESSION->feedback->moving) AND $SESSION->feedback->moving->shouldmoving == 1) {
|
||||
|
|
|
@ -97,14 +97,14 @@ if (($courses = $DB->get_records_sql_menu($sql, $params)) && !empty($searchcours
|
|||
echo ' ' . get_string('courses') . ': ';
|
||||
echo $OUTPUT->select(html_select::make ($courses, 'coursefilter', $coursefilter));
|
||||
echo '<input type="submit" value="'.get_string('mapcourse', 'feedback').'"/>';
|
||||
echo $OUTPUT->help_icon(moodle_help_icon::make('mapcourses', '', 'feedback', true));
|
||||
echo $OUTPUT->help_icon('mapcourses', '', 'feedback', true);
|
||||
echo '<input type="button" value="'.get_string('searchagain').'" onclick="document.location=\'mapcourse.php?id='.$id.'\'"/>';
|
||||
echo '<input type="hidden" name="searchcourse" value="'.$searchcourse.'"/>';
|
||||
echo '<input type="hidden" name="feedbackid" value="'.$feedback->id.'"/>';
|
||||
echo $OUTPUT->help_icon(moodle_help_icon::make('searchcourses', '', 'feedback', true));
|
||||
echo $OUTPUT->help_icon('searchcourses', '', 'feedback', true);
|
||||
} else {
|
||||
echo '<input type="text" name="searchcourse" value="'.$searchcourse.'"/> <input type="submit" value="'.get_string('searchcourses').'"/>';
|
||||
echo $OUTPUT->help_icon(moodle_help_icon::make('searchcourses', '', 'feedback', true));
|
||||
echo $OUTPUT->help_icon('searchcourses', '', 'feedback', true);
|
||||
}
|
||||
|
||||
echo '</form>';
|
||||
|
|
|
@ -112,7 +112,7 @@ if($do_show == 'showentries'){
|
|||
if($feedback->course == SITEID){
|
||||
echo '<div class="mdl-align"><a href="'.htmlspecialchars('analysis_course.php?id=' . $id . '&courseid='.$courseid).'">';
|
||||
echo get_string('course') .' '. get_string('analysis', 'feedback') . ' ('.get_string('completed_feedbacks', 'feedback').': '.intval($completedFeedbackCount).')</a>';
|
||||
echo $OUTPUT->help_icon(moodle_help_icon::make('viewcompleted', '', 'feedback', true));
|
||||
echo $OUTPUT->help_icon('viewcompleted', '', 'feedback', true);
|
||||
echo '</div>';
|
||||
}else {
|
||||
echo '<div class="mdl-align"><a href="'.htmlspecialchars('analysis.php?id=' . $id . '&courseid='.$courseid).'">';
|
||||
|
|
|
@ -136,7 +136,7 @@ if($capabilities->mapcourse) {
|
|||
echo '<input type="hidden" name="sesskey" value="'.sesskey().'" />';
|
||||
echo '<input type="hidden" name="id" value="'.$id.'" />';
|
||||
echo '<button type="submit">'.get_string('mapcourses', 'feedback').'</button>';
|
||||
echo $OUTPUT->help_icon(moodle_help_icon::make('mapcourse', '', 'feedback', true));
|
||||
echo $OUTPUT->help_icon('mapcourse', '', 'feedback', true);
|
||||
echo '</form>';
|
||||
echo '<br />';
|
||||
echo '</div>';
|
||||
|
|
|
@ -4212,7 +4212,7 @@ function forum_search_form($course, $search='') {
|
|||
$output = '<div class="forumsearch">';
|
||||
$output .= '<form action="'.$CFG->wwwroot.'/mod/forum/search.php" style="display:inline">';
|
||||
$output .= '<fieldset class="invisiblefieldset">';
|
||||
$output .= $OUTPUT->help_icon(moodle_help_icon::make('search', get_string('search')));
|
||||
$output .= $OUTPUT->help_icon('search', get_string('search'));
|
||||
$output .= '<input name="search" type="text" size="18" value="'.s($search, true).'" alt="search" />';
|
||||
$output .= '<input value="'.get_string('searchforums', 'forum').'" type="submit" />';
|
||||
$output .= '<input name="id" type="hidden" value="'.$course->id.'" />';
|
||||
|
@ -5890,7 +5890,7 @@ function forum_print_discussion($course, $cm, $forum, $discussion, $post, $mode,
|
|||
}
|
||||
if ($forum->scale < 0) {
|
||||
if ($scale = $DB->get_record("scale", array("id" => abs($forum->scale)))) {
|
||||
echo $OUTPUT->help_button(help_button::make_scale_menu($course->id, $scale));
|
||||
echo $OUTPUT->help_icon_scale($course->id, $scale);
|
||||
}
|
||||
}
|
||||
echo '</div>';
|
||||
|
@ -8051,10 +8051,7 @@ function forum_extend_settings_navigation($settingsnav, $module=null) {
|
|||
if (forum_is_forcesubscribed($forumobject)) {
|
||||
$notekey = $forum->add(get_string("forcessubscribe", 'forum'));
|
||||
$string = get_string('allowchoice', 'forum');
|
||||
$helpbutton = new moodle_help_icon();
|
||||
$helpbutton->page = "subscription";
|
||||
$helpbutton->text = $string;
|
||||
$helpbutton->module = "forum";
|
||||
$helpbutton = $OUTPUT->help_icon("subscription", $string, "forum");
|
||||
if (has_capability('mod/forum:managesubscriptions', $PAGE->cm->context)) {
|
||||
$url = new moodle_url($CFG->wwwroot.'/mod/forum/subscribe.php', array('id'=>$forumobject->id, 'force'=>'no'));
|
||||
$forum->add($string, $url, navigation_node::TYPE_SETTING);
|
||||
|
@ -8064,18 +8061,11 @@ function forum_extend_settings_navigation($settingsnav, $module=null) {
|
|||
} else if ($forumobject->forcesubscribe == FORUM_DISALLOWSUBSCRIBE) {
|
||||
$string = get_string('disallowsubscribe', 'forum');
|
||||
$notekey = $forum->add($string);
|
||||
$helpbutton = new moodle_help_icon();
|
||||
$helpbutton->page = "subscription";
|
||||
$helpbutton->text = $string;
|
||||
$helpbutton->module = "forum";
|
||||
$helpbutton = $OUTPUT->help_icon("subscription", $string, "forum");
|
||||
} else {
|
||||
$string = get_string("forcesubscribe", "forum");
|
||||
$notekey = $forum->add(get_string("allowsallsubscribe", 'forum'));
|
||||
|
||||
$helpbutton = new moodle_help_icon();
|
||||
$helpbutton->page = "subscription";
|
||||
$helpbutton->text = $string;
|
||||
$helpbutton->module = "forum";
|
||||
$helpbutton = $OUTPUT->help_icon("subscription", $string, "forum");
|
||||
|
||||
if (has_capability('mod/forum:managesubscriptions', $PAGE->cm->context)) {
|
||||
$url = new moodle_url($CFG->wwwroot.'/mod/forum/subscribe.php', array('id'=>$forumobject->id, 'force'=>'yes'));
|
||||
|
@ -8113,7 +8103,7 @@ function forum_extend_settings_navigation($settingsnav, $module=null) {
|
|||
if ($notekey!==false) {
|
||||
$forum->get($notekey)->add_class('note');
|
||||
if ($helpbutton!==false) {
|
||||
$forum->get($notekey)->helpbutton = $OUTPUT->help_icon($helpbutton);
|
||||
$forum->get($notekey)->helpbutton = $helpbutton;
|
||||
}
|
||||
}
|
||||
if (has_capability('moodle/course:manageactivities', $PAGE->cm->context)) {
|
||||
|
|
|
@ -175,7 +175,7 @@ class mod_forum_mod_form extends moodleform_mod {
|
|||
//we want the form to display them if they are set.
|
||||
if ($typevalue[0]=='news') {
|
||||
$type->addOption(get_string('namenews', 'forum'), 'news');
|
||||
$type->setHelpButton(array('forumtypenews', get_string('forumtype', 'forum'), 'forum'));
|
||||
$mform->setHelpButton('type', array('forumtypenews', get_string('forumtype', 'forum'), 'forum'));
|
||||
$type->freeze();
|
||||
$type->setPersistantFreeze(true);
|
||||
}
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
}
|
||||
?>><?php echo get_string("no") ?>
|
||||
</option>
|
||||
</select> <?php echo $OUTPUT->help_icon(moodle_help_icon::make("linkcategory", get_string("linkcategory", "glossary"), "glossary")) ?>
|
||||
</select> <?php echo $OUTPUT->help_icon("linkcategory", get_string("linkcategory", "glossary"), "glossary") ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
echo '(';
|
||||
print_string("maxsize", "", display_size(get_max_upload_file_size($CFG->maxbytes, $course->maxbytes)));
|
||||
echo ') ';
|
||||
echo $OUTPUT->help_icon(moodle_help_icon::make("filetoimport", get_string("filetoimport", "glossary"), "glossary"));
|
||||
echo $OUTPUT->help_icon("filetoimport", get_string("filetoimport", "glossary"), "glossary");
|
||||
?>
|
||||
</b></td>
|
||||
<td style="width:70%">
|
||||
|
@ -24,10 +24,10 @@
|
|||
<td style="width:25%"><select size="1" name="dest">
|
||||
<option selected="selected" value="current"><?php print_string("currentglossary","glossary") ?></option>
|
||||
<option value="new"><?php print_string("newglossary","glossary") ?></option>
|
||||
</select> <?php echo $OUTPUT->help_icon(moodle_help_icon::make("destination", get_string("destination", "glossary"), "glossary")) ?></td>
|
||||
</select> <?php echo $OUTPUT->help_icon("destination", get_string("destination", "glossary"), "glossary") ?></td>
|
||||
<td style="width:25%" align="right"><?php print_string("importcategories","glossary") ?>:</td>
|
||||
<td style="width:25%"><input type="checkbox" name="catsincl" value="1" alt="<?php print_string("importcategories","glossary") ?>" />
|
||||
<?php echo $OUTPUT->help_icon(moodle_help_icon::make("importcategories", get_string("importcategories", "glossary"), "glossary")) ?>
|
||||
<?php echo $OUTPUT->help_icon("importcategories", get_string("importcategories", "glossary"), "glossary") ?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
|
|
@ -500,7 +500,7 @@ if ($ratingsmenuused) {
|
|||
echo "<div class=\"boxaligncenter\"><input type=\"submit\" value=\"".get_string("sendinratings", "glossary")."\" />";
|
||||
if ($glossary->scale < 0) {
|
||||
if ($scale = $DB->get_record("scale", array("id"=>abs($glossary->scale)))) {
|
||||
echo $OUTPUT->help_button(help_button::make_scale_menu($course->id, $scale));
|
||||
echo $OUTPUT->help_icon_scale($course->id, $scale);
|
||||
}
|
||||
}
|
||||
echo "</div>";
|
||||
|
|
|
@ -548,7 +548,7 @@ function hotpot_print_report_selector(&$course, &$hotpot, &$formdata) {
|
|||
);
|
||||
|
||||
print '<tr><td>';
|
||||
echo $OUTPUT->help_icon(moodle_help_icon::make('reportcontent', get_string('reportcontent', 'hotpot'), 'hotpot'));
|
||||
echo $OUTPUT->help_icon('reportcontent', get_string('reportcontent', 'hotpot'), 'hotpot');
|
||||
print '</td><th align="right" scope="col">'.get_string('reportcontent', 'hotpot').':</th><td colspan="7">';
|
||||
foreach ($menus as $name => $options) {
|
||||
$value = $formdata[$name];
|
||||
|
@ -587,7 +587,7 @@ function hotpot_print_report_selector(&$course, &$hotpot, &$formdata) {
|
|||
);
|
||||
|
||||
print '<tr><td>';
|
||||
echo $OUTPUT->help_icon(moodle_help_icon::make('reportformat', get_string('reportformat', 'hotpot'), 'hotpot'));
|
||||
echo $OUTPUT->help_icon('reportformat', get_string('reportformat', 'hotpot'), 'hotpot');
|
||||
print '</td>';
|
||||
foreach ($menus as $name => $options) {
|
||||
$value = $formdata[$name];
|
||||
|
|
|
@ -136,7 +136,7 @@ class hotpot_report extends hotpot_default_report {
|
|||
if (empty($table->caption)) {
|
||||
$table->caption = get_string('indivresp', 'quiz');
|
||||
if ($is_html) {
|
||||
$table->caption .= $OUTPUT->help_icon(moodle_help_icon::make('responsestable', $table->caption, 'hotpot'));
|
||||
$table->caption .= $OUTPUT->help_icon('responsestable', $table->caption, 'hotpot');
|
||||
}
|
||||
}
|
||||
$hints = empty($response->hints) ? 0 : $response->hints;
|
||||
|
@ -260,14 +260,14 @@ class hotpot_report extends hotpot_default_report {
|
|||
$br = $is_html ? '<br />' : "\n";
|
||||
$space = $is_html ? ' ' : "";
|
||||
$no_value = $is_html ? '--' : "";
|
||||
$help_button = $is_html ? $OUTPUT->help_icon(moodle_help_icon::make("discrimination", get_string('discrimination', 'quiz'), "quiz")) : "";
|
||||
$help_button = $is_html ? $OUTPUT->help_icon("discrimination", get_string('discrimination', 'quiz'), "quiz") : "";
|
||||
// table properties
|
||||
unset($table);
|
||||
$table->border = 1;
|
||||
$table->width = '100%';
|
||||
$table->caption = get_string('itemanal', 'quiz');
|
||||
if ($is_html) {
|
||||
$table->caption .= $OUTPUT->help_icon(moodle_help_icon::make('analysistable', $table->caption, 'hotpot'));
|
||||
$table->caption .= $OUTPUT->help_icon('analysistable', $table->caption, 'hotpot');
|
||||
}
|
||||
// initialize legend, if necessary
|
||||
if (!empty($options['reportshowlegend'])) {
|
||||
|
|
|
@ -62,11 +62,7 @@ $mform->set_data($data);
|
|||
$PAGE->set_heading($strimportquestions);
|
||||
echo $OUTPUT->header();
|
||||
|
||||
$helpicon = new moodle_help_icon();
|
||||
$helpicon->text = $strimportquestions;
|
||||
$helpicon->page = "import";
|
||||
$helpicon->module = "lesson";
|
||||
echo $OUTPUT->heading_with_help($helpicon);
|
||||
echo $OUTPUT->heading_with_help($strimportquestions, 'import', 'lesson' );
|
||||
|
||||
if ($data = $mform->get_data()) {
|
||||
|
||||
|
|
|
@ -205,12 +205,7 @@ $PAGE->set_heading($strimportppt);
|
|||
echo $OUTPUT->header();
|
||||
|
||||
/// Print upload form
|
||||
$helpicon = new moodle_help_icon();
|
||||
$helpicon->text = $strimportppt;
|
||||
$helpicon->page = "importppt";
|
||||
$helpicon->module = "lesson";
|
||||
|
||||
echo $OUTPUT->heading_with_help($helpicon);
|
||||
echo $OUTPUT->heading_with_help($strimportppt, 'importppt', 'lesson');
|
||||
echo $OUTPUT->box_start('generalbox boxaligncenter');
|
||||
$mform->display();
|
||||
echo $OUTPUT->box_end();
|
||||
|
|
|
@ -455,7 +455,7 @@ function lesson_mediafile_block_contents($cmid, $lesson) {
|
|||
$link->title = get_string('mediafilepopup', 'lesson');
|
||||
$content = $OUTPUT->link($link);
|
||||
|
||||
$content .= $OUTPUT->help_icon(moodle_help_icon::make("mediafilestudent", get_string("mediafile", "lesson"), "lesson"));
|
||||
$content .= $OUTPUT->help_icon("mediafilestudent", get_string("mediafile", "lesson"), "lesson");
|
||||
|
||||
$bc = new block_contents();
|
||||
$bc->title = get_string('linkedmedia', 'lesson');
|
||||
|
|
|
@ -49,13 +49,7 @@ class mod_lesson_renderer extends plugin_renderer_base {
|
|||
$output = $this->output->header();
|
||||
|
||||
if (has_capability('mod/lesson:manage', $context)) {
|
||||
|
||||
$helpicon = new moodle_help_icon();
|
||||
$helpicon->text = $activityname;
|
||||
$helpicon->page = "overview";
|
||||
$helpicon->module = "lesson";
|
||||
|
||||
$output .= $this->output->heading_with_help($helpicon);
|
||||
$output .= $this->output->heading_with_help($activityname, 'overview', 'lesson');
|
||||
|
||||
if (!empty($currenttab)) {
|
||||
ob_start();
|
||||
|
|
|
@ -106,7 +106,7 @@ function module_specific_controls($totalnumber, $recurse, $category, $cmid, $cmo
|
|||
$out .= '<input type="hidden" name="categoryid" value="' . $category->id . '" />';
|
||||
$out .= ' <input type="submit" name="addrandom" value="'.
|
||||
$straddtoquiz.'" '.$disabled.' />';
|
||||
$out .= $OUTPUT->help_icon(moodle_help_icon::make('random', get_string('random', 'quiz'), 'quiz'));
|
||||
$out .= $OUTPUT->help_icon('random', get_string('random', 'quiz'), 'quiz');
|
||||
}
|
||||
}
|
||||
return $out;
|
||||
|
@ -516,7 +516,7 @@ if ($quiz_reordertool) {
|
|||
echo '</div>';
|
||||
}
|
||||
echo $OUTPUT->heading($pagetitle.": ".$quiz->name, 2);
|
||||
echo $OUTPUT->help_icon(moodle_help_icon::make('editconcepts', get_string('basicideasofquiz', 'quiz'), 'quiz', get_string('basicideasofquiz', 'quiz')));
|
||||
echo $OUTPUT->help_icon('editconcepts', get_string('basicideasofquiz', 'quiz'), 'quiz', true);
|
||||
quiz_print_status_bar($quiz);
|
||||
|
||||
$tabindex = 0;
|
||||
|
|
|
@ -676,7 +676,7 @@ function quiz_print_pagecontrols($quiz, $pageurl, $page, $hasattempts) {
|
|||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<?php echo $OUTPUT->help_icon(moodle_help_icon::make('random', get_string('random', 'quiz'), 'quiz')); ?>
|
||||
<?php echo $OUTPUT->help_icon('random', get_string('random', 'quiz'), 'quiz'); ?>
|
||||
<?php
|
||||
echo "\n</div>";
|
||||
}
|
||||
|
@ -1144,7 +1144,7 @@ function quiz_print_grading_form($quiz, $pageurl, $tabindex) {
|
|||
echo '<label for="inputmaxgrade">' . get_string('maximumgradex', '', $a) . "</label>";
|
||||
echo '<input type="hidden" name="savechanges" value="save" />';
|
||||
echo '<input type="submit" value="' . $strsave . '" />';
|
||||
echo $OUTPUT->help_icon(moodle_help_icon::make('maxgrade', get_string('maximumgrade'), 'quiz'));
|
||||
echo $OUTPUT->help_icon('maxgrade', get_string('maximumgrade'), 'quiz');
|
||||
echo '</fieldset>';
|
||||
echo "</div></form>\n";
|
||||
return $tabindex + 1;
|
||||
|
|
|
@ -823,16 +823,13 @@ function quiz_question_preview_button($quiz, $question, $label = false) {
|
|||
}
|
||||
|
||||
// Build the icon.
|
||||
$image = new html_image();
|
||||
$image->src = $OUTPUT->pix_url('t/preview');
|
||||
$image->add_class('iconsmall');
|
||||
$image->alt = $strpreviewquestion;
|
||||
$image = $OUTPUT->image($OUTPUT->pix_url('t/preview'), array('class'=>'iconsmall', 'alt'=>$strpreviewquestion));
|
||||
|
||||
$link = html_link::make("/question/preview.php?id=$question->id&quizid=$quiz->id", $strpreviewlabel);
|
||||
$link = new html_link($CFG->wwwroot."/question/preview.php?id=$question->id&quizid=$quiz->id", $image, array('title' => $strpreviewquestion));
|
||||
parse_str(QUESTION_PREVIEW_POPUP_OPTIONS, $options);
|
||||
$link->add_action(new popup_action('click', $link->url, 'questionpreview', $options));
|
||||
$link->title = $strpreviewquestion;
|
||||
return $OUTPUT->link_to_popup($link, $image);
|
||||
|
||||
return $OUTPUT->link($link);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
/**
|
||||
* This script calculates various statistics about student attempts
|
||||
*
|
||||
* @version $Id$
|
||||
* @author Martin Dougiamas, Jamie Pratt, Tim Hunt and others.
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU Public License
|
||||
* @package quiz
|
||||
|
@ -422,7 +421,7 @@ class quiz_statistics_report extends quiz_default_report {
|
|||
$select = html_select::make($downloadoptions, 'download', $this->table->defaultdownloadformat, false);
|
||||
$select->nothingvalue = '';
|
||||
$quizinformationtablehtml .= $OUTPUT->select($select);;
|
||||
$quizinformationtablehtml .= $OUTPUT->help_icon(moodle_help_icon::make('tableexportformats', get_string('tableexportformats', 'table')));
|
||||
$quizinformationtablehtml .= $OUTPUT->help_icon('tableexportformats', get_string('tableexportformats', 'table'));
|
||||
$quizinformationtablehtml .= '</div></form>';
|
||||
}
|
||||
$quizinformationtablehtml .= $OUTPUT->table($quizinformationtable);
|
||||
|
|
|
@ -146,7 +146,7 @@ class quiz_report_statistics_table extends flexible_table {
|
|||
if ($question->_stats->negcovar){
|
||||
$negcovar = get_string('negcovar', 'quiz_statistics');
|
||||
if (!$this->is_downloading()){
|
||||
$negcovar .= $OUTPUT->help_icon(moodle_help_icon::make('negcovar', $negcovar, 'quiz_statistics'));
|
||||
$negcovar .= $OUTPUT->help_icon('negcovar', $negcovar, 'quiz_statistics');
|
||||
return '<div class="negcovar">'.$negcovar.'</div>';
|
||||
} else {
|
||||
return $negcovar;
|
||||
|
|
|
@ -357,11 +357,7 @@
|
|||
// Do the Action
|
||||
# "setpageflags", "removepages", "strippages", "checklinks", "revertpages"
|
||||
|
||||
$helpicon = new moodle_help_icon();
|
||||
$helpicon->text = get_string($action,"wiki");
|
||||
$helpicon->page = $action;
|
||||
$helpicon->module = "wiki";
|
||||
echo $OUTPUT->heading_with_help($helpicon);
|
||||
echo $OUTPUT->heading_with_help(get_string($action,"wiki"), $action, 'wiki');
|
||||
|
||||
include $action.".html";
|
||||
echo $OUTPUT->box_end();
|
||||
|
|
|
@ -28,7 +28,7 @@ if($err->remark) {
|
|||
<td>
|
||||
<input type="text" name="authorfieldpattern" size="30" value="<?php p($form->authorfieldpattern) ?>" />
|
||||
<?php
|
||||
echo $OUTPUT->help_icon(moodle_help_icon::make('revertauthorfieldpattern', get_string('authorfieldpattern', 'wiki'), 'wiki'));
|
||||
echo $OUTPUT->help_icon('revertauthorfieldpattern', get_string('authorfieldpattern', 'wiki'), 'wiki');
|
||||
if (!empty($err->authorfieldpattern)) { echo $OUTPUT->error_text($err->authorfieldpattern); }
|
||||
?>
|
||||
</td>
|
||||
|
|
|
@ -365,7 +365,7 @@
|
|||
|
||||
/// Formatting Rules
|
||||
echo '<td class="howtowiki">';
|
||||
echo $OUTPUT->help_icon(moodle_help_icon::make('howtowiki', get_string('howtowiki', 'wiki'), 'wiki'));
|
||||
echo $OUTPUT->help_icon('howtowiki', get_string('howtowiki', 'wiki'), 'wiki');
|
||||
echo '</td>';
|
||||
|
||||
echo '</tr></table>';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue