--- loncom/interface/spreadsheet/lonspreadsheet.pm 2003/11/11 15:48:03 1.28 +++ loncom/interface/spreadsheet/lonspreadsheet.pm 2004/02/24 20:52:20 1.35 @@ -1,5 +1,5 @@ # -# $Id: lonspreadsheet.pm,v 1.28 2003/11/11 15:48:03 matthew Exp $ +# $Id: lonspreadsheet.pm,v 1.35 2004/02/24 20:52:20 matthew Exp $ # # Copyright Michigan State University Board of Trustees # @@ -227,9 +227,12 @@ sub handler { } 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{'course.'.$courseid.'.grading'} eq 'standard') { + if ($ENV{'course.'.$courseid.'.grading'} eq 'standard' || + $ENV{'course.'.$courseid.'.grading'} eq 'external' ) { return HTTP_NOT_ACCEPTABLE; } } @@ -253,10 +256,12 @@ sub handler { $symb = $ENV{'form.usymb'} if (exists($ENV{'form.usymb'})); my $name = $ENV{'user.name'}; my $domain = $ENV{'user.domain'}; - if (exists($ENV{'form.sname'})) { + if (exists($ENV{'form.sname'}) && $ENV{'form.sname'} ne '') { $name = $ENV{'form.sname'}; $domain = $ENV{'form.sdomain'}; } + $ENV{'form.sname'} = $name; + $ENV{'form.sdomain'} = $domain; ## ## Check permissions my $allowed_to_edit = &Apache::lonnet::allowed('mgr', @@ -355,14 +360,22 @@ sub handler { editwin.close(); } - editwin = window.open($nothing,'CellEditWin','height=280,width=480,scrollbars=no,resizeable=yes,alwaysRaised=yes,dependent=yes',true); + editwin = window.open($nothing,'CellEditWin','height=280,width=480,scrollbars=no,resizable=yes,alwaysRaised=yes,dependent=yes',true); editwin.document.write(edit_text); } //--> ENDSCRIPT } + &Apache::lonhtmlcommon::clear_breadcrumbs(); + &Apache::lonhtmlcommon::add_breadcrumb + ({href => $r->uri, + title => &mt('Spreadsheet'), + text => &mt('Spreadsheet'), + faq => 134, + bug => 'Spreadsheet'}); $r->print(''.&Apache::loncommon::bodytag('Grades Spreadsheet'). + &Apache::lonhtmlcommon::breadcrumbs(undef,&mt('Spreadsheet')). '
'); $r->print(&hiddenfield('sname' ,$ENV{'form.sname'}). &hiddenfield('sdomain',$ENV{'form.sdomain'}). @@ -467,11 +480,9 @@ END $r->rflush(); # $r->print(""); - if ($sheettype eq 'classcalc') { - $r->print(''); - } + $r->print(''); if ($allowed_to_view) { $r->print('
'. - ''. + ''. &Apache::loncommon::help_open_topic("Spreadsheet_About",