--- loncom/interface/lonpickcode.pm 2007/01/25 20:34:29 1.12 +++ loncom/interface/lonpickcode.pm 2013/02/01 18:46:37 1.16 @@ -1,7 +1,7 @@ # The LearningOnline Network # Pick a CODE from the list of possible CODEs # -# $Id: lonpickcode.pm,v 1.12 2007/01/25 20:34:29 albertel Exp $ +# $Id: lonpickcode.pm,v 1.16 2013/02/01 18:46:37 bisitz Exp $ # # Copyright Michigan State University Board of Trustees # @@ -69,12 +69,14 @@ sub handler { if (!($env{'request.course.id'}) && (&Apache::lonnet::allowed('usc',$env{'request.course.id'}))) { $r->print(&Apache::loncommon::start_page(). - &mt('Access not allowed.'). + '
'.&mt('Access not allowed.').'
'. &Apache::loncommon::end_page()); return OK; } if ($env{'form.command'} eq 'codelist') { &code_list($r); + $r->print(&Apache::grades::show_grading_menu_form($env{'form.symb'}, + $env{'form.url'})); } elsif ($env{'form.command'} eq 'showcodes') { &show_codes($r); } else { @@ -85,23 +87,44 @@ sub handler { } sub code_list { - my ($r,$secondview)=@_; - if (!$secondview) { + my ($r,$context)=@_; + # $context = 0 Print page header and enclosing table + # $context = 1 No page header, print enclosing table + # $context = 2 No page header, no enclosing table + my $table_head; + my $extra_css; + if (!$context) { $r->print(&Apache::loncommon::start_page("View CODEs",undef, {'no_nav_bar' => 1})); - $r->print("".&mt('Select a set of saved CODEs to view.')."
"); - } else { - $r->print("".&mt('Select another set of saved CODEs to view.')."
"); - } - $r->print(""); - $r->print(&Apache::grades::show_grading_menu_form($env{'form.symb'}, - $env{'form.url'})); + } sub show_codes { @@ -116,14 +139,18 @@ sub show_codes { } $r->print(''); &code_list($r,1); + $r->print(&Apache::grades::show_grading_menu_form($env{'form.symb'}, + $env{'form.url'})); } sub picking_a_code { my ($r)=@_; - $r->print(&Apache::loncommon::start_page("Selecting a CODE",undef, + my $title = 'Selecting a CODE'; + $r->print(&Apache::loncommon::start_page($title,undef, {'no_nav_bar' => 1})); - $r->print(<The CODE on the paper is ".$env{'form.curCODE'}. - ". Please Select a new one.
\n".''); }