File:  [LON-CAPA] / loncom / interface / spreadsheet / lonspreadsheet.pm
Revision 1.57: download - view: text, annotated - select for diffs
Thu Dec 2 00:53:46 2010 UTC (13 years, 6 months ago) by www
Branches: MAIN
CVS tags: HEAD
Directly jump to Course Preferences

    1: #
    2: # $Id: lonspreadsheet.pm,v 1.57 2010/12/02 00:53:46 www Exp $
    3: #
    4: # Copyright Michigan State University Board of Trustees
    5: #
    6: # This file is part of the LearningOnline Network with CAPA (LON-CAPA).
    7: #
    8: # LON-CAPA is free software; you can redistribute it and/or modify
    9: # it under the terms of the GNU General Public License as published by
   10: # the Free Software Foundation; either version 2 of the License, or
   11: # (at your option) any later version.
   12: #
   13: # LON-CAPA is distributed in the hope that it will be useful,
   14: # but WITHOUT ANY WARRANTY; without even the implied warranty of
   15: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   16: # GNU General Public License for more details.
   17: #
   18: # You should have received a copy of the GNU General Public License
   19: # along with LON-CAPA; if not, write to the Free Software
   20: # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
   21: #
   22: # /home/httpd/html/adm/gpl.txt
   23: #
   24: # http://www.lon-capa.org/
   25: #
   26: # The LearningOnline Network with CAPA
   27: # Spreadsheet/Grades Display Handler
   28: #
   29: # POD required stuff:
   30: 
   31: =head1 NAME
   32: 
   33: lonspreadsheet
   34: 
   35: =head1 SYNOPSIS
   36: 
   37: Spreadsheet interface to internal LON-CAPA data
   38: 
   39: =head1 DESCRIPTION
   40: 
   41: Lonspreadsheet provides course coordinators the ability to manage their
   42: students grades online.  The students are able to view their own grades, but
   43: not the grades of their peers.  The spreadsheet is highly customizable,
   44: offering the ability to use Perl code to manipulate data, as well as many
   45: built-in functions.
   46: 
   47: =head2 Functions available to user of lonspreadsheet
   48: 
   49: =over 4
   50: 
   51: =cut
   52: 
   53: 
   54: package Apache::lonspreadsheet;
   55:             
   56: use strict;
   57: use warnings FATAL=>'all';
   58: no warnings 'uninitialized';
   59: use Apache::classcalc();
   60: use Apache::studentcalc();
   61: use Apache::assesscalc();
   62: use Apache::Constants qw(:common :http);
   63: use Apache::lonnet;
   64: use Apache::lonhtmlcommon;
   65: use Apache::lonlocal;
   66: use Apache::loncoursedata();
   67: use HTML::Entities();
   68: 
   69: ##
   70: ## HTML utility subroutines really should go in lonhtmlcommon
   71: ##
   72: 
   73: sub textfield {
   74:     my ($title,$name,$value)=@_;
   75:     return "\n<p><b>$title:</b><br />".
   76:         '<input type="text" name="'.$name.'" size="80" value="'.$value.'" />';
   77: }
   78: 
   79: sub hiddenfield {
   80:     my ($name,$value)=@_;
   81:     return '<input type="hidden" name="'.$name.'" value="'.$value.'" />'."\n";
   82: }
   83: 
   84: sub selectbox {
   85:     my ($title,$name,$value,%options)=@_;
   86:     my $selout="\n<p><b>$title:</b><br />".'<select name="'.$name.'">';
   87:     foreach (sort keys(%options)) {
   88:         $selout.='<option value="'.$_.'"';
   89:         if ($_ eq $value) { $selout.=' selected="selected"'; }
   90:         $selout.='>'.&mt($options{$_}).'</option>';
   91:     }
   92:     return $selout.'</select>';
   93: }
   94: 
   95: sub file_dialogs {
   96:     my ($spreadsheet) = @_;
   97:     my $bgcolor = "#FFFFFF";
   98:     my $sheettype = $spreadsheet->{'type'};
   99:     my $result = '';
  100:     my $message = '';
  101:     ##
  102:     ## Deal with saving the spreadsheet
  103:     $spreadsheet->check_formulas_loaded();
  104:     if ((exists($env{'form.save'}) || exists($env{'form.makedefault'})) && 
  105:         exists($env{'form.savefilename'})) {
  106:         $spreadsheet->filename($env{'form.savefilename'});
  107:         my $save_status = $spreadsheet->save();
  108:         if ($save_status ne 'ok') {
  109:             $message .= "An error occurred while saving the spreadsheet".
  110:                 "There error is:".$save_status;
  111:         } else {
  112:             $message .= "Spreadsheet saved as ".$spreadsheet->filename();
  113:         }
  114:     } elsif (exists($env{'form.newformula'}) && 
  115:              exists($env{'form.cell'})       && 
  116:              $env{'form.cell'} ne '' ) {
  117:         ##
  118:         ## Make any requested modifications to the spreadsheet
  119:         $spreadsheet->modify_cell($env{'form.cell'},
  120:                                   $env{'form.newformula'});
  121:         $spreadsheet->save_tmp();
  122:         # output that we are dealing with a temporary file
  123:         $result .=&hiddenfield('workcopy',$sheettype);
  124:         if ($env{'form.newformula'} !~ /^\s*$/) {
  125:             $message .='<table><tr>'.
  126:               '<td valign="top"><pre>'.&mt('Cell').' '.$env{'form.cell'}.' = </pre></td>'.
  127:               '<td><pre>'.$env{'form.newformula'}."</pre></td></tr></table>\n";
  128:         } else {
  129:             $message .= &mt('Deleted contents of cell').' '.$env{'form.cell'}.'.';
  130:         }
  131:     }
  132:     ##
  133:     ## Editing code
  134:     $result .=&hiddenfield('cell','').
  135:               &hiddenfield('newformula','');
  136:     ##
  137:     ## Create the save and load dialogs
  138:     my $filename = $spreadsheet->filename();
  139:     my $truefilename = $filename;
  140:     if ($spreadsheet->is_default()) {
  141:         $filename = 'Default';
  142:     }
  143:     my $save_dialog = '<span class="LC_nobreak">'.
  144:         '<input type="submit" name="save" value="'.&mt('Save as').'" /> '.
  145:         '<input type="text" name="savefilename" size="30" value="'.
  146:         $truefilename.'" />'.
  147:         '</span>';
  148:     my $makedefault_dialog = '<input type="submit" name="makedefault" '.
  149:         'value="'.&mt('Save as &amp; Make This Sheet the Default').'"/>';
  150:     #
  151:     my $link = '<a href="javascript:openbrowser'.
  152:         "('sheet','loadfilename','spreadsheet')\">".&mt('Select Spreadsheet File')."</a>";
  153:     my $load=&mt('Load:');
  154:     my $load_dialog = <<END;
  155: <table bgcolor="$bgcolor">
  156: <tr><td><input type="submit" name="load" value="$load" /></td>
  157:     <td><span class="LC_nobreak">
  158:         <input type="text" name="loadfilename" size="20" value="$filename" />
  159:         $link</span>
  160:     </td></tr>
  161: <tr><td>&nbsp;</td><td>
  162:     <select name="fileselect" onchange="document.sheet.loadfilename.value=document.sheet.fileselect.value" >
  163: END
  164:     my $default_filename_set = 0;
  165:     foreach my $sheetfilename ($spreadsheet->othersheets()) {
  166:         $load_dialog .= '    <option value="'.$sheetfilename.'"';
  167:         if ($filename eq $sheetfilename) {
  168:             $load_dialog .= ' selected="selected"';
  169:             $default_filename_set = 1;
  170:         }
  171:         $load_dialog .= '>'.$sheetfilename."</option>\n";
  172:     }
  173:     $load_dialog .= "</select>\n</td><td>&nbsp;</td></tr>\n</table>\n";
  174:         #
  175:     my $headline = &mt('File Dialogs');
  176:     $result .=<<END;
  177: <!-- 
  178:     <fieldset title="File Dialogs" >
  179:     <legend>$headline</legend>
  180:   -->
  181: <!-- load / save dialogs -->
  182: <table cellspacing="2">
  183: <tr>
  184:     <td>$load_dialog</td>
  185:     <td>
  186:         <table bgcolor="$bgcolor">
  187:         <tr><td>$save_dialog</td></tr>
  188:         <tr><td align="center">$makedefault_dialog</td></tr>
  189:         </table>
  190:     </td>
  191: </tr>
  192: </table>
  193: <!--
  194:     </fieldset>
  195:   -->
  196: END
  197:     return ($result,$message);
  198: }
  199: 
  200: sub handler {
  201:     my $r=shift;
  202:     #
  203:     # HTML Header
  204:     #
  205:     if ($r->header_only) {
  206:         &Apache::loncommon::content_type($r,'text/html');
  207:         $r->send_http_header;
  208:         return OK;
  209:     }
  210:     #
  211:     # Roles Checking
  212:     #
  213:     # Needs to be in a course
  214:     if (! $env{'request.course.fn'}) { 
  215:         # Not in a course, or not allowed to modify parms
  216:         $env{'user.error.msg'}=
  217:             $r->uri.":opa:0:0:Cannot modify spreadsheet";
  218:         return HTTP_NOT_ACCEPTABLE; 
  219:     }
  220:     my $courseid = $env{'request.course.id'};
  221:     #
  222:     # Do not allow students to continue if standard or external grading is in
  223:     # effect.
  224:     #
  225:     if ($env{'request.role'} =~ /^st\./) {
  226:         if ($env{'course.'.$courseid.'.grading'} eq 'standard' ||
  227: 	    $env{'course.'.$courseid.'.grading'} eq 'external' ) {
  228:             return HTTP_NOT_ACCEPTABLE;
  229:         }
  230:     }
  231:     #
  232:     # Get query string for limited number of parameters
  233:     #
  234:     &Apache::loncommon::get_unprocessed_cgi
  235:         ($ENV{'QUERY_STRING'},['sname','sdomain','usymb','filename','recalc',
  236:                                'output_format','not_first_run']);
  237:     #
  238:     # Deal with restricted student permissions 
  239:     #
  240:     if ($env{'request.role'} =~ /^st\./) {
  241:         delete $env{'form.cell'}       if (exists($env{'form.cell'}));
  242:         delete $env{'form.newformula'} if (exists($env{'form.newformula'}));
  243:     }
  244:     #
  245:     # Determine basic information about the spreadsheet
  246:     my ($sheettype) = ($r->uri=~/\/(\w+)$/);
  247:     #
  248:     my $symb   = undef;
  249:     $symb = $env{'form.usymb'} if (exists($env{'form.usymb'}));
  250:     my $name   = $env{'user.name'};
  251:     my $domain = $env{'user.domain'};
  252:     if (exists($env{'form.sname'}) && $env{'form.sname'} ne '') {
  253:         $name   = $env{'form.sname'};
  254:         $domain = $env{'form.sdomain'};
  255:     }
  256:     $env{'form.sname'} = $name;
  257:     $env{'form.sdomain'} = $domain;
  258:     my $section = &Apache::lonnet::getsection($domain,$name,
  259: 					      $env{'request.course.id'});
  260:     my @groups;
  261:     if (($env{'user.name'} eq $name) && ($env{'user.domain'} eq $domain)) {
  262:         @groups = &Apache::lonnet::sort_course_groups($env{'request.course.id'},
  263:                                     split(':',$env{'request.course.groups'}));
  264:     } else {
  265:         @groups = &Apache::lonnet::get_users_groups($domain,$name,
  266:                                                     $env{'request.course.id'});
  267:     }
  268: 
  269:     ##
  270:     ## Check permissions
  271:     my $allowed_to_edit = &Apache::lonnet::allowed('mgr',
  272:                                                 $env{'request.course.id'});
  273:     # Only those instructors/tas/whatevers with complete access
  274:     # (not section restricted) are able to modify spreadsheets.
  275:     my $allowed_to_view =  &Apache::lonnet::allowed('vgr',
  276:                                                 $env{'request.course.id'});
  277:     if (! $allowed_to_view) {
  278:         $allowed_to_view = &Apache::lonnet::allowed('vgr',
  279:                     $env{'request.course.id'}.'/'.$env{'request.course.sec'});
  280:         # Those who are restricted by section are allowed to view.
  281:         # The routines in lonstatistics which decide which students' 
  282:         # will be shown take care of the restriction by section.
  283:     }
  284:     #
  285:     # Only those able to view others grades will be allowed to continue 
  286:     # if they are not requesting their own.
  287:     if ($sheettype eq 'classcalc') {
  288:         if (! $allowed_to_view) {
  289: 	    $env{'user.error.msg'}=
  290: 		$r->uri.":vgr:0:0:Access Permission Denied";
  291: 	    return HTTP_NOT_ACCEPTABLE; 
  292: 	}
  293:     }
  294:     if ((($name   ne $env{'user.name'} ) ||
  295:          ($domain ne $env{'user.domain'})) && $sheettype ne 'classcalc') {
  296:         # Check that the student is in their section?
  297:         if (exists($env{'request.course.sec'}) && 
  298:             $env{'request.course.sec'} ne '' ) {
  299:             my $stu_sec = &Apache::lonnet::getsection($domain,$name,
  300: 						    $env{'request.course.id'});
  301:             if ($stu_sec ne $env{'request.course.sec'}) {
  302: 		$env{'user.error.msg'}=
  303: 		    $r->uri.":vgr:0:0:Requested student not in your section.";
  304: 		return HTTP_NOT_ACCEPTABLE; 
  305:             }
  306:         }
  307:     }
  308: 
  309:     #
  310:     # Open page, try to prevent browser cache.
  311:     #
  312:     &Apache::loncommon::content_type($r,'text/html');
  313:     &Apache::loncommon::no_cache($r);
  314:     $r->send_http_header;
  315: 
  316:     #
  317:     # Header....
  318:     #
  319:     my $nothing = &Apache::lonhtmlcommon::javascript_nothing();
  320:     ##
  321:     ## Spit out the javascript required for editing
  322:     ##
  323:     my $js;
  324:     if ($allowed_to_edit) {
  325: 	my %lt=(
  326: 		'ce' => 'Cell',
  327: 		'ac' => 'Accept',
  328: 		'dc' => 'Discard Changes'
  329: 	);
  330:         my $extra_javascript = 
  331:             &Apache::loncommon::browser_and_searcher_javascript();
  332: 	
  333: 	my $cell_extra_js   = &Apache::loncommon::resize_textarea_js();
  334: 	my $cell_edit_start = 
  335: 	    &Apache::loncommon::start_page('Cell Edit Window',$cell_extra_js,
  336: 					   {'only_body' => 1,
  337: 					    'js_ready'  => 1,
  338: 					    'add_entries'  => {
  339: 						'onresize' => "resize_textarea('LC_newformula','LC_aftertextarea')",
  340: 						'onload'   => "resize_textarea('LC_newformula','LC_aftertextarea')",
  341: 					    }});
  342: 	my $cell_edit_end = 
  343: 	    &Apache::loncommon::end_page({'js_ready'  => 1,});
  344: 
  345:         $js = <<ENDSCRIPT;
  346: <script type="text/javascript">
  347: //<!--
  348:     $extra_javascript
  349: 
  350:     var editwin;
  351: 
  352:     function celledit(cellname,cellformula) {
  353:         var edit_text = '';
  354:         // cellformula may contain less-than and greater-than symbols, so
  355:         // we need to escape them?  
  356:         edit_text +='$cell_edit_start';
  357:         edit_text += '<form name="editwinform">';
  358:         edit_text += '<center><h3>$lt{'ce'} '+cellname+'</h3>';
  359:         edit_text += '<textarea id="LC_newformula" name="newformula" ';
  360:         edit_text += ' cols="60" rows="12"; wrap="off" style="width:100%">';
  361: 	edit_text += cellformula+'</textarea>';
  362:         edit_text += '<div id="LC_aftertextarea"><br />';
  363:         edit_text += '<input type="button" name="accept" value="$lt{'ac'}"';
  364:         edit_text += ' onClick=\\\'javascript:';
  365:         edit_text += 'opener.document.sheet.cell.value=';
  366:         edit_text +=     '"'+cellname+'";';
  367:         edit_text += 'opener.document.sheet.newformula.value=';
  368:         edit_text +=     'document.editwinform.newformula.value;';
  369:         edit_text += 'opener.document.sheet.submit();';
  370:         edit_text += 'self.close()\\\' />';
  371:         edit_text += '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
  372:         edit_text += '<input type="button" name="abort" ';
  373:         edit_text +=     'value="$lt{'dc'}"';
  374:         edit_text += ' onClick="javascript:self.close()" />';
  375:         edit_text += '</center></div></form>$cell_edit_end';
  376: 
  377:         if (editwin != null && !(editwin.closed) ) {
  378:             editwin.close();
  379:         }
  380: 
  381:         editwin = window.open($nothing,'CellEditWin','height=280,width=480,scrollbars=no,resizable=yes,alwaysRaised=yes,dependent=yes',true);
  382:         editwin.document.write(edit_text);
  383:         editwin.document.close();
  384:     }
  385: //-->
  386: </script>
  387: ENDSCRIPT
  388:     }
  389:     &Apache::lonhtmlcommon::clear_breadcrumbs();
  390:     &Apache::lonhtmlcommon::add_breadcrumb
  391:         ({href  => $r->uri,
  392:           title => 'Spreadsheet',
  393:           text  => 'Spreadsheet',
  394:           faq   => 134,
  395:           bug   => 'Spreadsheet'});
  396:     $r->print(&Apache::loncommon::start_page('Grades Spreadsheet',$js).
  397:               &Apache::lonhtmlcommon::breadcrumbs('Spreadsheet',
  398: 						  'Spreadsheet_About').
  399:               &Apache::lonhtmlcommon::coursepreflink(&mt('Grade display settings'),'grading').
  400:               '<form action="'.$r->uri.'" name="sheet" method="post">');
  401:     $r->print(&hiddenfield('sname'  ,$env{'form.sname'}).
  402:               &hiddenfield('sdomain',$env{'form.sdomain'}).
  403:               &hiddenfield('usymb'  ,$env{'form.usymb'}));
  404:     $r->rflush();
  405:     ##
  406:     ## Determine the filename to use
  407:     my $filename = undef;
  408:     if ($allowed_to_edit) {
  409:         $filename = $env{'form.filename'} if (exists($env{'form.filename'}));
  410:         #
  411:         if (exists($env{'form.load'}) && exists($env{'form.loadfilename'})) {
  412:             $filename = $env{'form.loadfilename'};
  413:             $env{'form.workcopy'} = 'no';
  414:         }
  415:     }
  416:     ##
  417:     ## Take care of "backdoor" spreadsheet expiration / recalc stuff
  418:     if ($allowed_to_edit && exists($env{'form.recalc'})) {
  419:         if (exists($env{'form.recalc'})) {
  420:             &Apache::loncoursedata::delete_caches($env{'requres.course.id'});
  421:         }
  422:         if ($env{'form.recalc'} eq 'ilovewastingtime') {
  423:             &Apache::lonnet::logthis('spreadsheet expired: entire course');
  424:             # expire ALL spreadsheets
  425:             &Apache::lonnet::expirespread('','','studentcalc');
  426:             &Apache::lonnet::expirespread('','','assesscalc');
  427:             $r->print('<h3>'.
  428:                       &mt('Expired spreadsheet caches for all students').
  429:                       '</h3>');
  430:         } elsif ($env{'form.recalc'} =~ /^symb:/) {
  431:             # expire for all students on this symb
  432:             my ($symb) = ($env{'form.recalc'} =~ /^symb:(.*)$/);
  433:             &Apache::lonnet::logthis('spreadsheet expired: symb = '.$symb);
  434:             &Apache::lonnet::expirespread('','','assesscalc',$symb);
  435:             &Apache::lonnet::expirespread('','','studentcalc');
  436:             $r->print('<h3>'.
  437:               &mt('Expired spreadsheet caches for all students for symb  [_1]',
  438:                   $symb).
  439:                       '</h3>');
  440:         } elsif ($env{'form.recalc'} =~ /^student:/) {
  441:             # expire all assessment spreadsheets for this user
  442:             my ($sname,$sdom) = ($env{'form.recalc'}=~/^student:(.*):(.*)$/);
  443:             &Apache::lonnet::logthis('spreadsheet expired: student = '.
  444:                                      $sname.'@'.$sdom);
  445:             if (defined($sname) && defined($sdom)) {
  446:                 &Apache::lonnet::expirespread($sname,$sdom,'assesscalc');
  447:                 &Apache::lonnet::expirespread($sname,$sdom,'studentcalc');
  448:                 $r->print('<h3>'.
  449:                           &mt('Expired spreadsheet caches for student [_1]',
  450:                               $sname.'@'.$sdom).
  451:                           '</h3>');
  452:             }
  453:         }
  454:     }
  455:     ##
  456:     ## Make the spreadsheet
  457:     &Apache::Spreadsheet::initialize_spreadsheet_package();
  458:     my $spreadsheet = undef;
  459:     if ($sheettype eq 'classcalc') {
  460:         $spreadsheet = Apache::classcalc->new($name,$domain,$filename,undef,
  461: 					      $section,\@groups);
  462:     } elsif ($sheettype eq 'studentcalc') {
  463:         $spreadsheet = Apache::studentcalc->new($name,$domain,$filename,undef,
  464: 						$section,\@groups);
  465:     } elsif ($sheettype eq 'assesscalc' && 
  466:              defined($symb) && 
  467:              $allowed_to_edit) {
  468:         $spreadsheet = Apache::assesscalc->new($name,$domain,$filename,$symb,
  469: 					       $section,\@groups);
  470:     } else {
  471:         return HTTP_NOT_ACCEPTABLE;
  472:     }
  473:     if (! defined($spreadsheet)) {
  474:         # error error - run in circles, scream and shout
  475:         return;
  476:     }
  477:     $spreadsheet->initialize();
  478:     #
  479:     # Output selector
  480:     ##
  481:     ## Editing/loading/saving
  482:     if ($allowed_to_edit) {
  483:         my ($html,$action_message) = &file_dialogs($spreadsheet);
  484:         if ($env{'form.makedefault'}) {
  485:             $spreadsheet->make_default();
  486:             if ($action_message) {
  487:                 $action_message .= '<br />';
  488:             }
  489:             $action_message .= &mt('Made this spreadsheet the default');
  490:             if ($sheettype eq 'classcalc') {
  491:                 $action_message .= ' '.&mt('for the course');
  492:             } elsif ($sheettype eq 'studentcalc') {
  493:                 $action_message .= ' '.&mt('for all students');
  494:             } elsif ($sheettype eq 'assesscalc') {
  495:                 $action_message .= ' '.&mt('for all assessments');
  496:             }
  497:             $action_message .= '.';
  498:         }
  499:         $r->print('<table><tr><td valign="top">'.
  500:                   $spreadsheet->html_header().
  501:                   '</td>'.
  502:                   '<td valign="center">'.$html."</td></tr></table>\n");
  503:         if ($action_message ne '') {
  504:             $r->print(<<END);
  505: <table>
  506: <tr><td valign="top"><b>Last Action:</b></td>
  507:     <td>&nbsp;</td>
  508:     <td>$action_message</td>
  509: </tr>
  510: </table>
  511: END
  512:         }
  513:         $r->rflush();
  514:     } else {
  515:         $r->print('<table><tr><td>'.$spreadsheet->html_header().
  516:                   "</td></tr></table>\n");
  517:     }
  518:     $r->rflush();
  519:     #
  520:     $r->print("<table><tr>");
  521:     $r->print('<td><input type="submit" value="'.
  522:               &mt('Generate Spreadsheet').'" />'.
  523:               '</td>');
  524:     if ($allowed_to_view) {
  525:         $r->print('<td>'.
  526:                   &Apache::loncommon::help_open_topic("Spreadsheet_About",
  527:                                                       'Spreadsheet Help').
  528:                   '</td>');
  529:     }
  530:     if ($allowed_to_edit) {
  531:         $r->print('<td>'.
  532:                   &Apache::loncommon::help_open_topic("Spreadsheet_Editing",
  533:                                                       'Editing Help').
  534:                   '</td>');
  535:     }
  536:     $r->print('</tr></table>');
  537:     #
  538:     # Keep track of the filename
  539:     $r->print(&hiddenfield('filename',$filename));
  540:     #
  541:     # Keep track of the number of times we have been called, sort of.
  542:     $r->print(&hiddenfield('not_first_run','whatever'));
  543:     #
  544:     if (exists($env{'form.not_first_run'}) || $sheettype ne 'classcalc') {
  545:         $r->print($spreadsheet->get_html_title());
  546:         if ($allowed_to_view || $allowed_to_edit) {
  547:             $r->print($spreadsheet->parent_link());
  548:         }
  549:         $r->rflush();
  550:         $spreadsheet->display($r);
  551:     }
  552:     $r->print('</form>'.&Apache::loncommon::end_page());
  553:     $spreadsheet->clear_package();
  554:     return OK;
  555: }
  556: 
  557: 1;
  558: 
  559: __END__
  560: 

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