mirror of
https://github.com/moodle/moodle.git
synced 2025-08-08 18:36:42 +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
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue