course)) { error("Course is misconfigured"); } if (! $lams = get_record("lams", "id", $cm->instance)) { error("Course module is incorrect"); } require_login($course->id); add_to_log($course->id, "lams", "view", "view.php?id=$cm->id", "$lams->id"); /// Print the page header //if ($course->category) { // $navigation = "id\">$course->shortname ->"; //} print_header_simple(format_string($lams->name), "", "id\">$strchoices -> ".format_string($lams->name), "", "", true, update_module_button($cm->id, $course->id, get_string("lesson","lams")), navmenu($course, $cm)); echo '
';
print_heading(format_string($lams->name));
//$strlamss = get_string("modulenameplural", "lams");
//$strlams = get_string("modulename", "lams");
//print_header("$course->shortname: $lams->name", "$course->fullname",
// "$navigation id>$strlamss -> $lams->name",
// "", "", true, update_module_button($cm->id, $course->id, $strlams),
// navmenu($course, $cm));
/// Print the main part of the page
if(isteacher($course->id,$USER->id)||isteacheredit($course->id,$USER->id)){
$datetime = date("F d,Y g:i a");
$plaintext = trim($datetime).trim($USER->username).trim($LAMSCONSTANTS->monitor_method).trim($CFG->lams_serverid).trim($CFG->lams_serverkey);
$hash = sha1(strtolower($plaintext));
$url = $CFG->lams_serverurl.$LAMSCONSTANTS->login_request.
'?'.$LAMSCONSTANTS->param_uid.'='.$USER->username.
'&'.$LAMSCONSTANTS->param_method.'='.$LAMSCONSTANTS->monitor_method.
'&'.$LAMSCONSTANTS->param_timestamp.'='.urlencode($datetime).
'&'.$LAMSCONSTANTS->param_serverid.'='.$CFG->lams_serverid.
'&'.$LAMSCONSTANTS->param_hash.'='.$hash.
'&'.$LAMSCONSTANTS->param_lsid.'='.$lams->learning_session_id.
'&'.$LAMSCONSTANTS->param_courseid.'='.$lams->course;
print_simple_box_start('center');
echo ''.get_string("openmonitor", "lams").'';
print_simple_box_end();
}
if(isstudent($course->id,$USER->id)){
$datetime = date("F d,Y g:i a");
$plaintext = trim($datetime).trim($USER->username).trim($LAMSCONSTANTS->learner_method).trim($CFG->lams_serverid).trim($CFG->lams_serverkey);
$hash = sha1(strtolower($plaintext));
$url = $CFG->lams_serverurl.$LAMSCONSTANTS->login_request.
'?'.$LAMSCONSTANTS->param_uid.'='.$USER->username.
'&'.$LAMSCONSTANTS->param_method.'='.$LAMSCONSTANTS->learner_method.
'&'.$LAMSCONSTANTS->param_timestamp.'='.urlencode($datetime).
'&'.$LAMSCONSTANTS->param_serverid.'='.$CFG->lams_serverid.
'&'.$LAMSCONSTANTS->param_hash.'='.$hash.
'&'.$LAMSCONSTANTS->param_lsid.'='.$lams->learning_session_id.
'&'.$LAMSCONSTANTS->param_courseid.'='.$lams->course;
print_simple_box_start('center');
echo ''.get_string("openlearner", "lams").'';
print_simple_box_end();
}
if ($lams->introduction) {
print_simple_box(format_text($lams->introduction), 'center', '70%', '', 5, 'generalbox', 'description');
echo ' '; } /// Finish the page echo ' |