version 1.5, 2002/08/27 19:59:08
|
version 1.6, 2002/08/27 20:29:54
|
Line 64 ENDDOCUMENT
|
Line 64 ENDDOCUMENT
|
'ggg_grading' => 'Grading Information', |
'ggg_grading' => 'Grading Information', |
'hhh_readings' => 'Readings'); |
'hhh_readings' => 'Readings'); |
|
|
|
# --------------------------------------------------------------- Force Student |
|
&Apache::loncommon::get_unprocessed_cgi |
|
($ENV{'QUERY_STRING'},['forcestudent']); |
|
my $forcestudent=''; |
|
if ($ENV{'form.forcestudent'}) { $forcestudent='student'; }; |
|
|
# ------------------------------------- There is such a course, get environment |
# ------------------------------------- There is such a course, get environment |
my %courseenv=&Apache::lonnet::dump('environment',$cdom,$cnum); |
my %courseenv=&Apache::lonnet::dump('environment',$cdom,$cnum); |
$r->print(&Apache::loncommon::bodytag("Syllabus",'','','',$cdom)); |
$r->print(&Apache::loncommon::bodytag |
|
("Syllabus",$forcestudent,'','',$cdom)); |
$r->print('<h1>'.$courseenv{'description'}.'</h1><h3>'. |
$r->print('<h1>'.$courseenv{'description'}.'</h1><h3>'. |
$Apache::lonnet::domaindescription{$cdom}.'</h3>'); |
$Apache::lonnet::domaindescription{$cdom}.'</h3>'); |
my %syllabus=&Apache::lonnet::dump('syllabus',$cdom,$cnum); |
my %syllabus=&Apache::lonnet::dump('syllabus',$cdom,$cnum); |
Line 79 ENDDOCUMENT
|
Line 85 ENDDOCUMENT
|
# does this user have privileges to post, etc? |
# does this user have privileges to post, etc? |
if ($ENV{'request.course.id'}) { |
if ($ENV{'request.course.id'}) { |
$allowed=&Apache::lonnet::allowed('srm',$ENV{'request.course.id'}); |
$allowed=&Apache::lonnet::allowed('srm',$ENV{'request.course.id'}); |
|
if ($forcestudent) { $allowed=0; } |
} |
} |
|
if ($allowed) { |
|
$r->print( |
|
'<p><a href="'.$r->uri.'?forcestudent=1">Show Student View</a></p>'); |
|
} |
if (($allowed) && ($ENV{'form.storesyl'})) { |
if (($allowed) && ($ENV{'form.storesyl'})) { |
foreach (keys %syllabusfields) { |
foreach (keys %syllabusfields) { |
my $field=$ENV{'form.'.$_}; |
my $field=$ENV{'form.'.$_}; |