Index: temp_moodle_dev/moodle/mod/scorm/view.php =================================================================== RCS file: /usr/local/cvsroot/temp_moodle_dev/moodle/mod/scorm/view.php,v diff -u -r1.1 -r1.2 --- temp_moodle_dev/moodle/mod/scorm/view.php 14 Nov 2008 06:29:40 -0000 1.1 +++ temp_moodle_dev/moodle/mod/scorm/view.php 14 Jan 2009 03:00:35 -0000 1.2 @@ -6,7 +6,9 @@ $id = optional_param('id', '', PARAM_INT); // Course Module ID, or $a = optional_param('a', '', PARAM_INT); // scorm ID $organization = optional_param('organization', '', PARAM_INT); // organization ID - + $editing = optional_param('editing', 0, PARAM_INT); // 1 if editing in Lams + $is_learner = optional_param('is_learner',0, PARAM_INT); //variable that indicates if is a learner doing the activity or is a teacher editing it + if (!empty($id)) { if (! $cm = get_coursemodule_from_id('scorm', $id)) { error("Course Module ID was incorrect"); @@ -66,10 +68,13 @@ $navlinks = array(); $navlinks[] = array('name' => format_string($scorm->name,true), 'link' => "view.php?id=$cm->id", 'type' => 'activityinstance'); $navigation = build_navigation($navlinks); - - print_header($pagetitle, $course->fullname, $navigation, + //if is_lams=1 hide Moodle's headers + if($scorm->is_lams==0){ + print_header($pagetitle, $course->fullname, $navigation, '', '', true, update_module_button($cm->id, $course->id, $strscorm), navmenu($course, $cm)); - + }else{ + print_header(); + } if (has_capability('mod/scorm:viewreport', $context)) { $trackedusers = scorm_get_count_users($scorm->id, $cm->groupingid); @@ -83,6 +88,13 @@ // Print the main part of the page print_heading(format_string($scorm->name)); print_box(format_text($scorm->summary), 'generalbox', 'intro'); - scorm_view_display($USER, $scorm, 'view.php?id='.$cm->id, $cm); - print_footer($course); + //lams: we pass a new variable called editing to be able to display the correct lams button when we are in player.php + scorm_view_display($USER, $scorm, 'view.php?id='.$cm->id, $cm,'',$editing); + + if($cm->is_lams==1&&$editing==1){ + //lams: display the finish edditing button if we have added any kind of question + include('showlamsfinish.php'); + } + //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); ?>