'.&mt('This may take a few moments to display.').'
'); +sub endGradeScreen { + my ($r)=@_; + $r->print('--- loncom/interface/lonquickgrades.pm 2018/12/01 16:38:06 1.49.6.5 +++ loncom/interface/lonquickgrades.pm 2010/12/03 21:33:52 1.55 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Quick Student Grades Display # -# $Id: lonquickgrades.pm,v 1.49.6.5 2018/12/01 16:38:06 raeburn Exp $ +# $Id: lonquickgrades.pm,v 1.55 2010/12/03 21:33:52 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -29,13 +29,12 @@ package Apache::lonquickgrades; use strict; -use Apache::Constants qw(:common :http REDIRECT); +use Apache::Constants qw(:common :http); use POSIX; use Apache::loncommon; use Apache::lonlocal; use Apache::lonnet; use Apache::grades; -use Apache::lonuserstate; sub handler { my $r = shift; @@ -58,107 +57,107 @@ sub real_handler { return OK; } + # Send header, don't cache this page + &Apache::loncommon::no_cache($r); + $r->send_http_header; + my $showPoints = $env{'course.'.$env{'request.course.id'}.'.grading'} eq 'standard'; + my $notshowSPRSlink = + (($env{'course.'.$env{'request.course.id'}.'.grading'} eq 'external') + || ($env{'course.'.$env{'request.course.id'}.'.grading'} eq 'externalnototals')); + my $notshowTotals= + $env{'course.'.$env{'request.course.id'}.'.grading'} eq 'externalnototals'; + my $showCategories= + $env{'course.'.$env{'request.course.id'}.'.grading'} eq 'categories'; - my $reinitresult; - unless (&Apache::lonnet::allowed('mgr')) { - # Check for critical messages and redirect if present. - my ($redirect,$url) = &Apache::loncommon::critical_redirect(300); - if ($redirect) { - &Apache::loncommon::content_type($r,'text/html'); - $r->header_out(Location => $url); - return REDIRECT; - } + my $title = "Grading and Statistics";#$showPoints ? "Points Display" : "Completed Problems Display"; + my $brcrum = [{href=>"/adm/quickgrades",text => "Points Display"}]; + $r->print(&Apache::loncommon::start_page($title,undef, + {'bread_crumbs' => $brcrum}) + ); - # Check if course needs to be re-initialized - my $loncaparev = $r->dir_config('lonVersion'); - ($reinitresult,my @reinit) = &Apache::loncommon::needs_coursereinit($loncaparev); - - if ($reinitresult eq 'switch') { - &Apache::loncommon::content_type($r,'text/html'); - $r->send_http_header; - $r->print(&Apache::loncommon::check_release_result(@reinit)); - return OK; - } elsif ($reinitresult eq 'update') { - my $cid = $env{'request.course.id'}; - my $cnum = $env{'course.'.$cid.'.num'}; - my $cdom = $env{'course.'.$cid.'.domain'}; - &Apache::loncommon::content_type($r,'text/html'); - $r->send_http_header; - &startpage($r,$showPoints); - my $preamble = '
'.&mt('Students do not see total points.').' | '); } + if ($notshowSPRSlink){ $r->print (''.&mt('Students do not see link to spreadsheet.').' | '); } + if ($showPoints) { $r->print (''.&mt('Students will see points based on problem weights.').' | '); } + if ($showCategories) { $r->print (''.&mt('Students will see points based on categories.').' | '); } + $r->print(''.&Apache::lonhtmlcommon::coursepreflink(&mt('Grade display settings'),'grading').' |
' - .&mt('This screen shows how many problems (or problem parts) you have completed' - .', and how many you have not yet done.' - .' You can also look at [_1]a detailed score sheet[_2].' - ,'','') - .'
'); + + $r->print(''.&mt('This may take a few moments to display.').'
'); +sub endGradeScreen { + my ($r)=@_; + $r->print('