'.
+ '
'.&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').' ';
@@ -3336,7 +3343,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++;
}
@@ -3851,7 +3858,6 @@ ENDPICK
}
sub csvupload_fields {
- my ($symb) = @_;
my ($symb,$errorref) = @_;
my (@parts) = &getpartlist($symb,$errorref);
if (ref($errorref)) {
@@ -3960,7 +3966,7 @@ sub csvuploadmap {
my ($i,$keyfields);
if (@records) {
my $fieldserror;
- my @fields=&csvupload_fields($symb,\$fieldserror);
+ my @fields=&csvupload_fields($symb,\$fieldserror);
if ($fieldserror) {
$request->print(&navmap_errormsg());
return;
@@ -4204,7 +4210,7 @@ LISTJAVASCRIPT
my ($titles,$symbx) = &getSymbMap($map_error);
if ($map_error) {
$request->print(&navmap_errormsg());
- return;
+ return;
}
my ($curpage) =&Apache::lonnet::decode_symb($symb);
# my ($curpage,$mapId) =&Apache::lonnet::decode_symb($symb);
@@ -4543,13 +4549,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: [_1]',$display_part).' '
+ .'
'
+ .'('.&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'
@@ -4560,7 +4569,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).'
';
}
}
@@ -4621,6 +4631,7 @@ sub updateGradeByPage {
$request->print($result);
+
my $navmap = Apache::lonnavmaps::navmap->new();
unless (ref($navmap)) {
$request->print(&navmap_errormsg());
@@ -4770,7 +4781,7 @@ sub updateGradeByPage {
#
#-------------------------------------------------------------------
-#--------------------Bubblesheet (Scantron) Grading-----------------------------------
+#-------------------- Bubblesheet (Scantron) Grading -------------------
#
#------ start of section for handling grading by page/sequence ---------
@@ -4829,9 +4840,7 @@ the homework problem.
Returns html hidden inputs used to hold context/default values.
Arguments:
- $symb - $symb of the current resource
- $map_error - ref to scalar which will container error if
- $navmap object is unavailable in &getSymbMap().
+ $symb - $symb of the current resource
=cut
@@ -4850,7 +4859,9 @@ sub defaultFormData {
Return html dropdown of possible sequences to grade
Arguments:
- $symb - $symb of the current resource
+ $symb - $symb of the current resource
+ $map_error - ref to scalar which will container error if
+ $navmap object is unavailable in &getSymbMap().
=cut
@@ -6757,7 +6768,7 @@ sub scantron_validate_ID {
#get scantron line setup
my %scantron_config=&get_scantron_config($env{'form.scantron_format'});
my ($scanlines,$scan_data)=&scantron_getfile();
-
+
my $nav_error;
&scantron_get_maxbubble(\$nav_error); # parse needs the bubble_lines.. array.
if ($nav_error) {
@@ -7399,7 +7410,6 @@ sub scantron_validate_doublebubble {
sub scantron_get_maxbubble {
my ($nav_error) = @_;
-
if (defined($env{'form.scantron_maxbubble'}) &&
$env{'form.scantron_maxbubble'}) {
&restore_bubble_lines();
@@ -7414,7 +7424,6 @@ sub scantron_get_maxbubble {
if (ref($nav_error)) {
$$nav_error = 1;
}
- return;
}
my $map=$navmap->getResourceByUrl($sequence);
my @resources=$navmap->retrieveResources($map,\&scantron_filter,1,0);
@@ -7578,15 +7587,8 @@ sub scantron_process_students {
my (%grader_partids_by_symb,%grader_randomlists_by_symb);
&graders_resources_pass(\@resources,\%grader_partids_by_symb,
\%grader_randomlists_by_symb);
- my $resource_error;
foreach my $resource (@resources) {
- my $ressymb;
- if (ref($resource)) {
- $ressymb = $resource->symb();
- } else {
- $resource_error = 1;
- last;
- }
+ my $ressymb = $resource->symb();
my ($analysis,$parts) =
&scantron_partids_tograde($resource,$env{'request.course.id'},
$env{'user.name'},$env{'user.domain'},1);
@@ -7598,10 +7600,6 @@ sub scantron_process_students {
}
}
}
- if ($resource_error) {
- $r->print(&navmap_errormsg());
- return '';
- }
my ($uname,$udom);
my $result= <
symb();
- } else {
- $res_error = 1;
- last;
- }
+ my $ressymb = $resource->symb();
if ((exists($grader_randomlists_by_symb{$ressymb})) ||
(ref($grader_partids_by_symb{$ressymb}) ne 'ARRAY')) {
my ($analysis,$parts) =
@@ -7691,12 +7683,6 @@ SCANTRONFORM
}
}
- if ($res_error) {
- &scantron_add_delay(\@delayqueue,$line,
- 'An error occurred while grading student '.$uname,2);
- next;
- }
-
&Apache::lonxml::clear_problem_counter();
&Apache::lonnet::appenv($scan_record);
@@ -8447,36 +8433,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 Bubblesheets'),
- short_description =>
- &mt('Grade bubblesheet exams, upload/download bubblesheet data files, and review previously graded bubblesheet exams.')});
- $fields{'command'} = 'verify';
- $url = &Apache::lonhtmlcommon::build_url('grades/',\%fields);
- push(@menu, { url => "",
- name => &mt('Verify Receipt No.'),
- 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 Bubblesheet 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').' ';
@@ -8488,24 +8488,15 @@ sub grading_menu {
' '."\n".
' '."\n".
' '."\n";
- foreach my $menudata (@menu) {
- if ($menudata->{'name'} ne &mt('Verify Receipt No.')) {
- $Str .=' \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.'
-
-
-
-
-
'."\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.='
-
-
-
-
-
- '.&Apache::lonstatistics::GroupSelect('group','multiple',5).'
-
-
-
-
-
- '.&Apache::lonhtmlcommon::StatusOptions($saveStatus,undef,5,undef,'mult').'
-
-
-
-
-
-
- '.&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 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;