--- loncom/interface/lonquickgrades.pm 2011/03/26 20:04:15 1.81 +++ loncom/interface/lonquickgrades.pm 2011/03/26 22:37:47 1.82 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Quick Student Grades Display # -# $Id: lonquickgrades.pm,v 1.81 2011/03/26 20:04:15 www Exp $ +# $Id: lonquickgrades.pm,v 1.82 2011/03/26 22:37:47 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -464,6 +464,39 @@ sub outputCategories { ''. ''); } +# +# Debug +# +# my %data=&dumpdata($navmap); +# foreach (keys(%data)) { +# $r->print("\n
".$_.'='.$data{$_}); +# } +} + +# +# Get data for all symbs +# + +sub dumpdata { + my ($navmap)=@_; + my %returndata=(); + +# Run through the map and get all data + + my $iterator = $navmap->getIterator(undef, undef, undef, 1); + my $depth = 1; + $iterator->next(); # ignore first BEGIN_MAP + my $curRes = $iterator->next(); + + while ($depth > 0) { + if ($curRes == $iterator->BEGIN_MAP()) {$depth++;} + if ($curRes == $iterator->END_MAP()) { $depth--; } + if (ref($curRes) && $curRes->is_map()) { + $returndata{$curRes->symb()}=$curRes->{DATA}->{CHILD_PARTS}.':'.$curRes->{DATA}->{CHILD_ATTEMPTED}.':'.$curRes->{DATA}->{CHILD_CORRECT}; + } + $curRes = $iterator->next(); + } + return %returndata; } # @@ -610,7 +643,7 @@ ENDMOVE } $r->print(''); if ($cangrade) { - $r->print('
'.&mt('Add Problem or Sequence').'
'. + $r->print('
'.&mt('Add Problem or Folder').'
'. &Apache::lonstathelpers::problem_selector('.',undef,1,1,'addcont_'.$id.'_',1,'this.form.cmd.value="addcont_'.$id.'";this.form.submit();')); } $r->print('');