--- loncom/interface/Attic/lonspreadsheet.pm 2001/03/27 14:37:18 1.52 +++ loncom/interface/Attic/lonspreadsheet.pm 2001/04/05 21:35:02 1.53 @@ -5,7 +5,7 @@ # 12/08,12/09,12/11,12/12,12/15,12/16,12/18,12/19,12/30, # 01/01/01,02/01,03/01,19/01,20/01,22/01, # 03/05,03/08,03/10,03/12,03/13,03/15,03/17, -# 03/19,03/20,03/21,03/27 Gerd Kortemeyer +# 03/19,03/20,03/21,03/27,04/05 Gerd Kortemeyer package Apache::lonspreadsheet; @@ -1507,6 +1507,7 @@ sub forcedrecalc { my ($uname,$udom,$stype,$usymb)=@_; my $key=$uname.':'.$udom.':'.$stype.':'.$usymb; my $time=$oldsheets{$key.'.time'}; + if ($ENV{'form.forcerecalc'}) { return 1; } unless ($time) { return 1; } if ($stype eq 'assesscalc') { my $map=(split(/\_\_\_/,$usymb))[0]; @@ -1852,6 +1853,17 @@ ENDSCRIPT $r->print('

'. $ENV{'course.'.$ENV{'request.course.id'}.'.description'}.'

'); +# ---------------------------------------------------- See if user can see this + + if ((&gettype($asheet) eq 'classcalc') || + (&getuname($asheet) ne $ENV{'user.name'}) || + (&getudom($asheet) ne $ENV{'user.domain'})) { + unless (&Apache::lonnet::allowed('vgr',&getcid($asheet))) { + $r->print( + '

Access Permission Denied

'); + return OK; + } + } # ---------------------------------------------------- See if something to save @@ -1874,6 +1886,26 @@ ENDSCRIPT &tmpwrite($asheet); +# ---------------------------------------------------------- Additional options + + $r->print( + '

' + ); + if (&gettype($asheet) eq 'assesscalc') { + $r->print ('

Level up: Student Sheet

'); + } + + if ((&gettype($asheet) eq 'studentcalc') && + (&Apache::lonnet::allowed('vgr',&getcid($asheet)))) { + $r->print ( + '

'. + 'Level up: Course Sheet

'); + } + + # ----------------------------------------------------------------- Save dialog