--- loncom/homework/grades.pm 2009/06/06 19:36:37 1.574.2.2 +++ loncom/homework/grades.pm 2009/05/23 19:01:13 1.575 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # The LON-CAPA Grading handler # -# $Id: grades.pm,v 1.574.2.2 2009/06/06 19:36:37 raeburn Exp $ +# $Id: grades.pm,v 1.575 2009/05/23 19:01:13 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -2296,7 +2296,7 @@ KEYWORDS '710'."\n"; my $nsel = ($env{'form.NTSTU'} ne '' ? $env{'form.NTSTU'} : '1'); $ntstu =~ s/$nsel$nsel; - $endform.=&mt('[_1]student(s)',$ntstu); + $endform.=&mt('[quant,_1,student]',$ntstu); $endform.=' '."\n". ''."\n". ''."\n". - ''."\n". + ''."\n". ''."\n". &Apache::loncommon::end_data_table_row()."\n". &Apache::loncommon::end_data_table()."\n". @@ -7474,8 +7474,8 @@ SCANTRONFORM my $lock=&Apache::lonnet::set_lock(&mt('Grading bubblesheet exam')); my $count=&get_todo_count($scanlines,$scan_data); - my %prog_state=&Apache::lonhtmlcommon::Create_PrgWin($r,'Scantron Status', - 'Scantron Progress',$count, + my %prog_state=&Apache::lonhtmlcommon::Create_PrgWin($r,'Bubblesheet Status', + 'Bubblesheet Progress',$count, 'inline',undef,'scantronupload'); &Apache::lonhtmlcommon::Update_PrgWin($r,\%prog_state, 'Processing first student'); @@ -7759,7 +7759,7 @@ sub scantron_upload_scantron_data { &Apache::lonhtmlcommon::end_pick_box().' - + '); return ''; @@ -7777,7 +7777,7 @@ sub scantron_upload_scantron_data_save { if (!&Apache::lonnet::allowed('usc',$env{'form.domainid'}) && !&Apache::lonnet::allowed('usc', $env{'form.domainid'}.'_'.$env{'form.courseid'})) { - $r->print(&mt("You are not allowed to upload Scantron data to the requested course.").""); + $r->print(&mt("You are not allowed to upload bubblesheet data to the requested course.").""); if ($symb) { $r->print(&show_grading_menu_form($symb)); } else { @@ -8278,36 +8278,50 @@ sub grading_menu { 'saveState'=>"", 'gradingMenu'=>1, 'showgrading'=>"yes"); - my $url = &Apache::lonhtmlcommon::build_url('grades/',\%fields); - my @menu = ({ url => $url, - name => &mt('Manual Grading/View Submissions'), - short_description => - &mt('Start the process of hand grading submissions.'), - }); + + my $url1 = &Apache::lonhtmlcommon::build_url('grades/',\%fields); + $fields{'command'} = 'csvform'; - $url = &Apache::lonhtmlcommon::build_url('grades/',\%fields); - push(@menu, { url => $url, - name => &mt('Upload Scores'), - short_description => - &mt('Specify a file containing the class scores for current resource.')}); + my $url2 = &Apache::lonhtmlcommon::build_url('grades/',\%fields); + $fields{'command'} = 'processclicker'; - $url = &Apache::lonhtmlcommon::build_url('grades/',\%fields); - push(@menu, { url => $url, - name => &mt('Process Clicker'), - short_description => - &mt('Specify a file containing the clicker information for this resource.')}); + my $url3 = &Apache::lonhtmlcommon::build_url('grades/',\%fields); + $fields{'command'} = 'scantron_selectphase'; - $url = &Apache::lonhtmlcommon::build_url('grades/',\%fields); - push(@menu, { url => $url, - name => &mt('Grade/Manage/Review Scantron Forms'), - short_description => - &mt('Grade scantron exams, upload/download scantron data files, and review previously graded scantron exams.')}); - $fields{'command'} = 'verify'; - $url = &Apache::lonhtmlcommon::build_url('grades/',\%fields); - push(@menu, { url => "", - name => &mt('Verify Receipt'), - short_description => - &mt('')}); + my $url4 = &Apache::lonhtmlcommon::build_url('grades/',\%fields); + + my @menu = ({ categorytitle=>'Course Grading', + items =>[ + { linktext => 'Manual Grading/View Submissions', + url => $url1, + permission => 'F', + icon => 'edit-find-replace.png', + linktitle => 'Start the process of hand grading submissions.' + }, + { linktext => 'Upload Scores', + url => $url2, + permission => 'F', + icon => 'uploadscores.png', + linktitle => 'Specify a file containing the class scores for current resource.' + }, + { linktext => 'Process Clicker', + url => $url3, + permission => 'F', + icon => 'addClickerInfoFile.png', + linktitle => 'Specify a file containing the clicker information for this resource.' + }, + { linktext => 'Grade/Manage/Review Scantron Forms', + url => $url4, + permission => 'F', + icon => 'stat.png', + linktitle => 'Grade scantron exams, upload/download scantron data files, and review previously graded scantron exams.' + } + ] + }); + + #$fields{'command'} = 'verify'; + #$url = &Apache::lonhtmlcommon::build_url('grades/',\%fields); + # # Create the menu my $Str; # $Str .= ''.&mt('Please select a grading task').''; @@ -8319,24 +8333,15 @@ sub grading_menu { ''."\n". ''."\n". ''."\n"; - foreach my $menudata (@menu) { - if ($menudata->{'name'} ne &mt('Verify Receipt')) { - $Str .=' {'jscript'}. - ' href="'. - $menudata->{'url'}.'" >'. - $menudata->{'name'}."\n"; - } else { - $Str .='{'jscript'}. - ' onClick="javascript:checkChoice(document.forms.gradingMenu,\'5\',\'verify\')" '. - ' /> '. - &Apache::lonnet::recprefix($env{'request.course.id'}). - '-'; - } - $Str .= ' '.(' 'x8).$menudata->{'short_description'}. - "\n"; - } + + $Str .= Apache::lonhtmlcommon::generate_menu(@menu); + #$menudata->{'jscript'} + $Str .=' '. + &Apache::lonnet::recprefix($env{'request.course.id'}). + '-'; + $Str .="\n"; my $receiptalert = &mt("Please enter a receipt number given by a student in the receipt box."); $request->print(<'."\n"; $result.=' - - - - '.&mt('Grade Current Resource').' - - - - '.$table.' - - - - '.&mt('Sections').' - - - '."\n"; - if (ref($sections)) { - foreach my $section (sort(@$sections)) { - $result.=''.$section.''."\n"; - } - } + + '.&mt('Grade Current Resource').' + + + '.$table.' + + + + + + + '.&mt('Sections').' + + '."\n"; + $result.= $selsec; $result.= 'all '; $result.=' - - - - - '.&mt('Groups').' - - - '.&Apache::lonstatistics::GroupSelect('group','multiple',5).' - - - - - '.&mt('Access Status').' - - - '.&Apache::lonhtmlcommon::StatusOptions($saveStatus,undef,5,undef,'mult').' - - - - - '.&mt('Submission Status').' - - - - '.&mt('with submissions').' - '.&mt('in grading queue').' - '.&mt('with ungraded submissions').' - '.&mt('with incorrect submissions').' + + + + + '.&mt('Groups').' + + '.&Apache::lonstatistics::GroupSelect('group','multiple',5).' + + + + + '.&mt('Access Status').' + + '.&Apache::lonhtmlcommon::StatusOptions($saveStatus,undef,5,undef,'mult').' + + + + + '.&mt('Submission Status').' + + + '.&mt('with submissions').' + '.&mt('in grading queue').' + '.&mt('with ungraded submissions').' + '.&mt('with incorrect submissions').' '.&mt('with any status').' - - - - - + + + + + + + + '. &mt('Select individual students to grade and view submissions.').' - + - - + + '. &mt('Grade all selected students in a grading table.').' - - + + - - - + + '.&mt('Grade Complete Folder for One Student').' - - - + + '. + ($saveCmd eq 'pickStudentPage' ? 'checked="checked"' : '').' /> '. &mt('The complete page/sequence/folder: For one student').' - - + + - - - '; $result .= &show_grading_menu_form($symb); return $result;