Moodle  2.2.1
http://www.collinsharper.com
C:/xampp/htdocs/moodle/mod/lesson/view.php File Reference

Go to the source code of this file.

Namespaces

namespace  mod
 

Local Library of functions for module scorm.


Variables

 $id = required_param('id', PARAM_INT)
 $pageid = optional_param('pageid', NULL, PARAM_INT)
 $edit = optional_param('edit', -1, PARAM_BOOL)
 $userpassword = optional_param('userpassword','',PARAM_RAW)
 $backtocourse = optional_param('backtocourse', false, PARAM_RAW)
 $cm = get_coursemodule_from_id('lesson', $id, 0, false, MUST_EXIST)
 $course = $DB->get_record('course', array('id' => $cm->course), '*', MUST_EXIST)
 $lesson = new lesson($DB->get_record('lesson', array('id' => $cm->instance), '*', MUST_EXIST))
if($backtocourse) $completion = new completion_info($course)
 $url = new moodle_url('/mod/lesson/view.php', array('id'=>$id))
 $context = get_context_instance(CONTEXT_MODULE, $cm->id)
 $canmanage = has_capability('mod/lesson:manage', $context)
 $lessonoutput = $PAGE->get_renderer('mod_lesson')
 $reviewmode = false
 $userhasgrade = $DB->count_records("lesson_grades", array("lessonid"=>$lesson->id, "userid"=>$USER->id))
if($userhasgrade &&!$lesson->
retake) if(!$canmanage) if($pageid==LESSON_UNSEENBRANCHPAGE
$attemptflag = false
if(empty($pageid)) $currenttab = 'view'
 $extraeditbuttons = false
 $lessonpageid = null
 $timer = null

Variable Documentation

if ($userhasgrade &&!$lesson->retake) if (!$canmanage) if ($pageid==LESSON_UNSEENBRANCHPAGE) $attemptflag = false

Check these for students only TODO: Find a better method for doing this! Check lesson availability Check for password Check dependencies Check for high scores

Definition at line 167 of file view.php.

$backtocourse = optional_param('backtocourse', false, PARAM_RAW)

Definition at line 36 of file view.php.

$canmanage = has_capability('mod/lesson:manage', $context)

Definition at line 59 of file view.php.

Definition at line 38 of file view.php.

if ($backtocourse) $completion = new completion_info($course)

Definition at line 49 of file view.php.

Definition at line 58 of file view.php.

$course = $DB->get_record('course', array('id' => $cm->course), '*', MUST_EXIST)

Definition at line 39 of file view.php.

if (empty($pageid)) $currenttab = 'view'

Definition at line 266 of file view.php.

Definition at line 34 of file view.php.

$extraeditbuttons = false

Definition at line 267 of file view.php.

Definition at line 32 of file view.php.

$lesson = new lesson($DB->get_record('lesson', array('id' => $cm->instance), '*', MUST_EXIST))

Definition at line 40 of file view.php.

$lessonoutput = $PAGE->get_renderer('mod_lesson')

Definition at line 61 of file view.php.

$lessonpageid = null

Definition at line 268 of file view.php.

Definition at line 33 of file view.php.

$reviewmode = false

Definition at line 63 of file view.php.

$timer = null

Definition at line 269 of file view.php.

$url = new moodle_url('/mod/lesson/view.php', array('id'=>$id))

Definition at line 52 of file view.php.

$userhasgrade = $DB->count_records("lesson_grades", array("lessonid"=>$lesson->id, "userid"=>$USER->id))

Definition at line 64 of file view.php.

$userpassword = optional_param('userpassword','',PARAM_RAW)

Definition at line 35 of file view.php.

 All Data Structures Namespaces Files Functions Variables Enumerations