'."\n".
'';
#radio buttons/text box for assigning points for a section or class.
@@ -3116,8 +3131,11 @@ sub viewgrades {
'onClick="javascript:submit();" target="_self" />'."\n";
if (scalar(%$fullname) eq 0) {
my $colspan=3+scalar(@parts);
- $result='There are no students in section "'.$env{'form.section'}.
- '" with enrollment status "'.$env{'form.Status'}.'" to modify or grade.';
+ my $section_display = join (", ",&Apache::loncommon::get_env_multiple('form.section'));
+ $result=''.
+ &mt('There are no students in section(s) [_1] with enrollment status [_2] to modify or grade',
+ $section_display, $env{'form.Status'}).
+ '';
}
$result.=&show_grading_menu_form($symb);
return $result;
@@ -3194,9 +3212,10 @@ sub editgrades {
my ($request) = @_;
my $symb=&get_symb($request);
- my $title='Current Grade Status';
- $title.='Current Resource: '.$env{'form.probTitle'}.' '."\n";
- $title.='Section: '.$env{'form.section'}.''."\n";
+ my $section_display = join (", ",&Apache::loncommon::get_env_multiple('form.section'));
+ my $title=''.&mt('Current Grade Status').'';
+ $title.=''.&mt('Current Resource: [_1]',$env{'form.probTitle'}).' '."\n";
+ $title.=''.&mt('Section: [_1]',$section_display).''."\n";
my $result= ''."\n";
$result.= ''.
@@ -3897,9 +3916,9 @@ LISTJAVASCRIPT
''."\n".
''."\n".
''."\n";
-
- $result.=''."\n".
- ''."\n".
+
+ $result.=&build_section_inputs();
+ $result.=''."\n".
''."\n".
''."\n".
''." \n";
@@ -4413,7 +4432,7 @@ one of the predefined configurations for
like.
Next each scanline is checked for any errors of either 'missing
-bubbles' (it's an error because it may have been missed scanned
+bubbles' (it's an error because it may have been mis-scanned
because too light bubbling), 'double bubble' (each bubble line should
have no more that one letter picked), invalid or duplicated CODE,
invalid student ID
@@ -4424,7 +4443,7 @@ username:domain.
During the validation phase the instructor can choose to skip scanlines.
-After the validation phase, there is now 3 bubble sheet files
+After the validation phase, there are now 3 bubble sheet files
scantron_original_filename (unmodified original file)
scantron_corrected_filename (file where the corrected information has replaced the original information)
@@ -6494,6 +6513,7 @@ sub scantron_validate_doublebubble {
=cut
sub scantron_get_maxbubble {
+
if (defined($env{'form.scantron_maxbubble'}) &&
$env{'form.scantron_maxbubble'}) {
return $env{'form.scantron_maxbubble'};
@@ -6508,14 +6528,40 @@ sub scantron_get_maxbubble {
&Apache::lonxml::clear_problem_counter();
+ my $uname = $env{'form.student'};
+ my $udom = $env{'form.userdom'};
+ my $cid = $env{'request.course.id'};
+ my $total_lines = 0;
+ %bubble_lines_per_response = ();
+
foreach my $resource (@resources) {
+ my $symb = $resource->symb();
my $result=&Apache::lonnet::ssi($resource->src(),
- ('symb' => $resource->symb()));
+ ('symb' => $resource->symb()),
+ ('grade_target' => 'analyze'),
+ ('grade_courseid' => $cid),
+ ('grade_domain' => $udom),
+ ('grade_username' => $uname));
+ my ($garbage, $an) =
+ split(/_HASH_REF__/,$result, 2);
+
+ my %analysis = &Apache::lonnet::str2hash($an);
+
+
+
+ foreach my $part_id (@{$analysis{'parts'}}) {
+ my $bubble_lines = $analysis{"$part_id.bubble_lines"}[0];
+ if (!$bubble_lines) {
+ $bubble_lines = 1;
+ }
+ $bubble_lines_per_response{"$symb.$part_id"} = $bubble_lines;
+ $total_lines = $total_lines + $bubble_lines;
+ }
+
}
&Apache::lonnet::delenv('scantron\.');
$env{'form.scantron_maxbubble'} =
- &Apache::lonxml::get_problem_counter()-1;
-
+ $total_lines;
return $env{'form.scantron_maxbubble'};
}
@@ -6964,7 +7010,7 @@ GRADINGMENUJS
$result.='';
$result.=''."\n".
- ' '.&mt('Select Section').': |
|
|
|