Index: temp_moodle_dev/moodle/mod/lesson/index.php =================================================================== RCS file: /usr/local/cvsroot/temp_moodle_dev/moodle/mod/lesson/index.php,v diff -u -r1.1 -r1.2 --- temp_moodle_dev/moodle/mod/lesson/index.php 14 Nov 2008 06:30:06 -0000 1.1 +++ temp_moodle_dev/moodle/mod/lesson/index.php 5 Jan 2009 23:24:15 -0000 1.2 @@ -106,6 +106,7 @@ /// Finish the page - print_footer($course); + //we pass a new parameter to the function so it won't we printed if is_lams=1 + print_footer($course,null, false,$lesson->is_lams); ?> Index: temp_moodle_dev/moodle/mod/lesson/lesson.php =================================================================== RCS file: /usr/local/cvsroot/temp_moodle_dev/moodle/mod/lesson/lesson.php,v diff -u -r1.1 -r1.2 --- temp_moodle_dev/moodle/mod/lesson/lesson.php 14 Nov 2008 06:30:06 -0000 1.1 +++ temp_moodle_dev/moodle/mod/lesson/lesson.php 5 Jan 2009 23:25:05 -0000 1.2 @@ -58,6 +58,7 @@ error("Fatal Error: Unknown action\n"); } - print_footer($course); + //we pass a new parameter to the function so it won't we printed if is_lams=1 + print_footer($course,null, false,$cm->is_lams); ?> Index: temp_moodle_dev/moodle/mod/lesson/locallib.php =================================================================== RCS file: /usr/local/cvsroot/temp_moodle_dev/moodle/mod/lesson/locallib.php,v diff -u -r1.1 -r1.2 --- temp_moodle_dev/moodle/mod/lesson/locallib.php 14 Nov 2008 06:30:06 -0000 1.1 +++ temp_moodle_dev/moodle/mod/lesson/locallib.php 5 Jan 2009 23:26:20 -0000 1.2 @@ -241,8 +241,12 @@ $navigation = build_navigation('', $cm); /// Print header, heading, tabs and messages - print_header("$course->shortname: $strname", $course->fullname, $navigation, + if($cm->is_lams==1){ + print_header(); + }else{ + print_header("$course->shortname: $strname", $course->fullname, $navigation, '', '', true, $button, navmenu($course, $cm)); + } if (has_capability('mod/lesson:manage', $context)) { print_heading_with_help($strname, "overview", "lesson"); Index: temp_moodle_dev/moodle/mod/lesson/mediafile.php =================================================================== RCS file: /usr/local/cvsroot/temp_moodle_dev/moodle/mod/lesson/mediafile.php,v diff -u -r1.1 -r1.2 --- temp_moodle_dev/moodle/mod/lesson/mediafile.php 14 Nov 2008 06:30:06 -0000 1.1 +++ temp_moodle_dev/moodle/mod/lesson/mediafile.php 5 Jan 2009 23:26:41 -0000 1.2 @@ -49,7 +49,8 @@ '; - print_footer(); + //we pass a new parameter to the function so it won't we printed if is_lams=1 + print_footer($course,null, false,$lesson->is_lams); } exit(); } @@ -206,5 +207,6 @@ echo ''; } - print_footer(); + //we pass a new parameter to the function so it won't we printed if is_lams=1 + print_footer($course,null, false,$cm->is_lams); ?> Index: temp_moodle_dev/moodle/mod/lesson/pagelib.php =================================================================== RCS file: /usr/local/cvsroot/temp_moodle_dev/moodle/mod/lesson/pagelib.php,v diff -u -r1.1 -r1.2 --- temp_moodle_dev/moodle/mod/lesson/pagelib.php 14 Nov 2008 06:30:06 -0000 1.1 +++ temp_moodle_dev/moodle/mod/lesson/pagelib.php 5 Jan 2009 23:28:43 -0000 1.2 @@ -60,7 +60,8 @@ * * @return void **/ - function print_header($title = '', $morenavlinks = array()) { + //LAMS: we pass a new parameter so when in a lams sequence we don't display Moodle's headers + function print_header($title = '', $morenavlinks = array(),$is_lams=NULL) { global $CFG; $this->init_full(); @@ -125,7 +126,13 @@ // } $navigation = build_navigation($morenavlinks, $this->modulerecord); - print_header($title, $this->courserecord->fullname, $navigation, '', $meta, true, $buttons, navmenu($this->courserecord, $this->modulerecord)); + //LAMS: in a lams sequence we don't display Moodle's headers + if($is_lams==1){ + print_header(); + }else{ + print_header($title, $this->courserecord->fullname, $navigation, '', $meta, true, $buttons, navmenu($this->courserecord, $this->modulerecord)); + } + if (has_capability('mod/lesson:manage', $context)) { print_heading_with_help($activityname, 'overview', 'lesson'); Index: temp_moodle_dev/moodle/mod/lesson/report.php =================================================================== RCS file: /usr/local/cvsroot/temp_moodle_dev/moodle/mod/lesson/report.php,v diff -u -r1.1 -r1.2 --- temp_moodle_dev/moodle/mod/lesson/report.php 14 Nov 2008 06:30:06 -0000 1.1 +++ temp_moodle_dev/moodle/mod/lesson/report.php 5 Jan 2009 23:29:14 -0000 1.2 @@ -110,14 +110,16 @@ lesson_print_header($cm, $course, $lesson, $action); $course_context = get_context_instance(CONTEXT_COURSE, $course->id); - if (has_capability('gradereport/grader:view', $course_context) && has_capability('moodle/grade:viewall', $course_context)) { + //we add a new parameter to the IF condition so if we are in lams the All Course Grades Button won't be displayed + if (has_capability('gradereport/grader:view', $course_context) && has_capability('moodle/grade:viewall', $course_context)&&$cm->is_lams==0) { echo '
' . get_string('seeallcoursegrades', 'grades') . '
'; } if ($nothingtodisplay) { notify(get_string('nolessonattempts', 'lesson')); - print_footer($course); + //we pass a new parameter to the function so it won't we printed if is_lams=1 + print_footer($course,null, false,$cm->is_lams); exit(); } @@ -916,6 +918,7 @@ } /// Finish the page - print_footer($course); + //we pass a new parameter to the function so it won't we printed if is_lams=1 + print_footer($course,null, false,$cm->is_lams); ?>