--- loncom/interface/lonsyllabus.pm 2002/08/27 19:59:08 1.5 +++ loncom/interface/lonsyllabus.pm 2002/08/27 20:29:54 1.6 @@ -1,7 +1,7 @@ # The LearningOnline Network # Syllabus # -# $Id: lonsyllabus.pm,v 1.5 2002/08/27 19:59:08 www Exp $ +# $Id: lonsyllabus.pm,v 1.6 2002/08/27 20:29:54 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -64,10 +64,16 @@ ENDDOCUMENT 'ggg_grading' => 'Grading Information', '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 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('

'.$courseenv{'description'}.'

'. $Apache::lonnet::domaindescription{$cdom}.'

'); my %syllabus=&Apache::lonnet::dump('syllabus',$cdom,$cnum); @@ -79,7 +85,12 @@ ENDDOCUMENT # does this user have privileges to post, etc? if ($ENV{'request.course.id'}) { $allowed=&Apache::lonnet::allowed('srm',$ENV{'request.course.id'}); + if ($forcestudent) { $allowed=0; } } + if ($allowed) { + $r->print( + '

Show Student View

'); + } if (($allowed) && ($ENV{'form.storesyl'})) { foreach (keys %syllabusfields) { my $field=$ENV{'form.'.$_};