File:  [LON-CAPA] / loncom / interface / statistics / lonstudentassessment.pm
Revision 1.6: download - view: text, annotated - select for diffs
Thu Aug 1 20:49:06 2002 UTC (21 years, 11 months ago) by stredwic
Branches: MAIN
CVS tags: HEAD
First, added the parenthesis thing to the GDBM stuff.  Fixed the interface
problem statistics so that the buttons work correctly.  How the data
is interpretted is not finished.

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

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