File:  [LON-CAPA] / loncom / interface / statistics / lonstudentassessment.pm
Revision 1.4: download - view: text, annotated - select for diffs
Fri Jul 26 19:49:26 2002 UTC (21 years, 11 months ago) by stredwic
Branches: MAIN
CVS tags: HEAD
Finished combining the chart and student assessment reports, except for
documentation.  The grade information is displayed like the chart, but
has more of an interface like student assessment.  Currently, all the
controls change onchange, except for student section and column
reselection multiselects.  These will be updated whenever another
interface button submits a form.

    1: # The LearningOnline Network with CAPA
    2: # (Publication Handler
    3: #
    4: # $Id: lonstudentassessment.pm,v 1.4 2002/07/26 19:49:26 stredwic Exp $
    5: #
    6: # Copyright Michigan State University Board of Trustees
    7: #
    8: # This file is part of the LearningOnline Network with CAPA (LON-CAPA).
    9: #
   10: # LON-CAPA is free software; you can redistribute it and/or modify
   11: # it under the terms of the GNU General Public License as published by
   12: # the Free Software Foundation; either version 2 of the License, or
   13: # (at your option) any later version.
   14: #
   15: # LON-CAPA is distributed in the hope that it will be useful,
   16: # but WITHOUT ANY WARRANTY; without even the implied warranty of
   17: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   18: # GNU General Public License for more details.
   19: #
   20: # You should have received a copy of the GNU General Public License
   21: # along with LON-CAPA; if not, write to the Free Software
   22: # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
   23: #
   24: # /home/httpd/html/adm/gpl.txt
   25: #
   26: # http://www.lon-capa.org/
   27: #
   28: # (Navigate problems for statistical reports
   29: # YEAR=2001
   30: # 5/5,7/9,7/25/1,8/11,9/13,9/26,10/5,10/9,10/22,10/26 Behrouz Minaei
   31: # 11/1,11/4,11/16,12/14,12/16,12/18,12/20,12/31 Behrouz Minaei
   32: # YEAR=2002
   33: # 1/22,2/1,2/6,2/25,3/2,3/6,3/17,3/21,3/22,3/26,4/7,5/6 Behrouz Minaei
   34: # 5/12,5/14,5/15,5/19,5/26,7/16  Behrouz Minaei
   35: #
   36: ###
   37: 
   38: package Apache::lonstudentassessment; 
   39: 
   40: use strict;
   41: use Apache::lonhtmlcommon;
   42: use Apache::loncoursedata;
   43: use GDBM_File;
   44: 
   45: #my $jr;
   46: 
   47: sub BuildStudentAssessmentPage {
   48:     my ($cacheDB,$students,$courseID,$formName,$headings,$spacing,
   49:         $studentInformation,$r,$c)=@_;
   50: #    $jr = $r;
   51:     my %cache;
   52:     unless(tie(%cache,'GDBM_File',$cacheDB,&GDBM_READER,0640)) {
   53:         $r->print('<html><body>Unable to tie database.</body></html>');
   54:         return;
   55:     }
   56: 
   57:     # Remove students who don't have the proper section.
   58:     my @sectionsSelected = split(':',$cache{'sectionsSelected'});
   59:     for(my $studentIndex=((scalar @$students)-1); $studentIndex>=0;
   60:         $studentIndex--) {
   61:         my $value = $cache{$students->[$studentIndex].':section'};
   62:         my $found = 0;
   63:         foreach (@sectionsSelected) {
   64:             if($_ eq 'none') {
   65:                 if($value eq '' || !defined($value) || $value eq ' ') {
   66:                     $found = 1;
   67:                     last;
   68:                 }
   69:             } else {
   70:                 if($value eq $_) {
   71:                     $found = 1;
   72:                     last;
   73:                 }
   74:             }
   75:         }
   76:         if($found == 0) {
   77:             splice(@$students, $studentIndex, 1);
   78:         }
   79:     }
   80:     my ($infoHeadings, $infoKeys, $sequenceHeadings, $sequenceKeys,
   81:         $doNotShow) = 
   82:         &ShouldShowColumns(\%cache, $headings, $studentInformation);
   83: 
   84:     my $selectedName = &FindSelectedStudent(\%cache, 
   85:                                             $cache{'StudentAssessmentStudent'},
   86:                                             $students);
   87:     $r->print(&CreateInterface(\%cache, $selectedName, $students, $formName,
   88:                                $doNotShow));
   89: 
   90:     my $Str = '';
   91:     if($selectedName eq 'No Student Selected') {
   92: 	$Str .= '<h3><font color=blue>WARNING: ';
   93:         $Str .= 'Please select a student</font></h3>';
   94:         $r->print($Str);
   95:         return;
   96:     }
   97: 
   98:     $r->print(&CreateTableHeadings(\%cache, $spacing, $infoKeys, $infoHeadings,
   99:                                    $sequenceKeys, $sequenceHeadings));
  100:     untie(%cache);
  101: 
  102:     my $selected=0;
  103:     $r->print('<pre>'."\n");
  104:     foreach (@$students) {
  105:         next if ($_ ne $selectedName && 
  106:                  $selectedName ne 'All Students');
  107:         $selected = 1;
  108:         my $courseData; 
  109:         if(tie(%cache,'GDBM_File',$cacheDB,&GDBM_READER,0640)) {
  110:             if($cache{$_.':lastDownloadTime'} eq 'Not downloaded') {
  111:                 untie(%cache);
  112:                 $courseData = 
  113:                     &Apache::loncoursedata::DownloadCourseInformation($_, 
  114:                                                                     $courseID);
  115:                 if(tie(%cache,'GDBM_File',$cacheDB,&GDBM_WRCREAT,0640)) {
  116:                     &Apache::loncoursedata::ProcessStudentData(\%cache, 
  117:                                                              $courseData, $_);
  118:                     untie(%cache);
  119:                 } else {
  120:                     last if($c->aborted());
  121:                     next;
  122:                 }
  123:             } else {
  124:                 untie(%cache);
  125:             }
  126:         } else {
  127:             last if($c->aborted());
  128:             next;
  129:         }
  130: 
  131:         last if ($c->aborted());
  132: 
  133:         if(tie(%cache,'GDBM_File',$cacheDB,&GDBM_READER,0640)) {
  134:             my $displayString = 'DISPLAYDATA'.$spacing;
  135:             $r->print(&Apache::lonhtmlcommon::FormatStudentInformation(
  136:                                                          \%cache, $_,
  137:                                                          $infoKeys,
  138:                                                          $displayString,
  139:                                                          'preformatted'));
  140:             $r->print(&StudentReport(\%cache, $_, $spacing, $sequenceKeys));
  141:             $r->print("\n");
  142:             untie(%cache);
  143:         }
  144:     }
  145:     $r->print('</pre>'."\n");
  146:     if($selected == 0) {
  147: 	$Str .= '<h3><font color=blue>WARNING: ';
  148:         $Str .= 'Please select a student</font></h3>';
  149:         $r->print($Str);
  150:     }
  151: 
  152:     return;
  153: }
  154: 
  155: #---- Student Assessment Web Page --------------------------------------------
  156: 
  157: sub CreateInterface {
  158:     my($cache,$selectedName,$students,$formName,$doNotShow)=@_;
  159: 
  160:     my $Str = '';
  161:     $Str .= &CreateLegend();
  162:     $Str .= '<table><tr><td>'."\n";
  163:     $Str .= '<input type="submit" name="PreviousStudent" ';
  164:     $Str .= 'value="Previous Student" />'."\n";
  165:     $Str .= '&nbsp&nbsp&nbsp'."\n";
  166:     $Str .= &Apache::lonhtmlcommon::StudentOptions($cache, $students, 
  167:                                                    $selectedName, 
  168:                                                    'StudentAssessment', 
  169:                                                    $formName);
  170:     $Str .= "\n".'&nbsp&nbsp&nbsp'."\n";
  171:     $Str .= '<input type="submit" name="NextStudent" ';
  172:     $Str .= 'value="Next Student" />'."\n";
  173:     $Str .= '</td></tr></table>'."\n";
  174:     $Str .= '<table cellspacing="5"><tr>'."\n";
  175:     $Str .= '<td align="center"><b>Select Sections</b>'."\n";
  176:     $Str .= '</td>'."\n";
  177:     $Str .= '<td align="center"><b>Select column to view:</b></td>'."\n";
  178:     $Str .= '<td></td></tr>'."\n";
  179: 
  180:     $Str .= '<tr><td align="center">'."\n";
  181:     my @sections = split(':',$cache->{'sectionList'});
  182:     my @selectedSections = split(':',$cache->{'sectionsSelected'});
  183:     $Str .= &Apache::lonhtmlcommon::MultipleSectionSelect(\@sections,
  184:                                                           \@selectedSections,
  185:                                                           'Statistics');
  186:     $Str .= '</td><td align="center">';
  187:     $Str .= &CreateColumnSelectionBox($doNotShow);
  188:     $Str .= '</td><td>'."\n";
  189:     $Str .= '<input type="submit" name="DefaultColumns" ';
  190:     $Str .= 'value="Default Column Display" />'."\n";
  191:     $Str .= '</td></tr></table>'."\n";
  192: 
  193:     return $Str;
  194: }
  195: 
  196: sub CreateTableHeadings {
  197:     my($cache,$spacing,$infoKeys,$infoHeadings,$sequenceKeys,
  198:        $sequenceHeadings)=@_;
  199: 
  200:     my $Str = '';
  201:     $Str .= '<table border="0" cellpadding="0" cellspacing="0">'."\n";
  202: 
  203:     $Str .= '<tr>'."\n";
  204:     $Str .= &CreateColumnSelectors($infoHeadings, $sequenceHeadings,
  205:                                    $sequenceKeys);
  206:     $Str .= '<td></td></tr>'."\n";
  207: 
  208:     $Str .= '<tr>'."\n";
  209:     my $displayString = '<td align="left"><pre><a href="/adm/statistics?';
  210:     $displayString .= 'sort=LINKDATA">DISPLAYDATA</a>FORMATTING';
  211:     $displayString .= $spacing.'</pre></td>'."\n";
  212:     $Str .= &Apache::lonhtmlcommon::CreateHeadings($cache, 
  213:                                                    $infoKeys,
  214:                                                    $infoHeadings,
  215:                                                    $displayString,
  216:                                                    'preformatted');
  217: 
  218:     $displayString  = '<td align="left"><pre>DISPLAYDATA'.$spacing;
  219:     $displayString .= '</pre></td>'."\n";
  220:     $Str .= &Apache::lonhtmlcommon::CreateHeadings($cache,
  221:                                                    $sequenceKeys,
  222:                                                    $sequenceHeadings,
  223:                                                    $displayString,
  224:                                                    'preformatted');
  225: 
  226:     $Str .= '<td><pre>Total Solved/Total Problems</pre></td>';
  227:     $Str .= '</tr></table>'."\n";
  228: 
  229:     return $Str;
  230: }
  231: 
  232: =pod
  233: 
  234: =item &FormatStudentData()
  235: 
  236: First, FormatStudentInformation is called and prefixes the course information.
  237: This function produces a formatted string of the student's course information.
  238: Each column of data represents all the problems for a given sequence.  For
  239: valid grade data, a link is created for that problem to a submission record
  240: for that problem.
  241: 
  242: =over 4
  243: 
  244: Input: $name, $studentInformation, $ChartDB
  245: 
  246: $name: The name and domain of the current student in name:domain format
  247: 
  248: $studentInformation: A pointer to an array holding the names used to 
  249: remove data from the hash.  They represent 
  250: the name of the data to be removed.
  251: 
  252: $ChartDB: The name of the cached data database which will be tied to that 
  253: database.
  254: 
  255: Output: $Str
  256: 
  257: $Str: Formatted string that is an entire row of the chart.  It is a 
  258: concatenation of student information and student course information.
  259: 
  260: =back
  261: 
  262: =cut
  263: 
  264: sub StudentReport {
  265:     my ($cache,$name,$spacing,$showSequences)=@_;
  266:     my ($username,$domain)=split(':',$name);
  267: 
  268:     my $Str = '';
  269:     if($cache->{$name.':error'} =~ /course/) {
  270:         $Str .= '<b><font color="blue">No course data for student </font>';
  271:         $Str .= '<font color="red">'.$username.'.</font></b><br>';
  272:         return $Str;
  273:     }
  274: 
  275:     my $Version;
  276:     my $problemsCorrect = 0;
  277:     my $totalProblems   = 0;
  278:     my $problemsSolved  = 0;
  279:     my $numberOfParts   = 0;
  280: #    foreach my $sequence (split(':', $cache->{'orderedSequences'})) {
  281:     foreach my $sequence (@$showSequences) {
  282:         my $characterCount=0;
  283:         foreach my $problemID (split(':', $cache->{$sequence.':problems'})) {
  284:             my $problem = $cache->{$problemID.':problem'};
  285:             my $LatestVersion = $cache->{$name.':version:'.$problem};
  286: 
  287:             # Output dashes for all the parts of this problem if there
  288:             # is no version information about the current problem.
  289:             if(!$LatestVersion) {
  290:                 foreach my $part (split(/\:/,$cache->{$sequence.':'.
  291:                                                       $problemID.
  292:                                                       ':parts'})) {
  293:                     $Str .= ' ';
  294:                     $totalProblems++;
  295:                     $characterCount++;
  296:                 }
  297:                 next;
  298:             }
  299: 
  300:             my %partData=undef;
  301:             # Initialize part data, display skips correctly
  302:             # Skip refers to when a student made no submissions on that
  303:             # part/problem.
  304:             foreach my $part (split(/\:/,$cache->{$sequence.':'.
  305:                                                   $problemID.
  306:                                                   ':parts'})) {
  307:                 $partData{$part.':tries'}=0;
  308:                 $partData{$part.':code'}=' ';
  309:             }
  310: 
  311:             # Looping through all the versions of each part, starting with the
  312:             # oldest version.  Basically, it gets the most recent 
  313:             # set of grade data for each part.
  314: 	    for(my $Version=1; $Version<=$LatestVersion; $Version++) {
  315:                 foreach my $part (split(/\:/,$cache->{$sequence.':'.
  316:                                                       $problemID.
  317:                                                       ':parts'})) {
  318: 
  319:                     if(!defined($cache->{$name.":$Version:$problem".
  320:                                                ":resource.$part.solved"})) {
  321:                         # No grade for this submission, so skip
  322:                         next;
  323:                     }
  324: 
  325:                     my $tries=0;
  326:                     my $code=' ';
  327: 
  328:                     $tries = $cache->{$name.':'.$Version.':'.$problem.
  329:                                       ':resource.'.$part.'.tries'};
  330:                     $partData{$part.':tries'}=($tries) ? $tries : 0;
  331: 
  332:                     my $val = $cache->{$name.':'.$Version.':'.$problem.
  333:                                        ':resource.'.$part.'.solved'};
  334:                     if    ($val eq 'correct_by_student')   {$code = '*';} 
  335:                     elsif ($val eq 'correct_by_override')  {$code = '+';}
  336:                     elsif ($val eq 'incorrect_attempted')  {$code = '.';} 
  337:                     elsif ($val eq 'incorrect_by_override'){$code = '-';}
  338:                     elsif ($val eq 'excused')              {$code = 'x';}
  339:                     elsif ($val eq 'ungraded_attempted')   {$code = '#';}
  340:                     else                                   {$code = ' ';}
  341:                     $partData{$part.':code'}=$code;
  342:                 }
  343:             }
  344: 
  345:             # All grades (except for versionless parts) are displayed as links
  346:             # to their submission record.  Loop through all the parts for the
  347:             # current problem in the correct order and prepare the output links
  348:             $Str .= '<a href="/adm/grades?symb=';
  349:             $Str .= &Apache::lonnet::escape($problem);
  350:             $Str .= '&student='.$username.'&domain='.$domain;
  351:             $Str .= '&command=submission">'; 
  352:             foreach(split(/\:/,$cache->{$sequence.':'.$problemID.
  353:                                         ':parts'})) {
  354:                 if($partData{$_.':code'} eq '*') {
  355:                     $problemsCorrect++;
  356:                     if (($partData{$_.':tries'}<10) &&
  357:                         ($partData{$_.':tries'} ne '')) {
  358:                         $partData{$_.':code'}=$partData{$_.':tries'};
  359:                     }
  360:                 } elsif($partData{$_.':code'} eq '+') {
  361:                     $problemsCorrect++;
  362:                 }
  363: 
  364:                 $Str .= $partData{$_.':code'};
  365:                 $characterCount++;
  366: 
  367:                 if($partData{$_.':code'} ne 'x') {
  368:                     $totalProblems++;
  369:                 }
  370:             }
  371:             $Str.='</a>';
  372:         }
  373: 
  374:         # Output the number of correct answers for the current sequence.
  375:         # This part takes up 6 character slots, but is formated right 
  376:         # justified.
  377:         my $spacesNeeded=$cache->{$sequence.':columnWidth'}-$characterCount;
  378:         $spacesNeeded -= 3;
  379:         $Str .= (' 'x$spacesNeeded);
  380: 
  381: 	my $outputProblemsCorrect = sprintf( "%3d", $problemsCorrect );
  382: 	$Str .= '<font color="#007700">'.$outputProblemsCorrect.'</font>';
  383: 	$problemsSolved += $problemsCorrect;
  384: 	$problemsCorrect=0;
  385: 
  386:         $Str .= $spacing;
  387:     }
  388: 
  389:     # Output the total correct problems over the total number of problems.
  390:     # I don't like this type of formatting, but it is a solution.  Need
  391:     # a way to dynamically determine the space requirements.
  392:     my $outputProblemsSolved = sprintf( "%4d", $problemsSolved );
  393:     my $outputTotalProblems  = sprintf( "%4d", $totalProblems );
  394:     $Str .= '<font color="#000088">'.$outputProblemsSolved.
  395: 	    ' / '.$outputTotalProblems.'</font>';
  396: 
  397:     return $Str;
  398: }
  399: 
  400: =pod
  401: 
  402: =item &CreateLegend()
  403: 
  404: This function returns a formatted string containing the legend for the
  405: chart.  The legend describes the symbols used to represent grades for
  406: problems.
  407: 
  408: =cut
  409: 
  410: sub CreateLegend {
  411:     my $Str = "<p><pre>".
  412:               "1..9: correct by student in 1..9 tries\n".
  413:               "   *: correct by student in more than 9 tries\n".
  414: 	      "   +: correct by override\n".
  415:               "   -: incorrect by override\n".
  416: 	      "   .: incorrect attempted\n".
  417: 	      "   #: ungraded attempted\n".
  418:               "    : not attempted\n".
  419: 	      "   x: excused".
  420:               "</pre><p>"; 
  421:     return $Str;
  422: }
  423: 
  424: =pod
  425: 
  426: =item &CreateColumnSelectionBox()
  427: 
  428: If there are columns not being displayed then this selection box is created
  429: with a list of those columns.  When selections are made and the page 
  430: refreshed, the columns will be removed from this box and the column is
  431: put back in the chart.  If there is no columns to select, no row is added
  432: to the interface table.
  433: 
  434: =over 4
  435: Input: $CacheData, $headings
  436: 
  437: 
  438: $CacheData: A pointer to a hash tied to the cached data
  439: 
  440: $headings:  An array of the names of the columns for the student information.  
  441: They are used for displaying which columns are missing.
  442: 
  443: Output: $notThere
  444: 
  445: $notThere: The string contains one row of a table.  The first column has the 
  446: name of the selection box.  The second contains the selection box 
  447: which has a size of four.
  448: 
  449: =back
  450: 
  451: =cut
  452: 
  453: sub CreateColumnSelectionBox {
  454:     my ($doNotShow)=@_;
  455: 
  456:     my $notThere = '';
  457:     $notThere .= '<select name="ReselectColumns" size="4" ';
  458:     $notThere .= 'multiple="true">'."\n";
  459: 
  460:     for(my $index=0; $index<$doNotShow->{'count'}; $index++) {
  461:         my $name = $doNotShow->{$index.':name'};
  462:         $notThere .= '<option value="';
  463:         $notThere .= $doNotShow->{$index.':id'}.'">';
  464:         $notThere .= $name.'</option>'."\n";
  465:     }
  466: 
  467:     $notThere .= '</select>';
  468: 
  469:     return $notThere;
  470: }
  471: 
  472: =pod
  473: 
  474: =item &CreateColumnSelectors()
  475: 
  476: This function generates the checkboxes above the column headings.  The 
  477: column will be removed if the checkbox is unchecked.
  478: 
  479: =over 4
  480: 
  481: Input: $CacheData, $headings
  482: 
  483: $CacheData: A pointer to a hash tied to the cached data
  484: 
  485: $headings:  An array of the names of the columns for the student 
  486: information.  They are used to know what are the student information columns
  487: 
  488: Output: $present
  489: 
  490: $present: The string contains the first row of a table.  Each column contains
  491: a checkbox which is left justified.  Currently left justification is used
  492: for consistency of location over the column in which it presides.
  493: 
  494: =back
  495: 
  496: =cut
  497: 
  498: sub CreateColumnSelectors {
  499:     my ($infoHeadings, $sequenceHeadings, $sequenceKeys)=@_;
  500: 
  501:     my $present = '';
  502:     for(my $index=0; $index<(scalar @$infoHeadings); $index++) {
  503:         $present .= '<td align="left">';
  504:         $present .= '<input type="checkbox" checked="on" ';
  505:         $present .= 'name="HeadingColumn'.$infoHeadings->[$index].'" />';
  506:         $present .= '</td>'."\n";
  507:     }
  508: 
  509:     for(my $index=0; $index<(scalar @$sequenceHeadings); $index++) {
  510:         $present .= '<td align="left">';
  511:         $present .= '<input type="checkbox" checked="on" ';
  512:         $present .= 'name="SequenceColumn'.$sequenceKeys->[$index].'" />';
  513:         $present .= '</td>'."\n";
  514:     }
  515: 
  516:     return $present;
  517: }
  518: 
  519: #---- END Student Assessment Web Page ----------------------------------------
  520: 
  521: #---- Student Assessment Worker Functions ------------------------------------
  522: 
  523: sub FindSelectedStudent {
  524:     my($cache, $selectedName, $students)=@_;
  525: 
  526:     if($selectedName eq 'All Students' || 
  527:        $selectedName eq 'No Student Selected') {
  528:         return $selectedName;
  529:     }
  530: 
  531:     for(my $index=0; $index<(scalar @$students); $index++) {
  532:         my $fullname = $cache->{$students->[$index].':fullname'};
  533:         if($fullname eq $selectedName) {
  534:             if($cache->{'StudentAssessmentMove'} eq 'next') {
  535:                 if($index == ((scalar @$students) - 1)) {
  536:                     $selectedName = $students->[0];
  537:                     return $selectedName;
  538:                 } else {
  539:                     $selectedName = $students->[$index+1];
  540:                     return $selectedName;
  541:                 }
  542:             } elsif($cache->{'StudentAssessmentMove'} eq 'previous') {
  543:                 if($index == 0) {
  544:                     $selectedName = $students->[-1];
  545:                     return $selectedName;
  546:                 } else {
  547:                     $selectedName = $students->[$index-1];
  548:                     return $selectedName;
  549:                 }
  550:             } else {
  551:                 $selectedName = $students->[$index];
  552:                 return $selectedName;
  553:             }
  554:             last;
  555:         }
  556:     }
  557: 
  558:     return 'No Student Selected';
  559: }
  560: 
  561: =pod
  562: 
  563: =item &ShouldShowColumn()
  564: 
  565: Determine if a specified column should be shown on the chart.
  566: 
  567: =over 4
  568: 
  569: Input: $cache, $test
  570: 
  571: $cache: A pointer to the hash tied to the cached data
  572: 
  573: $test: The form name of the column (heading.$headingIndex) or 
  574: (sequence.$sequenceIndex)
  575: 
  576: Output: 0 (false), 1 (true)
  577: 
  578: =back
  579: 
  580: =cut
  581: 
  582: sub ShouldShowColumns {
  583:     my ($cache,$headings,$cacheKey)=@_;
  584: 
  585:     my @infoKeys=();
  586:     my @infoHeadings=();
  587: 
  588:     my @sequenceKeys=();
  589:     my @sequenceHeadings=();
  590: 
  591:     my %doNotShow;
  592: 
  593:     my $index;
  594:     my $count = 0;
  595:     my $check = '';
  596:     for($index=0; $index < scalar @$headings; $index++) {
  597:         $check = 'HeadingColumn'.$headings->[$index];
  598:         if($cache->{'HeadingsFound'} =~ /$check/) {
  599:             push(@infoHeadings, $headings->[$index]);
  600:             push(@infoKeys, $cacheKey->[$index]);
  601:         } else {
  602:             $doNotShow{$count.':name'} = $headings->[$index];
  603:             $doNotShow{$count.':id'} = 'HeadingColumn'.$headings->[$index];
  604:             $count++;
  605:         }
  606:     }
  607: 
  608:     foreach my $sequence (split(/\:/,$cache->{'orderedSequences'})) {
  609:         $check = 'SequenceColumn'.$sequence;
  610:         if($cache->{'SequencesFound'} eq 'All Sequences' || 
  611:            $cache->{'SequencesFound'} =~ /$check/) {
  612:             push(@sequenceHeadings, $cache->{$sequence.':title'});
  613:             push(@sequenceKeys, $sequence);
  614:         } else {
  615:             $doNotShow{$count.':name'} = $cache->{$sequence.':title'};
  616:             $doNotShow{$count.':id'} = 'SequenceColumn'.$sequence;
  617:             $count++;
  618:         }
  619:     }
  620: 
  621:     $doNotShow{'count'} = $count;
  622: 
  623:     return (\@infoHeadings, \@infoKeys, \@sequenceHeadings, 
  624:             \@sequenceKeys, \%doNotShow);
  625: }
  626: 
  627: #---- END Student Assessment Worker Functions --------------------------------
  628: 
  629: 1;
  630: __END__

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>