-<?php // $Id$
+<?php
+
require_once("../../config.php");
require_once("lib.php");
$attemptid = required_param('attemptid', PARAM_INT);
+ $PAGE->set_url(new moodle_url($CFG->wwwroot.'/mod/hotpot/attempt.php', array('attemptid'=>$attemptid)));
+
// get attempt, hotpot, course and course_module records
if (! $attempt = $DB->get_record("hotpot_attempts", array("id"=>$attemptid))) {
print_error('invalidattemptid', 'hotpot');
-<?php // $Id$
+<?php
require_once("../../config.php");
$id = required_param('id', PARAM_INT); // Course module ID
+ $PAGE->set_url(new moodle_url($CFG->wwwroot.'/mod/hotpot/grade.php', array('id'=>$id)));
+
if (! $cm = get_coursemodule_from_id('hotpot', $id)) {
print_error('invalidcoursemodule');
}
-<?PHP // $Id$
+<?PHP
// This page lists all the instances of hotpot in a particular course
require_once("../../course/lib.php");
require_once("lib.php");
- $id = required_param('id', PARAM_INT); // course
+ $id = required_param('id', PARAM_INT); // course
+
+ $PAGE->set_url(new moodle_url($CFG->wwwroot.'/mod/hotpot/index.php', array('id'=>$id)));
+
if (!$course = $DB->get_record('course', array('id'=>$id))) {
print_error('invalidcourseid');
}
$hp = optional_param('hp', 0, PARAM_INT); // hotpot ID
if ($id) {
+ $PAGE->set_url(new moodle_url($CFG->wwwroot.'/mod/hotpot/report.php', array('id'=>$id)));
if (! $cm = get_coursemodule_from_id('hotpot', $id)) {
print_error('invalidcoursemodule');
}
}
} else {
+ $PAGE->set_url(new moodle_url($CFG->wwwroot.'/mod/hotpot/report.php', array('hp'=>$hp)));
if (! $hotpot = $DB->get_record("hotpot", array("id"=>$hp))) {
print_error('invalidhotpotid', 'hotpot');
}
$PAGE->set_title(format_string($course->shortname) . ": $hotpot->name");
$PAGE->set_heading($course->fullname);
- $PAGE->set_button(update_module_button($cm->id, $course->id, $strmodulename));
+ $PAGE->set_button($OUTPUT->update_module_button($cm->id, 'hotpot'));
echo $OUTPUT->header();
$course_context = get_context_instance(CONTEXT_COURSE, $course->id);
-<?PHP // $Id$
+<?PHP
+
// This page prints a review of a particular quiz attempt
require_once("../../config.php");
require_once("lib.php");
$attempt = required_param('attempt', PARAM_INT); // A particular attempt ID for review
if ($id) {
+ $PAGE->set_url(new moodle_url($CFG->wwwroot.'/mod/hotpot/review.php', array('id'=>$id,'attempt'=>$attempt)));
if (! $cm = get_coursemodule_from_id('hotpot', $id)) {
print_error('invalidcoursemodule');
}
print_error('invalidcoursemodule');
}
} else {
+ $PAGE->set_url(new moodle_url($CFG->wwwroot.'/mod/hotpot/review.php', array('hp'=>$hp,'attempt'=>$attempt)));
if (! $hotpot = $DB->get_record("hotpot", array("id"=>$hp))) {
print_error('invalidcoursemodule');
}
$PAGE->requires->js('lib/overlib/overlib_cssstyle.js')->in_head();
$PAGE->set_title(format_string($course->shortname) . ": $hotpot->name");
$PAGE->set_heading($course->fullname);
- $PAGE->set_button(update_module_button($cm->id, $course->id, $strmodulename));
+ $PAGE->set_button($OUTPUT->update_module_button($cm->id, 'hotpot'));
echo $OUTPUT->header();
print '<div id="overDiv" style="position:absolute; visibility:hidden; z-index:1000;"></div>'; // for overlib
echo $OUTPUT->heading($hotpot->name);
-<?php // $Id$
+<?php
require_once("../../config.php");
require_once("lib.php");
$params->course = required_param('course', PARAM_INT);
$params->reference = required_param('reference', PARAM_PATH);
+ $PAGE->set_url(new moodle_url($CFG->wwwroot.'/mod/hotpot/show.php', array('action'=>$params->action, 'course'=>$params->course, 'reference'=>$params->reference)));
+
require_login($params->course);
if (!has_capability('mod/hotpot:viewreport',get_context_instance(CONTEXT_COURSE, $params->course))) {
-<?PHP // $Id$
+<?PHP
+
/// This page prints a hotpot quiz
if (defined('HOTPOT_FIRST_ATTEMPT') && HOTPOT_FIRST_ATTEMPT==false) {
// this script is being included (by attempt.php)
$hp = optional_param('hp', 0, PARAM_INT); // hotpot ID
if ($id) {
+ $PAGE->set_url(new moodle_url($CFG->wwwroot.'/mod/hotpot/report.php', array('id'=>$id)));
if (! $cm = get_coursemodule_from_id('hotpot', $id)) {
print_error('invalidcoursemodule');
}
}
} else {
+ $PAGE->set_url(new moodle_url($CFG->wwwroot.'/mod/hotpot/report.php', array('hp'=>$hp)));
if (! $hotpot = $DB->get_record("hotpot", array("id"=>$hp))) {
print_error('invalidhotpotid', 'hotpot');
}
$title = format_string($course->shortname.': '.$hotpot->name, true);
$heading = $course->fullname;
- $button = update_module_button($cm->id, $course->id, get_string("modulename", "hotpot"));
+ $button = $OUTPUT->update_module_button($cm->id, 'hotpot');
$button = '<div style="font-size:0.75em;">'.$button.'</div>';
$loggedinas = '<span class="logininfo">'.user_login_string($course, $USER).'</span>';
$footer = '</div></div>'.$footer;
switch ($hotpot->navigation) {
case HOTPOT_NAVIGATION_BAR:
- //update_module_button($cm->id, $course->id, $strmodulename.'" style="font-size:0.8em')
- print_header($title, $heading, '', "", $head.$styles.$scripts, true, $button, $loggedinas, false, $body_tags);
+ $PAGE->set_title($title);
+ $PAGE->set_heading($heading);
+ $PAGE->set_button($button);
+ $PAGE->set_headingmenu($loggedinas);
+ echo $OUTPUT->header();
if (!empty($available_msg)) {
echo $OUTPUT->notification($available_msg);
}