}
$PAGE->navbar->add($chooseqtype);
$PAGE->set_title($chooseqtype);
- $PAGE->set_button(update_module_button($cm->id, $cm->course, get_string('modulename', $cm->modname)));
+ $PAGE->set_button($OUTPUT->update_module_button($cm->id, $cm->modname));
echo $OUTPUT->header();
} else {
$PAGE->navbar->add(get_string('editquestions', 'question'),$returnurl);
if ($cm!==null) {
// Page header
$strupdatemodule = has_capability('moodle/course:manageactivities', $contexts->lowest())
- ? update_module_button($cm->id, $COURSE->id, get_string('modulename', $cm->modname))
+ ? $OUTPUT->update_module_button($cm->id, $cm->modname)
: "";
$PAGE->navbar->add(get_string('modulenameplural', $cm->modname), new moodle_url($CFG->wwwroot.'/mod/'.$cm->modname.'/index.php', array('id'=>$COURSE->id)));
$PAGE->navbar->add(format_string($module->name), new moodle_url($CFG->wwwroot.'/mod/'.$cm->modname.'/view.php', array('id'=>$cm->id)));
*/
public function output_edit_lists() {
global $OUTPUT;
- print_heading_with_help(get_string('editcategories', 'quiz'), 'categories', 'question');
+
+ $helpicon = new moodle_help_icon();
+ $helpicon->text = get_string('editcategories', 'quiz');
+ $helpicon->page = 'categories';
+ $helpicon->module = 'question';
+ echo $OUTPUT->heading_with_help($helpicon);
+
foreach ($this->editlists as $context => $list){
$listhtml = $list->to_html(0, array('str'=>$this->str));
if ($listhtml){
if ($cm!==null) {
// Page header
$strupdatemodule = has_capability('moodle/course:manageactivities', $contexts->lowest())
- ? update_module_button($cm->id, $COURSE->id, get_string('modulename', $cm->modname))
+ ? $OUTPUT->update_module_button($cm->id, $cm->modname)
: "";
$PAGE->navbar->add(get_string('modulenameplural', $cm->modname), new moodle_url($CFG->wwwroot.'/mod/'.$cm->modname.'/index.php', array('id'=>$COURSE->id)));
$PAGE->navbar->add(format_string($module->name), new moodle_url($CFG->wwwroot.'/mod/'.$cm->modname.'/view.php', array('id'=>$cm->id)));
// Page header
$context = get_context_instance(CONTEXT_MODULE, $cm->id);
$strupdatemodule = has_capability('moodle/course:manageactivities', $context)
- ? update_module_button($cm->id, $COURSE->id, get_string('modulename', $cm->modname))
+ ? $OUTPUT->update_module_button($cm->id, $cm->modname)
: "";
$PAGE->navbar->add(get_string('modulenameplural', $cm->modname), new moodle_url($CFG->wwwroot.'/mod/'.$cm->modname.'/index.php', array('id'=>$COURSE->id)));
$PAGE->navbar->add(format_string($module->name), new moodle_url($CFG->wwwroot.'/mod/'.$cm->modname.'/view.php', array('id'=>$cm->id)));
$streditingquestions = get_string('editquestions', "quiz");
if ($cm!==null) {
$strupdatemodule = has_capability('moodle/course:manageactivities', $contexts->lowest())
- ? update_module_button($cm->id, $COURSE->id, get_string('modulename', $cm->modname))
+ ? $OUTPUT->update_module_button($cm->id, $cm->modname)
: "";
$PAGE->navbar->add(get_string('modulenameplural', $cm->modname), new moodle_url($CFG->wwwroot.'/mod/'.$cm->modname.'/index.php', array('id'=>$COURSE->id)));
$PAGE->navbar->add(format_string($module->name), new moodle_url($CFG->wwwroot.'/mod/'.$cm->modname.'/view.php', array('id'=>$cm->id)));
$PAGE->set_title($strexportquestions);
if ($cm!==null) {
$strupdatemodule = has_capability('moodle/course:manageactivities', $contexts->lowest())
- ? update_module_button($cm->id, $COURSE->id, get_string('modulename', $cm->modname))
+ ? $OUTPUT->update_module_button($cm->id, $cm->modname)
: "";
$PAGE->navbar->add(get_string('modulenameplural', $cm->modname), new moodle_url($CFG->wwwroot.'/mod/'.$cm->modname.'/index.php', array('id'=>$COURSE->id)));
$PAGE->navbar->add(format_string($module->name), new moodle_url($CFG->wwwroot.'/mod/'.$cm->modname.'/view.php', array('id'=>$cm->id)));
}
/// Display export form
- print_heading_with_help($strexportquestions, 'export', 'quiz');
+ $helpicon = new moodle_help_icon();
+ $helpicon->text = $strexportquestions;
+ $helpicon->page = 'export';
+ $helpicon->module = 'quiz';
+ echo $OUTPUT->heading_with_help($helpicon);
$export_form->display();
if ($cm!==null) {
$strupdatemodule = has_capability('moodle/course:manageactivities', get_context_instance(CONTEXT_COURSE, $COURSE->id))
- ? update_module_button($cm->id, $COURSE->id, get_string('modulename', $cm->modname))
+ ? $OUTPUT->update_module_button($cm->id, $cm->modname)
: "";
$PAGE->navbar->add(get_string('modulenameplural', $cm->modname), new moodle_url($CFG->wwwroot.'/mod/'.$cm->modname.'/index.php', array('id'=>$COURSE->id)));
$PAGE->navbar->add(format_string($module->name), new moodle_url($CFG->wwwroot.'/mod/'.$cm->modname.'/view.php', array('id'=>$cm->id)));
}
}
- print_heading_with_help($txt->importquestions, "import", "quiz");
+ $helpicon = new moodle_help_icon();
+ $helpicon->text = $txt->importquestions;
+ $helpicon->page = 'import';
+ $helpicon->module = 'quiz';
+ echo $OUTPUT->heading_with_help($helpicon);
/// Print upload form
$import_form->display();
if ($cm !== null) {
$strmodule = get_string('modulename', $cm->modname);
$strupdatemodule = has_capability('moodle/course:manageactivities', get_context_instance(CONTEXT_COURSE, $COURSE->id))
- ? update_module_button($cm->id, $cm->course, $strmodule)
+ ? $OUTPUT->update_module_button($cm->id, $strmodule)
: "";
$streditingmodule = get_string('editinga', 'moodle', $strmodule);
return;
break;
case 'datasetdefinitions':
- print_heading_with_help(get_string("choosedatasetproperties", "quiz"), "questiondatasets", "quiz");
+ $helpicon = new moodle_help_icon();
+ $helpicon->text = get_string("choosedatasetproperties", "quiz");
+ $helpicon->page = 'questiondatasets';
+ $helpicon->module = 'quiz';
+ echo $OUTPUT->heading_with_help($helpicon);
break;
case 'datasetitems':
- print_heading_with_help(get_string("editdatasets", "quiz"), 'questiondatasets', "quiz");
+ $helpicon = new moodle_help_icon();
+ $helpicon->text = get_string("editdatasets", "quiz");
+ $helpicon->page = 'questiondatasets';
+ $helpicon->module = 'quiz';
+ echo $OUTPUT->heading_with_help($helpicon);
break;
}
function display_question_editing_page(&$mform, $question, $wizardnow){
global $OUTPUT;
$heading = $this->get_heading(empty($question->id));
- print_heading_with_help($heading, $this->name(), $this->plugin_name());
+
+ $helpicon = new moodle_help_icon();
+ $helpicon->text = $heading;
+ $helpicon->page = $this->name();
+ $helpicon->module = $this->plugin_name();
+ echo $OUTPUT->heading_with_help($helpicon);
+
$permissionstrs = array();
if (!empty($question->id)){
if ($question->formoptions->canedit){
function display_question_editing_page(&$mform, $question, $wizardnow){
$heading = $this->get_heading(empty($question->id));
- print_heading_with_help($heading, $this->name(), $this->plugin_name());
+ $helpicon = new moodle_help_icon();
+ $helpicon->text = $heading;
+ $helpicon->page = $this->name();
+ $helpicon->module = $this->plugin_name();
+ echo $OUTPUT->heading_with_help($helpicon);
$mform->display();
}