';
my $files=&get_submitted_files($udom,$uname,$partid,$respid,\%record);
if (@$files) {
$lastsubonly.='
';
@@ -2266,11 +2300,12 @@ KEYWORDS
my @partlist;
my @gradePartRespid;
my @part_response_id = &flatten_responseType($responseType);
- $request->print('
');
if ($perm{'vgr'}) {
@@ -3338,7 +3374,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++;
}
@@ -3853,7 +3889,6 @@ ENDPICK
}
sub csvupload_fields {
- my ($symb) = @_;
my ($symb,$errorref) = @_;
my (@parts) = &getpartlist($symb,$errorref);
if (ref($errorref)) {
@@ -3962,7 +3997,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;
@@ -4206,7 +4241,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);
@@ -4471,11 +4506,13 @@ sub displayPage {
}
if (&canmodify($usec)) {
+ $studentTable.=&gradeBox_start();
foreach my $partid (@{$parts}) {
$studentTable.=&gradeBox($request,$symbx,$uname,$udom,$question,$partid,\%record);
$studentTable.='
'."\n";
$question++;
}
+ $studentTable.=&gradeBox_end();
$prob++;
}
$studentTable.='';
@@ -4545,13 +4582,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'
@@ -4562,7 +4602,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).'
';
}
}
@@ -4623,6 +4664,7 @@ sub updateGradeByPage {
$request->print($result);
+
my $navmap = Apache::lonnavmaps::navmap->new();
unless (ref($navmap)) {
$request->print(&navmap_errormsg());
@@ -4772,7 +4814,7 @@ sub updateGradeByPage {
#
#-------------------------------------------------------------------
-#--------------------Bubblesheet (Scantron) Grading-----------------------------------
+#-------------------- Bubblesheet (Scantron) Grading -------------------
#
#------ start of section for handling grading by page/sequence ---------
@@ -4831,9 +4873,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
@@ -4852,7 +4892,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
@@ -6759,7 +6801,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) {
@@ -7401,7 +7443,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();
@@ -7416,7 +7457,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);
@@ -8449,36 +8489,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 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 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').' ';
@@ -8490,24 +8544,15 @@ sub grading_menu {
'
'."\n".
'
'."\n".
'
'."\n";
- foreach my $menudata (@menu) {
- if ($menudata->{'name'} ne &mt('Verify Receipt')) {
- $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;