mirror of
https://github.com/moodle/moodle.git
synced 2025-02-13 20:36:42 +01:00
Changed: now need to enter password on password protected lessons before being able to view high scores Added logs to high scores and reworked logic
62 lines
1.5 KiB
PHP
62 lines
1.5 KiB
PHP
<?PHP // $Id: lesson.php, v 1.0 25 Jan 2004
|
|
|
|
/*************************************************
|
|
ACTIONS handled are:
|
|
|
|
addbranchtable
|
|
addendofbranch
|
|
addcluster
|
|
addendofcluster
|
|
addpage
|
|
confirmdelete
|
|
continue
|
|
delete
|
|
editpage
|
|
insertpage
|
|
move
|
|
moveit
|
|
updatepage
|
|
|
|
************************************************/
|
|
|
|
require("../../config.php");
|
|
require("locallib.php");
|
|
|
|
$id = required_param('id', PARAM_INT); // Course Module ID
|
|
$action = required_param('action', PARAM_ALPHA); // Action
|
|
|
|
list($cm, $course, $lesson) = lesson_get_basics($id);
|
|
|
|
require_login($course->id);
|
|
$context = get_context_instance(CONTEXT_MODULE, $cm->id);
|
|
|
|
/// Set up some general variables
|
|
$usehtmleditor = can_use_html_editor();
|
|
|
|
/// Process the action
|
|
switch ($action) {
|
|
case 'addbranchtable':
|
|
case 'addpage':
|
|
case 'confirmdelete':
|
|
case 'editpage':
|
|
case 'move':
|
|
lesson_print_header($cm, $course, $lesson);
|
|
case 'addcluster':
|
|
case 'addendofbranch':
|
|
case 'addendofcluster':
|
|
case 'delete':
|
|
case 'insertpage':
|
|
case 'updatepage':
|
|
case 'moveit':
|
|
require_capability('mod/lesson:edit', $context);
|
|
case 'continue':
|
|
include($CFG->dirroot.'/mod/lesson/action/'.$action.'.php');
|
|
break;
|
|
default:
|
|
error("Fatal Error: Unknown action\n");
|
|
}
|
|
|
|
print_footer($course);
|
|
|
|
?>
|