');
+ $request->print('');#LC_grade_show_user_body
+ $request->print('');#LC_grade_show_user
# print end of form
@@ -3149,14 +3173,12 @@ sub viewgrades {
$sectionClass=&mt('Students in Section(s) [_1]',$section_display).'';
}
$result.='
'.&mt('Assign Common Grade To [_1]',$sectionClass);
- $result.= '
'."\n".
- '
';
+ $result.= &Apache::loncommon::start_data_table();
#radio buttons/text box for assigning points for a section or class.
#handles different parts of a problem
my ($partlist,$handgrade,$responseType) = &response_type($symb);
my %weight = ();
my $ctsparts = 0;
- $result.='
';
my %seen = ();
my @part_response_id = &flatten_responseType($responseType);
foreach my $part_response_id (@part_response_id) {
@@ -3168,12 +3190,14 @@ sub viewgrades {
my $wgt = &Apache::lonnet::EXT('resource.'.$partid.'.weight',$symb);
$weight{$partid} = $wgt eq '' ? '1' : $wgt;
+ $result.=&Apache::loncommon::start_data_table_row().'
';
$result.=''."\n";
$result.=''."\n";
my $display_part=&get_display_part($partid,$symb);
- $result.='
Part: '.$display_part.' Point:
';
+ $result.=
+ 'Part: '.$display_part.' Point:
';
$result.='
';
my $ctr = 0;
while ($ctr<=$weight{$partid}) { # display radio buttons in a nice table 10 across
@@ -3188,26 +3212,27 @@ sub viewgrades {
$partid.'" size="4" '.'onChange="javascript:writePoint(\''.
$partid.'\','.$weight{$partid}.',\'textval\')" /> /'.
$weight{$partid}.' (problem weight)'."\n";
- $result.= '
'."\n".
+ $result.=&Apache::loncommon::end_data_table()."\n".
'';
$result.='';
+ 'onClick="javascript:resetEntry('.$ctsparts.');" />';
#table listing all the students in a section/class
#header of table
$result.= '
Assign Grade to Specific Students in '.$sectionClass;
- $result.= '
';
+ $result.=&Apache::loncommon::end_data_table_header_row();
my %last_resets =
&get_last_resets($symb,$env{'request.course.id'},\@partids);
@@ -3248,7 +3273,7 @@ sub viewgrades {
$result.=&viewstudentgrade($symb,$env{'request.course.id'},
$_,$$fullname{$_},\@parts,\%weight,$ctr,\%last_resets);
}
- $result.='
';
+ $result.=&Apache::loncommon::end_data_table();
$result.=''."\n";
$result.=''."\n";
@@ -3271,7 +3296,7 @@ sub viewstudentgrade {
my ($uname,$udom) = split(/:/,$student);
my %record=&Apache::lonnet::restore($symb,$courseid,$udom,$uname);
my %aggregates = ();
- my $result='
'.
+ my $result=&Apache::loncommon::start_data_table_row().'
'.
''.
"\n".$ctr.'
'.
'
'."\n";
}
}
- $result.='
';
+ $result.=&Apache::loncommon::end_data_table_row();
return $result;
}
@@ -3337,15 +3362,14 @@ sub editgrades {
my $symb=&get_symb($request);
my $section_display = join (", ",&Apache::loncommon::get_env_multiple('form.section'));
- my $title='
'."\n";
- my $noupdate;
+ $result .= &Apache::loncommon::end_data_table_header_row().
+ &Apache::loncommon::start_data_table_header_row().
+ $header.
+ &Apache::loncommon::end_data_table_header_row();
+ my @noupdate;
my ($updateCtr,$noupdateCtr) = (1,1);
for ($i=0; $i<$env{'form.total'}; $i++) {
my $line;
@@ -3407,7 +3432,9 @@ sub editgrades {
my $usec=$classlist->{"$uname:$udom"}[5];
if (!&canmodify($usec)) {
my $numcols=scalar(@partid)*4+2;
- $noupdate.=$line."
Not allowed to modify student
";
+ push(@noupdate,
+ $line."
".
+ &mt('Not allowed to modify student')."
");
next;
}
my %aggregate = ();
@@ -3476,7 +3503,7 @@ sub editgrades {
'
'.$awarded.'
';
}
}
- $line.=''."\n";
+ $line.="\n";
my $cdom = $env{'course.'.$env{'request.course.id'}.'.domain'};
my $cnum = $env{'course.'.$env{'request.course.id'}.'.num'};
@@ -3509,10 +3536,13 @@ sub editgrades {
}
}
- $result.='
'."\n".
- &show_grading_menu_form ($symb);
- my $msg = ' Number of records updated = '.$rec_update.
- ' for '.$count.' student'.($count <= 1 ? '' : 's').'. '.
- 'Total number of students = '.$env{'form.total'}.' ';
+ $result .= &Apache::loncommon::end_data_table().
+ &show_grading_menu_form($symb);
+ my $msg = '
'.
+ &mt('Number of records updated = [_1] for [quant,_2,student].',
+ $rec_update,$count).' '.
+ ''.&mt('Total number of students = [_1]',$env{'form.total'}).
+ '
';
return $title.$msg.$result;
}
@@ -5219,6 +5261,7 @@ sub scan_data {
sub scantron_parse_scanline {
my ($line,$whichline,$scantron_config,$scan_data,$just_header)=@_;
+
my %record;
my $questions=substr($line,$$scantron_config{'Qstart'}-1); # Answers
my $data=substr($line,0,$$scantron_config{'Qstart'}-1); # earlier stuff
@@ -5257,7 +5300,9 @@ sub scantron_parse_scanline {
my $questnum=0;
my $ansnum =1; # Multiple 'answer lines'/question.
- while ($questions) {
+ chomp($questions); # Get rid of any trailing \n.
+ $questions =~ s/\r$//; # Get rid of trailing \r too (MAC or Win uploads).
+ while (length($questions)) {
my $answers_needed = $bubble_lines_per_response{$questnum};
my $answer_length = $$scantron_config{'Qlength'} * $answers_needed;
@@ -5300,9 +5345,8 @@ sub scantron_parse_scanline {
}
if (!&scan_data($scan_data,"$whichline.no_bubble.$questnum")) {
push(@{$record{"scantron.missingerror"}},$questnum);
- $ansnum += $answers_needed;
+ # $ansnum += $answers_needed;
}
-
} else {
for (my $ans = 0; $ans < $answers_needed; $ans++) {
$record{"scantron.$ansnum.answer"} = substr($currentquest, $ans, 1);
@@ -6460,7 +6504,8 @@ ENDSCRIPT
join(',',@{$arg}).'" />');
foreach my $question (@{$arg}) {
my $selected = &get_response_bubbles($scan_record, $question);
- &scantron_bubble_selector($r,$scan_config,$question);
+ my @select_array = split(/:/,$selected); # ought to be an array of empties.
+ &scantron_bubble_selector($r,$scan_config,$question, @select_array);
}
} else {
$r->print("\n
");
@@ -6480,7 +6525,7 @@ ENDSCRIPT
$r - Apache request object
$scan_config - hash from &get_scantron_config()
$quest - number of the bubble line to make a corrector for
- $lines - array of answer lines.
+ @lines - array of answer lines.
=cut
@@ -6851,6 +6896,9 @@ sub scantron_validate_missingbubbles {
$scan_data);
if (!defined($$scan_record{'scantron.missingerror'})) { next; }
my @to_correct;
+
+ # Probably here's where the error is...
+
foreach my $missing (@{$$scan_record{'scantron.missingerror'}}) {
if ($missing > $max_bubble) { next; }
push(@to_correct,$missing);
@@ -7183,7 +7231,7 @@ sub show_grading_menu_form {
''."\n".
''."\n".
''."\n".
- ''."\n".
+ ''."\n".
''."\n";
return $result;
}
@@ -7253,7 +7301,7 @@ sub grading_menu {
$Str .= ''.
''."\n".
''."\n".
- ''."\n".
+ ''."\n".
''."\n".
''."\n".
''."\n";
@@ -7277,7 +7325,6 @@ sub grading_menu {
$Str .= ' '.(' 'x8).$menudata->{'short_description'}.
"\n";
}
- $Str .="\n";
$Str .="\n";
$request->print(<
@@ -7364,9 +7411,8 @@ sub submit_options {
GRADINGMENUJS
&commonJSfunctions($request);
- my $result='
Manual Grading/View Submission
';
my ($table,undef,$hdgrade) = &showResourceInfo($symb,$probTitle);
- $result.=$table;
+ my $result;
my (undef,$sections) = &getclasslist('all','0');
my $savedState = &savedState();
my $saveCmd = ($$savedState{'saveCmd'} eq '' ? 'submission' : $$savedState{'saveCmd'});
@@ -7383,102 +7429,104 @@ GRADINGMENUJS
''."\n".
''."\n";
- $result.='