-<?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/lesson/grade.php', array('id'=>$id)));
+
if (! $cm = get_coursemodule_from_id('lesson', $id)) {
print_error('invalidcoursemodule');
}
-<?php // $Id$
+<?php
+
/**
* Provides the interface for viewing and adding high scores
*
- * @version $Id$
* @license http://www.gnu.org/copyleft/gpl.html GNU Public License
* @package lesson
**/
$mode = optional_param('mode', '', PARAM_ALPHA);
$link = optional_param('link', 0, PARAM_INT);
+ $url = new moodle_url($CFG->wwwroot.'/mod/lesson/highscores.php', array('id'=>$id));
+ if ($mode !== '') {
+ $url->param('mode', $mode);
+ }
+ if ($link !== 0) {
+ $url->param('link', $link);
+ }
+ $PAGE->set_url($url);
+
list($cm, $course, $lesson) = lesson_get_basics($id);
require_login($course->id, false, $cm);
-<?php // $Id$
+<?php
+
/**
* Imports lesson pages
*
- * @version $Id$
* @license http://www.gnu.org/copyleft/gpl.html GNU Public License
* @package lesson
**/
$id = required_param('id', PARAM_INT); // Course Module ID
$pageid = optional_param('pageid', '', PARAM_INT); // Page ID
+ $url = new moodle_url($CFG->wwwroot.'/mod/lesson/import.php', array('id'=>$id));
+ if ($pageid !== '') {
+ $url->param('pageid', $pageid);
+ }
+ $PAGE->set_url($url);
+
if (! $cm = get_coursemodule_from_id('lesson', $id)) {
print_error('invalidcoursemodule');
}
$fileformatnames = get_import_export_formats('import');
- print_heading_with_help($strimportquestions, "import", "lesson");
+ $helpicon = new moodle_help_icon();
+ $helpicon->text = $strimportquestions;
+ $helpicon->page = "import";
+ $helpicon->module = "lesson";
+
+ echo $OUTPUT->heading_with_help($helpicon);
echo $OUTPUT->box_start('generalbox boxaligncenter');
echo "<form enctype=\"multipart/form-data\" method=\"post\" action=\"import.php\">";
-<?php // $Id$
+<?php
+
/**
* This is a very rough importer for powerpoint slides
* Export a powerpoint presentation with powerpoint as html pages
*
* The script supports book and lesson.
*
- * @version $Id$
* @license http://www.gnu.org/copyleft/gpl.html GNU Public License
* @package lesson
**/
$id = required_param('id', PARAM_INT); // Course Module ID
$pageid = optional_param('pageid', '', PARAM_INT); // Page ID
global $matches;
+
+ $url = new moodle_url($CFG->wwwroot.'/mod/lesson/importppt.php', array('id'=>$id));
+ if ($pageid !== '') {
+ $url->param('pageid', $pageid);
+ }
+ $PAGE->set_url($url);
if (! $cm = get_coursemodule_from_id('lesson', $id)) {
print_error('invalidcoursemodule');
}
/// Print upload form
+ $helpicon = new moodle_help_icon();
+ $helpicon->text = $strimportppt;
+ $helpicon->page = "importppt";
+ $helpicon->module = "lesson";
- print_heading_with_help($strimportppt, "importppt", "lesson");
+ echo $OUTPUT->heading_with_help($helpicon);
echo $OUTPUT->box_start('generalbox boxaligncenter');
echo "<form id=\"theform\" enctype=\"multipart/form-data\" method=\"post\">";
-<?php // $Id$
+<?php
+
/**
* This page lists all the instances of lesson in a particular course
*
- * @version $Id$
* @license http://www.gnu.org/copyleft/gpl.html GNU Public License
* @package lesson
**/
$id = required_param('id', PARAM_INT); // course
+ $PAGE->set_url(new moodle_url($CFG->wwwroot.'/mod/lesson/index.php', array('id'=>$id)));
+
if (!$course = $DB->get_record("course", array("id" => $id))) {
print_error('invalidcourseid');
}
-<?php // $Id$
+<?php
+
/**
* Local library file for Lesson. These are non-standard functions that are used
* only by Lesson.
*
- * @version $Id$
* @license http://www.gnu.org/copyleft/gpl.html GNU Public License
* @package lesson
**/
/// Build the buttons
$context = get_context_instance(CONTEXT_MODULE, $cm->id);
if (has_capability('mod/lesson:edit', $context)) {
- $buttons = update_module_button($cm->id, $course->id, get_string('modulename', 'lesson'));
+ $buttons = $OUTPUT->update_module_button($cm->id, 'lesson');
if ($extraeditbuttons) {
if ($lessonpageid === NULL) {
print_error('invalidpageid', 'lesson');
echo $OUTPUT->header();
if (has_capability('mod/lesson:manage', $context)) {
- print_heading_with_help($activityname, 'overview', 'lesson');
+
+ $helpicon = new moodle_help_icon();
+ $helpicon->text = $activityname;
+ $helpicon->page = "overview";
+ $helpicon->module = "lesson";
+
+ echo $OUTPUT->heading_with_help($helpicon);
if (!empty($currenttab)) {
include($CFG->dirroot.'/mod/lesson/tabs.php');
-<?php // $Id$
+<?php
+
/**
* This file plays the mediafile set in lesson settings.
*
* If there is a way to use the resource class instead of this code, please change to do so
*
*
- * @version $Id$
* @license http://www.gnu.org/copyleft/gpl.html GNU Public License
* @package lesson
**/
$id = required_param('id', PARAM_INT); // Course Module ID
$printclose = optional_param('printclose', 0, PARAM_INT);
-
+
+ $url = new moodle_url($CFG->wwwroot.'/mod/lesson/mediafile.php', array('id'=>$id));
+ if ($printclose !== '') {
+ $url->param('printclose', $printclose);
+ }
+ $PAGE->set_url($url);
+
if (! $cm = get_coursemodule_from_id('lesson', $id)) {
print_error('invalidcoursemodule');
}