1 <?php
// $Id: lesson.php, v 1.0 25 Jan 2004
3 * Handles lesson actions
20 * @license http://www.gnu.org/copyleft/gpl.html GNU Public License
24 require("../../config.php");
25 require("locallib.php");
27 $id = required_param('id', PARAM_INT
); // Course Module ID
28 $action = required_param('action', PARAM_ALPHA
); // Action
30 list($cm, $course, $lesson) = lesson_get_basics($id);
32 require_login($course->id
);
33 $context = get_context_instance(CONTEXT_MODULE
, $cm->id
);
35 /// Set up some general variables
36 $usehtmleditor = can_use_html_editor();
38 /// Process the action
40 case 'addbranchtable':
45 lesson_print_header($cm, $course, $lesson);
47 case 'addendofbranch':
48 case 'addendofcluster':
53 require_capability('mod/lesson:edit', $context);
55 include($CFG->dirroot
.'/mod/lesson/action/'.$action.'.php');
58 error("Fatal Error: Unknown action\n");
61 print_footer($course);