Diff for /loncom/interface/spreadsheet/lonspreadsheet.pm between versions 1.29 and 1.31.2.1

version 1.29, 2003/11/11 20:27:15 version 1.31.2.1, 2004/02/24 21:03:09
Line 227  sub handler { Line 227  sub handler {
     }      }
     my $courseid = $ENV{'request.course.id'};      my $courseid = $ENV{'request.course.id'};
     #      #
     # Do not allow students to continue if standard grading is in effect.      # Do not allow students to continue if standard or external grading is in
       # effect.
       #
     if ($ENV{'request.role'} =~ /^st\./) {      if ($ENV{'request.role'} =~ /^st\./) {
         if ($ENV{'course.'.$courseid.'.grading'} eq 'standard') {          if ($ENV{'course.'.$courseid.'.grading'} eq 'standard' ||
       $ENV{'course.'.$courseid.'.grading'} eq 'external' ) {
             return HTTP_NOT_ACCEPTABLE;              return HTTP_NOT_ACCEPTABLE;
         }          }
     }      }
Line 253  sub handler { Line 256  sub handler {
     $symb = $ENV{'form.usymb'} if (exists($ENV{'form.usymb'}));      $symb = $ENV{'form.usymb'} if (exists($ENV{'form.usymb'}));
     my $name   = $ENV{'user.name'};      my $name   = $ENV{'user.name'};
     my $domain = $ENV{'user.domain'};      my $domain = $ENV{'user.domain'};
     if (exists($ENV{'form.sname'})) {      if (exists($ENV{'form.sname'}) && $ENV{'form.sname'} ne '') {
         $name   = $ENV{'form.sname'};          $name   = $ENV{'form.sname'};
         $domain = $ENV{'form.sdomain'};          $domain = $ENV{'form.sdomain'};
     }      }
       $ENV{'form.sname'} = $name;
       $ENV{'form.sdomain'} = $domain;
     ##      ##
     ## Check permissions      ## Check permissions
     my $allowed_to_edit = &Apache::lonnet::allowed('mgr',      my $allowed_to_edit = &Apache::lonnet::allowed('mgr',
Line 467  END Line 472  END
     $r->rflush();      $r->rflush();
     #      #
     $r->print("<table><tr>");      $r->print("<table><tr>");
     if ($sheettype eq 'classcalc') {      $r->print('<td><input type="submit" value="'.
         $r->print('<td><input type="submit" value="'.                &mt('Generate Spreadsheet').'" />'.
   &mt('Generate Spreadsheet').'" />'.                '</td>');
                   '</td>');  
     }  
     if ($allowed_to_view) {      if ($allowed_to_view) {
         $r->print('<td>'.          $r->print('<td>'.
                   &Apache::loncommon::help_open_topic("Spreadsheet_About",                    &Apache::loncommon::help_open_topic("Spreadsheet_About",

Removed from v.1.29  
changed lines
  Added in v.1.31.2.1


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>