'.
''.
' Fullname (username) | '.
@@ -2388,7 +2420,7 @@ LISTJAVASCRIPT
' Fullname (username) | '.
' Fullname (username) | ';
- my (undef,undef,$fullname) = &getclasslist($getsec,'0');
+ my (undef,undef,$fullname) = &getclasslist($getsec,'1');
my $ptr = 1;
foreach my $student (sort {lc($$fullname{$a}) cmp lc($$fullname{$b}) } keys %$fullname) {
my ($uname,$udom) = split(/:/,$student);
@@ -2412,8 +2444,8 @@ LISTJAVASCRIPT
}
sub getSymbMap {
- my $navmap = Apache::lonnavmaps::navmap-> new(
- $ENV{'request.course.fn'}.'.db',
+ my ($request) = @_;
+ my $navmap = Apache::lonnavmaps::navmap-> new($ENV{'request.course.fn'}.'.db',
$ENV{'request.course.fn'}.'_parms.db',1, 1);
my $res = $navmap->firstResource(); # temp resource to access constants
@@ -2434,10 +2466,32 @@ sub getSymbMap {
if ($curRes == $iterator->END_MAP()) { $depth--; }
if (ref($curRes) && $curRes->is_map()) {
- my $title = $curRes->compTitle();
- push @titles,$minder.'.'.$title; # minder, just in case two titles are identical
- $symbx{$minder.'.'.$title} = $curRes->symb();
- $minder++;
+ my ($mapUrl, $id, $resUrl) = split(/___/, $curRes->symb()); # check map contains at least one problem
+ my $map = $navmap->getResourceByUrl($resUrl); # add to navmaps
+
+ my $mapiterator = $navmap->getIterator($map->map_start(),
+ $map->map_finish());
+
+ my $mapdepth = 1;
+ my $countProblems = 0;
+ $mapiterator->next(); # skip the first BEGIN_MAP
+ my $mapcurRes = $mapiterator->next(); # for "current resource"
+ my $ctr=0;
+ while ($mapdepth > 0 && $ctr < 100) {
+ if($mapcurRes == $mapiterator->BEGIN_MAP) { $mapdepth++; }
+ if($mapcurRes == $mapiterator->END_MAP) { $mapdepth++; }
+
+ if (ref($mapcurRes) && $mapcurRes->is_problem() && !$mapcurRes->randomout) {
+ $countProblems++;
+ }
+ $ctr++;
+ }
+ if ($countProblems > 0) {
+ my $title = $curRes->compTitle();
+ push @titles,$minder.'.'.$title; # minder, just in case two titles are identical
+ $symbx{$minder.'.'.$title} = $curRes->symb();
+ $minder++;
+ }
}
$curRes = $iterator->next();
}
@@ -2446,23 +2500,27 @@ sub getSymbMap {
return \@titles,\%symbx;
}
+#
+#--- Displays a page/sequence w/wo problems, w/wo submissions
sub displayPage {
my ($request) = shift;
+ my ($symb,$url) = &get_symb_and_url($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 (undef,undef,$fullname) = &getclasslist($getsec,'0');
+ my (undef,undef,$fullname) = &getclasslist($getsec,'1');
my ($uname,$udom) = split(/:/,$ENV{'form.student'});
- my ($idx,$showtitle) = ($pageTitle =~ /(\d+)\.(.*)/);
my $result=' '.$ENV{'form.title'}.'';
$result.=' Student: '.$$fullname{$ENV{'form.student'}}.
' ('.$uname.($udom eq $cdom ? '':':'.$udom).')'."\n";
- my $navmap = Apache::lonnavmaps::navmap-> new(
- $ENV{'request.course.fn'}.'.db',
+ &sub_page_js($request);
+ $request->print($result);
+
+ my $navmap = Apache::lonnavmaps::navmap-> new($ENV{'request.course.fn'}.'.db',
$ENV{'request.course.fn'}.'_parms.db',1, 1);
my ($mapUrl, $id, $resUrl) = split(/___/, $ENV{'form.page'});
my $map = $navmap->getResourceByUrl($resUrl); # add to navmaps
@@ -2470,163 +2528,786 @@ sub displayPage {
my $iterator = $navmap->getIterator($map->map_start(),
$map->map_finish());
- my $depth = 1;
+ my $studentTable='
|