--- loncom/homework/grades.pm 2009/05/07 19:36:45 1.572 +++ loncom/homework/grades.pm 2009/05/18 20:07:34 1.574.2.1 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # The LON-CAPA Grading handler # -# $Id: grades.pm,v 1.572 2009/05/07 19:36:45 www Exp $ +# $Id: grades.pm,v 1.574.2.1 2009/05/18 20:07:34 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -2135,10 +2135,9 @@ KEYWORDS {'one_time' => 1}); $similar="

". - &mt('Essay is [_1]% similar to an essay by [_2] ([_3]:[_4]) in course [_5] (course id [_6]:[_7])', + &mt('Essay is [_1]% similar to an essay by [_2] in course [_3] (course id [_4]:[_5])', $osim, - &Apache::loncommon::plainname($oname,$odom), - $oname,$odom, + &Apache::loncommon::plainname($oname,$odom).' ('.$oname.':'.$odom.')', $old_course_desc{'description'}, $old_course_desc{'num'}, $old_course_desc{'domain'}). @@ -2463,7 +2462,7 @@ sub processHandGrade { undef,$feedurl,undef, undef,undef,$showsymb, $restitle); - $request->print('
'.&mt('Sending message to [_1]:[_2]',$uname,$udom).': '. + $request->print('
'.&mt('Sending message to [_1]',$uname.':'.$udom).': '. $msgstatus); } if ($env{'form.collaborator'.$ctr}) { @@ -3681,7 +3680,7 @@ sub split_part_type { # #--- Javascript to handle csv upload sub csvupload_javascript_reverse_associate { - my $error1=&mt('You need to specify the username or ID'); + my $error1=&mt('You need to specify the username or the student/employee ID'); my $error2=&mt('You need to specify at least one grading field'); return(< correct the student/employee ID number + 'ID' -> correct the student/employee ID 'CODE' -> correct the CODE 'answer' -> fixup the submitted answers) @@ -8279,50 +8278,36 @@ sub grading_menu { 'saveState'=>"", 'gradingMenu'=>1, 'showgrading'=>"yes"); - - my $url1 = &Apache::lonhtmlcommon::build_url('grades/',\%fields); - + 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.'), + }); $fields{'command'} = 'csvform'; - my $url2 = &Apache::lonhtmlcommon::build_url('grades/',\%fields); - + $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.')}); $fields{'command'} = 'processclicker'; - my $url3 = &Apache::lonhtmlcommon::build_url('grades/',\%fields); - + $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.')}); $fields{'command'} = 'scantron_selectphase'; - 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); - # + $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('')}); # Create the menu my $Str; # $Str .= '

'.&mt('Please select a grading task').'

'; @@ -8334,15 +8319,24 @@ sub grading_menu { ''."\n". ''."\n". ''."\n"; - - $Str .= Apache::lonhtmlcommon::generate_menu(@menu); - #$menudata->{'jscript'} - $Str .='
'. - &Apache::lonnet::recprefix($env{'request.course.id'}). - '-'; - + 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 .="\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.=''."\n"; + } + } $result.= '   '; $result.=' -
- -
- - '.&mt('Groups').' - - '.&Apache::lonstatistics::GroupSelect('group','multiple',5).' -
- -
- - '.&mt('Access Status').' - - '.&Apache::lonhtmlcommon::StatusOptions($saveStatus,undef,5,undef,'mult').' -
- -
- - '.&mt('Submission Status').' - - + + + + - -
- -
- -
-
-
+ +
+
+
+
+
-
-
+
+

'.&mt('Grade Complete Folder for One Student').'

-
-
+
+
+
-
- +
+
+
+
+
'; $result .= &show_grading_menu_form($symb); return $result;