--- loncom/homework/grades.pm 2009/06/06 19:36:37 1.574.2.2 +++ loncom/homework/grades.pm 2009/09/17 18:27:30 1.580 @@ -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.580 2009/09/17 18:27:30 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -183,7 +183,8 @@ sub get_display_part { my ($partID,$symb)=@_; my $display=&Apache::lonnet::EXT('resource.'.$partID.'.display',$symb); if (defined($display) and $display ne '') { - $display.= " (id $partID)"; + $display.= ' (' + .&mt('Part ID: [_1]',$partID).')'; } else { $display=$partID; } @@ -217,9 +218,9 @@ sub showResourceInfo { $partsseen{$partID}=1; } my $display_part=&get_display_part($partID,$symb); - $result.=''.&mt('Part').': '.$display_part. + $result.=''.&mt('Part: [_1]',$display_part).''. ' '.$resID.''. - ''.&mt('Type').': '.$responsetype.''; + ''.&mt('Type: [_1]',$responsetype).''; # ''.&mt('Handgrade: [_1]',$handgrade).''; } } @@ -1734,8 +1735,7 @@ sub gradeBox { #&mt('Part:[_1]Points:[_2]or[_3]',$display_part,$radio,$line); $result .= - ''.&mt('Part').':'.$display_part.''.&mt('Points').':'.$radio.''.&mt('or').''.$line.''. - + ''.&mt('Part:').''.$display_part.''.&mt('Points:').''.$radio.''.&mt('or').''.$line.''; $result.=''."\n"; $result.=''."\n". ''."\n". @@ -2113,9 +2113,11 @@ KEYWORDS } my $responsetype = $responseType->{$partid}->{$respid}; if (!exists($record{"resource.$partid.$respid.submission"})) { - $lastsubonly.="\n".'
Part: '. - $display_part.' ( ID '.$respid. - ' )   '. + $lastsubonly.="\n".'
'. + ''.&mt('Part: [_1]',$display_part).''. + ' '. + '('.&mt('Part ID: [_1]',$respid).')'. + '   '. ''.&mt('Nothing submitted - no attempts.').'

'; next; } @@ -2151,9 +2153,11 @@ KEYWORDS ($env{'form.lastSub'} eq 'hdgrade' && $$handgrade{$$part[0].'_'.$$part[1]} eq 'yes')) { my $display_part=&get_display_part($partid,$symb); - $lastsubonly.='
Part: '. - $display_part.' ( ID '.$respid. - ' )   '; + $lastsubonly.='
'. + ''.&mt('Part: [_1]',$display_part).''. + ' '. + '('.&mt('Part ID: [_1]',$respid).')'. + '   '; my $files=&get_submitted_files($udom,$uname,$partid,$respid,\%record); if (@$files) { $lastsubonly.='
'.&mt('Like all files provided by users, this file may contain viruses').'
'; @@ -3294,7 +3298,7 @@ sub viewgrades { $result.= &Apache::loncommon::start_data_table_row()."\n". - ''.&mt('Part').':'.$display_part.''.&mt('Points').':'.$radio.''.&mt('or').''.$line.''. + ''.&mt('Part:').''.$display_part.''.&mt('Points:').''.$radio.''.&mt('or').''.$line.''. &Apache::loncommon::end_data_table_row()."\n"; $ctsparts++; } @@ -4466,13 +4470,16 @@ sub displaySubByDates { my ($responseId)= ($isTask ? ($matchKey=~ /^resource\.(.*?)\.\Q$partid\E\.award$/) : ($matchKey=~ /^resource\.\Q$partid\E\.(.*?)\.submission$/)); - $displaySub[0].=''.&mt('Part:').' '.$display_part.' '; - $displaySub[0].='('.&mt('ID').' '. - $responseId.') '; + $displaySub[0].='' + .' ' + .'('.&mt('Part ID: [_1]',$responseId).')' + .'' + .' '; if ($$record{"$where.$partid.tries"} eq '') { - $displaySub[0].=&mt('Trial not counted'); + $displaySub[0].=&mt('Trial not counted'); } else { - $displaySub[0].=&mt('Trial [_1]', + $displaySub[0].=&mt('Trial: [_1]', $$record{"$where.$partid.tries"}); } my $responseType=($isTask ? 'Task' @@ -4483,7 +4490,8 @@ sub displaySubByDates { &get_order($partid,$responseId,$symb,$uname,$udom, $no_increment); } - $displaySub[0].='  '. + $displaySub[0].=''; # /nobreak + $displaySub[0].='  '. &cleanRecord($$record{$version.':'.$matchKey},$responseType,$symb,$partid,$responseId,$record,$orders{$partid}->{$responseId},"$version:",$uname,$udom).'
'; } } @@ -5199,7 +5207,7 @@ sub scantron_selectphase { &Apache::loncommon::start_data_table_row()."\n". ''."\n". ''."\n". - ''."\n". + ''."\n". ''."\n". &Apache::loncommon::end_data_table_row()."\n". &Apache::loncommon::end_data_table()."\n". @@ -7474,8 +7482,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'); @@ -7709,15 +7717,17 @@ sub scantron_upload_scantron_data { my $syllabuslink = ''.&mt('Syllabus').''. (' 'x2).&mt('(shows course personnel)'); my $default_form_data=&defaultFormData(&get_symb($r,1)); + my $nofile_alert = &mt('Please use the browse button to select a file from your local directory.'); + my $nocourseid_alert = &mt("Please use the 'Select Course' link to open a separate window where you can search for a course to which a file can be uploaded."); $r->print('