'.
- ''."\n";
- if ($ENV{'form.handgrade'} eq 'yes') {
- $endform.=' '."\n";
- my $ntstu =''."\n";
- my $nsel = ($ENV{'form.NTSTU'} ne '' ? $ENV{'form.NTSTU'} : '1');
- $ntstu =~ s/ | ');
+ $studentTable.=''.$ptr.' | ';
+ $studentTable.=' \n";
+ $studentTable.=
+ ($ptr%2 == 0 ? ' | '.&Apache::loncommon::end_data_table_row()
+ : '');
+ $ptr++;
+ }
+ if ($ptr%2 == 0) {
+ $studentTable.=' | | '.
+ &Apache::loncommon::end_data_table_row();
+ }
+ $studentTable.=&Apache::loncommon::end_data_table()."\n";
+ $studentTable.='" />'."\n";
+
+ $studentTable.=&show_grading_menu_form($symb);
+ $request->print($studentTable);
+
+ return '';
+}
+
+sub getSymbMap {
+ my $navmap = Apache::lonnavmaps::navmap->new();
+
+ my %symbx = ();
+ my @titles = ();
+ my $minder = 0;
+
+ # Gather every sequence that has problems.
+ my @sequences = $navmap->retrieveResources(undef, sub { shift->is_map(); },
+ 1,0,1);
+ for my $sequence ($navmap->getById('0.0'), @sequences) {
+ if ($navmap->hasResource($sequence, sub { shift->is_problem(); }, 0) ) {
+ my $title = $minder.'.'.
+ &HTML::Entities::encode($sequence->compTitle(),'"\'&');
+ push(@titles, $title); # minder in case two titles are identical
+ $symbx{$title} = &HTML::Entities::encode($sequence->symb(),'"\'&');
+ $minder++;
+ }
+ }
+ return \@titles,\%symbx;
+}
+
+#
+#--- Displays a page/sequence w/wo problems, w/wo submissions
+sub displayPage {
+ my ($request) = shift;
+
+ my ($symb) = &get_symb($request);
+ my $cdom = $env{"course.$env{'request.course.id'}.domain"};
+ my $cnum = $env{"course.$env{'request.course.id'}.num"};
+ my $getsec = $env{'form.section'} eq '' ? 'all' : $env{'form.section'};
+ my $pageTitle = $env{'form.page'};
+ my ($classlist,undef,$fullname) = &getclasslist($getsec,'1');
+ my ($uname,$udom) = split(/:/,$env{'form.student'});
+ my $usec=$classlist->{$env{'form.student'}}[5];
+
+ #need to make sure we have the correct data for later EXT calls,
+ #thus invalidate the cache
+ &Apache::lonnet::devalidatecourseresdata(
+ $env{'course.'.$env{'request.course.id'}.'.num'},
+ $env{'course.'.$env{'request.course.id'}.'.domain'});
+ &Apache::lonnet::clear_EXT_cache_status();
+
+ if (!&canview($usec)) {
+ $request->print('Unable to view requested student.('.$env{'form.student'}.')');
+ $request->print(&show_grading_menu_form($symb));
+ return;
+ }
+ my $result=' '.$env{'form.title'}.'
';
+ $result.=' Student: '.&nameUserString(undef,$$fullname{$env{'form.student'}},$uname,$udom).
+ '
'."\n";
+ if (&Apache::lonnet::validCODE($env{'form.CODE'})) {
+ $result.=' CODE: '.$env{'form.CODE'}.'
'."\n";
+ } else {
+ delete($env{'form.CODE'});
+ }
+ &sub_page_js($request);
+ $request->print($result);
+
+ my $navmap = Apache::lonnavmaps::navmap->new();
+ my ($mapUrl, $id, $resUrl)=&Apache::lonnet::decode_symb($env{'form.page'});
+ my $map = $navmap->getResourceByUrl($resUrl); # add to navmaps
+ if (!$map) {
+ $request->print('Unable to view requested sequence. ('.$resUrl.')');
+ $request->print(&show_grading_menu_form($symb));
+ return;
+ }
+ my $iterator = $navmap->getIterator($map->map_start(),
+ $map->map_finish());
+
+ my $studentTable='
+SCANTRONFORM
+ }
+
+ # Chunk of the form that prompts to view a scoring office file,
+ # corrected file, skipped records in a file.
+
+ $r->print(<