File:  [LON-CAPA] / loncom / interface / loncreatecourse.pm
Revision 1.38: download - view: text, annotated - select for diffs
Sun Sep 21 21:40:06 2003 UTC (20 years, 9 months ago) by www
Branches: MAIN
CVS tags: HEAD
Internationalizing.

    1: # The LearningOnline Network
    2: # Create a course
    3: #
    4: # $Id: loncreatecourse.pm,v 1.38 2003/09/21 21:40:06 www 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: # (My Desk
   29: #
   30: # (Internal Server Error Handler
   31: #
   32: # (Login Screen
   33: # 5/21/99,5/22,5/25,5/26,5/31,6/2,6/10,7/12,7/14,
   34: # 1/14/00,5/29,5/30,6/1,6/29,7/1,11/9 Gerd Kortemeyer)
   35: #
   36: # 3/1/1 Gerd Kortemeyer)
   37: #
   38: # 3/1 Gerd Kortemeyer)
   39: #
   40: # 2/14,2/16,2/17,7/6 Gerd Kortemeyer
   41: #
   42: package Apache::loncreatecourse;
   43: 
   44: use strict;
   45: use Apache::Constants qw(:common :http);
   46: use Apache::lonnet;
   47: use Apache::loncommon;
   48: use Apache::lonratedt;
   49: use Apache::londocs;
   50: use Apache::lonlocal;
   51: 
   52: # -------------------------------------------- Return path to profile directory
   53: 
   54: sub propath {
   55:     my ($udom,$uname)=@_;
   56:     $udom=~s/\W//g;
   57:     $uname=~s/\W//g;
   58:     my $subdir=$uname.'__';
   59:     $subdir =~ s/(.)(.)(.).*/$1\/$2\/$3/;
   60:     my $proname="$Apache::lonnet::perlvar{'lonUsersDir'}/$udom/$subdir/$uname";
   61:     return $proname;
   62: } 
   63: 
   64: # ================================================ Get course directory listing
   65: 
   66: sub crsdirlist {
   67:     my ($courseid,$which)=@_;
   68:     unless ($which) { $which=''; }
   69:     my %crsdata=&Apache::lonnet::coursedescription($courseid);
   70:     my @listing=&Apache::lonnet::dirlist
   71: 	($which,$crsdata{'domain'},$crsdata{'num'},
   72: 	 &propath($crsdata{'domain'},$crsdata{'num'}));
   73:     my @output=();
   74:     foreach (@listing) {
   75: 	unless ($_=~/^\./) {
   76: 	    push (@output,(split(/\&/,$_))[0]);
   77: 	}
   78:     }
   79:     return @output;
   80: }
   81: 
   82: # ============================================================= Read a userfile
   83: 
   84: sub readfile {
   85:     my ($courseid,$which)=@_;
   86:     my %crsdata=&Apache::lonnet::coursedescription($courseid);
   87:     return &Apache::lonnet::getfile('/uploaded/'.$crsdata{'domain'}.'/'.
   88: 				    $crsdata{'num'}.'/'.$which);
   89: }
   90: 
   91: # ============================================================ Write a userfile
   92: 
   93: sub writefile {
   94:     (my $courseid, my $which,$ENV{'form.output'})=@_;
   95:     my %crsdata=&Apache::lonnet::coursedescription($courseid);
   96:     return &Apache::lonnet::finishuserfileupload(
   97: 					  $crsdata{'num'},$crsdata{'domain'},
   98: 					  $crsdata{'home'},
   99: 					  'output',$which);
  100: }
  101: 
  102: # ===================================================================== Rewrite
  103: 
  104: sub rewritefile {
  105:     my ($contents,%rewritehash)=@_;
  106:     foreach (keys %rewritehash) {
  107: 	my $pattern=$_;
  108: 	$pattern=~s/(\W)/\\$1/gs;
  109: 	my $new=$rewritehash{$_};
  110: 	$contents=~s/$pattern/$new/gs;
  111:     }
  112:     return $contents;
  113: }
  114: 
  115: # ============================================================= Copy a userfile
  116: 
  117: sub copyfile {
  118:     my ($origcrsid,$newcrsid,$which)=@_;
  119:     unless ($which=~/\.sequence$/) {
  120: 	return &writefile($newcrsid,$which,
  121: 		      &readfile($origcrsid,$which));
  122:     } else {
  123: 	my %origcrsdata=&Apache::lonnet::coursedescription($origcrsid);
  124: 	my %newcrsdata= &Apache::lonnet::coursedescription($newcrsid);
  125: 	return &writefile($newcrsid,$which,
  126: 		 &rewritefile(
  127:                      &readfile($origcrsid,$which),
  128: 	    (
  129:        '/uploaded/'.$origcrsdata{'domain'}.'/'.$origcrsdata{'num'}.'/'
  130:     => '/uploaded/'. $newcrsdata{'domain'}.'/'. $newcrsdata{'num'}.'/'
  131:             )));
  132:     }
  133: }
  134: 
  135: # =============================================================== Copy a dbfile
  136: 
  137: sub copydb {
  138:     my ($origcrsid,$newcrsid,$which)=@_;
  139:     $which=~s/\.db$//;
  140:     my %origcrsdata=&Apache::lonnet::coursedescription($origcrsid);
  141:     my %newcrsdata= &Apache::lonnet::coursedescription($newcrsid);
  142:     my %data=&Apache::lonnet::dump
  143: 	($which,$origcrsdata{'domain'},$origcrsdata{'num'});
  144:     return &Apache::lonnet::put
  145: 	($which,\%data,$newcrsdata{'domain'},$newcrsdata{'num'});
  146: }
  147: 
  148: # ========================================================== Copy resourcesdata
  149: 
  150: sub copyresourcedb {
  151:     my ($origcrsid,$newcrsid)=@_;
  152:     my %origcrsdata=&Apache::lonnet::coursedescription($origcrsid);
  153:     my %newcrsdata= &Apache::lonnet::coursedescription($newcrsid);
  154:     my %data=&Apache::lonnet::dump
  155: 	('resourcedata',$origcrsdata{'domain'},$origcrsdata{'num'});
  156:     $origcrsid=~s/^\///;
  157:     $origcrsid=~s/\//\_/;
  158:     $newcrsid=~s/^\///;
  159:     $newcrsid=~s/\//\_/;
  160:     my %newdata=();
  161:     undef %newdata;
  162:     my $startdate=$data{$origcrsid.'.0.opendate'};
  163:     my $today=time;
  164:     my $delta=0;
  165:     if ($startdate) {
  166: 	my $oneday=60*60*24;
  167: 	$delta=$today-$startdate;
  168: 	$delta=int($delta/$oneday)*$oneday;
  169:     }
  170: # ugly retro fix for broken version of types
  171:     foreach (keys %data) {
  172: 	if ($_=~/\wtype$/) {
  173: 	    my $newkey=$_;
  174: 	    $newkey=~s/type$/\.type/;
  175: 	    $data{$newkey}=$data{$_};
  176: 	    delete $data{$_};
  177: 	}
  178:     }
  179: # adjust symbs
  180:     my $pattern='uploaded/'.$origcrsdata{'domain'}.'/'.$origcrsdata{'num'}.'/';
  181:     $pattern=~s/(\W)/\\$1/gs;
  182:     my $new=    'uploaded/'. $newcrsdata{'domain'}.'/'. $newcrsdata{'num'}.'/';
  183:     foreach (keys %data) {
  184: 	if ($_=~/$pattern/) {
  185: 	    my $newkey=$_;
  186: 	    $newkey=~s/$pattern/$new/;
  187: 	    $data{$newkey}=$data{$_};
  188: 	    delete $data{$_};
  189: 	}
  190:     }
  191: # adjust dates
  192:     foreach (keys %data) {
  193: 	my $thiskey=$_;
  194: 	$thiskey=~s/^$origcrsid/$newcrsid/;
  195: 	$newdata{$thiskey}=$data{$_};
  196: 	if ($data{$_.'.type'}=~/^date/) {
  197: 	    $newdata{$thiskey}=$newdata{$thiskey}+$delta;
  198: 	}
  199:     }
  200:     return &Apache::lonnet::put
  201: 	('resourcedata',\%newdata,$newcrsdata{'domain'},$newcrsdata{'num'});
  202: }
  203: 
  204: # ========================================================== Copy all userfiles
  205: 
  206: sub copyuserfiles {
  207:     my ($origcrsid,$newcrsid)=@_;
  208:     foreach (&crsdirlist($origcrsid,'userfiles')) {
  209: 	&copyfile($origcrsid,$newcrsid,$_);
  210:     }
  211: }
  212: # ========================================================== Copy all userfiles
  213: 
  214: sub copydbfiles {
  215:     my ($origcrsid,$newcrsid)=@_;
  216:     foreach (&crsdirlist($origcrsid)) {
  217: 	if ($_=~/\.db$/) {
  218: 	    unless 
  219:              ($_=~/^(nohist\_|discussiontimes|classlist|versionupdate|resourcedata)/) {
  220: 		 &copydb($origcrsid,$newcrsid,$_);
  221: 	     }
  222: 	}
  223:     }
  224: }
  225: 
  226: # ======================================================= Copy all course files
  227: 
  228: sub copycoursefiles {
  229:     my ($origcrsid,$newcrsid)=@_;
  230:     &copyuserfiles($origcrsid,$newcrsid);
  231:     &copydbfiles($origcrsid,$newcrsid);
  232:     &copyresourcedb($origcrsid,$newcrsid);
  233: }
  234: 
  235: # ===================================================== Phase one: fill-in form
  236: 
  237: sub print_course_creation_page {
  238:     my $r=shift;
  239:     my $defdom=$ENV{'request.role.domain'};
  240:     my %host_servers = &Apache::loncommon::get_library_servers($defdom);
  241:     my $course_home = '<select name="course_home" size="1">'."\n";
  242:     foreach my $server (sort(keys(%host_servers))) {
  243:         $course_home .= qq{<option value="$server"};
  244:         if ($server eq $Apache::lonnet::perlvar{'lonHostID'}) {
  245:             $course_home .= " selected ";
  246:         }
  247:         $course_home .= qq{>$server $host_servers{$server}</option>};
  248:     }
  249:     $course_home .= "\n</select>\n";
  250:     my $domform = &Apache::loncommon::select_dom_form($defdom,'ccdomain');
  251:     my $bodytag=&Apache::loncommon::bodytag('Create a New Course');
  252:     my $helplink=&Apache::loncommon::help_open_topic('Create_Course','Help on Creating Courses');
  253:     my $cloneform=&Apache::loncommon::select_dom_form
  254: 	($ENV{'request.role.domain'},'clonedomain').
  255: 		     &Apache::loncommon::selectcourse_link
  256: 		     ('ccrs','clonecourse','clonedomain');
  257:     my $coursebrowserjs=&Apache::loncommon::coursebrowser_javascript();
  258:     $r->print(<<ENDDOCUMENT);
  259: <html>
  260: <script language="JavaScript" type="text/javascript">
  261: var editbrowser = null;
  262: function openbrowser(formname,elementname) {
  263:     var url = '/res/?';
  264:     if (editbrowser == null) {
  265:         url += 'launch=1&';
  266:     }
  267:     url += 'catalogmode=interactive&';
  268:     url += 'mode=edit&';
  269:     url += 'form=' + formname + '&';
  270:     url += 'element=' + elementname + '&';
  271:     url += 'only=sequence' + '';
  272:     var title = 'Browser';
  273:     var options = 'scrollbars=1,resizable=1,menubar=0';
  274:     options += ',width=700,height=600';
  275:     editbrowser = open(url,title,options,'1');
  276:     editbrowser.focus();
  277: }
  278: </script>
  279: $coursebrowserjs
  280: <head>
  281: <title>The LearningOnline Network with CAPA</title>
  282: </head>
  283: $bodytag
  284: $helplink
  285: <form action="/adm/createcourse" method="post" name="ccrs">
  286: <h2>Course Information</h2>
  287: <p>
  288: <b>Course Title:</b>
  289: <input type="text" size="50" name="title">
  290: </p><p>
  291: <b>Course Home Server:</b>$course_home
  292: </p><p>
  293: <b>Course ID/Number (optional)</b>
  294: <input type="text" size="30" name="crsid">
  295: </p>
  296: <h2>Course Content</h2>
  297: <table border="2">
  298: <tr><th>Completely new course</th><th>Clone an existing course</th></tr>
  299: <tr><td>
  300: <p>
  301: <b>Map:</b>
  302: <input type="text" size="50" name="topmap">
  303: <a href="javascript:openbrowser('ccrs','topmap')">Select Map</a>
  304: </p><p>
  305: <b>Do NOT generate as standard course</b><br /> 
  306: (only check if you know what you are doing):
  307: <input type="checkbox" name="nonstandard">
  308: </p>
  309: <p>
  310: <b>First Resource</b><br />(standard courses only):
  311: <input type="radio" name="firstres" value="blank">Blank
  312: &nbsp;
  313: <input type="radio" name="firstres" value="syl" checked>Syllabus
  314: &nbsp;
  315: <input type="radio" name="firstres" value="nav">Navigate
  316: </p>
  317: </td><td>
  318: Course ID: <input input type="text" size="25" name="clonecourse" value="" />
  319: <br />
  320: Domain: 
  321: $cloneform<br />&nbsp;<br />
  322: Additional settings, if specified below, will override cloned settings.
  323: </td></tr>
  324: </table>
  325: <h2>Assessment Parameters</h2>
  326: <p>
  327: <b>Open all assessments: </b>
  328: <input type="checkbox" name="openall" checked>
  329: </p>
  330: <h2>Messaging</h2>
  331: <p>
  332: <b>Set course policy feedback to Course Coordinator: </b>
  333: <input type="checkbox" name="setpolicy" checked>
  334: </p><p>
  335: <b>Set content feedback to Course Coordinator: </b>
  336: <input type="checkbox" name="setcontent" checked>
  337: </p>
  338: <h2>Communication</h2>
  339: <p>
  340: <b>Disable student resource discussion: </b>
  341: <input type="checkbox" name="disresdis" /> <br />
  342: <b>Disable student use of chatrooms: </b>
  343: <input type="checkbox" name="disablechat" />
  344: </p>
  345: <h2>Access Control</h2>
  346: <p>
  347: <b>Students need access key to enter course: </b>
  348: <input type="checkbox" name="setkeys" />
  349: </p>
  350: <h2>Course Coordinator</h2>
  351: <p>
  352: <b>Username:</b> <input type="text" size="15" name="ccuname" />
  353: </p><p>
  354: <b>Domain:</b> $domform
  355: </p><p>
  356: <b>Immediately expire own role as Course Coordinator:</b>
  357: <input type="checkbox" name="expireown" checked>
  358: </p><p>
  359: <input type="hidden" name="phase" value="two" />
  360: <input type="submit" value="Open Course">
  361: </p>
  362: </form>
  363: </body>
  364: </html>
  365: ENDDOCUMENT
  366: }
  367: 
  368: # ====================================================== Phase two: make course
  369: 
  370: sub create_course {
  371:     my $r=shift;
  372:     my $topurl='/res/'.&Apache::lonnet::declutter($ENV{'form.topmap'});
  373:     my $ccuname=$ENV{'form.ccuname'};
  374:     my $ccdomain=$ENV{'form.ccdomain'};
  375:     $ccuname=~s/\W//g;
  376:     $ccdomain=~s/\W//g;
  377:     my $cdescr=$ENV{'form.title'};
  378:     my $curl=$ENV{'form.topmap'};
  379:     my $bodytag=&Apache::loncommon::bodytag('Create a New Course');
  380:     $r->print(<<ENDENHEAD);
  381: <html>
  382: <head>
  383: <title>The LearningOnline Network with CAPA</title>
  384: </head>
  385: $bodytag
  386: ENDENHEAD
  387:     #
  388:     # Verify data
  389:     #
  390:     # Check the veracity of the course coordinator
  391:     if (&Apache::lonnet::homeserver($ccuname,$ccdomain) eq 'no_host') {
  392:         $r->print('No such user '.$ccuname.' at '.$ccdomain.'</body></html>');
  393: 	return;
  394:     }
  395:     # Check the proposed home server for the course
  396:     my %host_servers = &Apache::loncommon::get_library_servers
  397:         ($ENV{'request.role.domain'});
  398:     if (! exists($host_servers{$ENV{'form.course_home'}})) {
  399:         $r->print('Invalid home server for course: '.
  400:                   $ENV{'form.course_home'}.'</body></html>');
  401:         return;
  402:     }
  403: #
  404: # Open course
  405: #
  406:     my %cenv=();
  407:     my $courseid=&Apache::lonnet::createcourse($ENV{'request.role.domain'},
  408:                                                $cdescr,$curl,
  409:                                                $ENV{'form.course_home'},
  410:                                                $ENV{'form.nonstandard'});
  411: 
  412:     # Note: The testing routines depend on this being output; see 
  413:     # Utils::Course. This needs to at least be output as a comment
  414:     # if anyone ever decides to not show this, and Utils::Course::new
  415:     # will need to be suitably modified.
  416:     $r->print('New LON-CAPA Course ID: '.$courseid.'<br>');
  417: #
  418: # Check if created correctly
  419: #
  420:     my ($crsudom,$crsunum)=($courseid=~/^\/(\w+)\/(\w+)$/);
  421:     my $crsuhome=&Apache::lonnet::homeserver($crsunum,$crsudom);
  422:     $r->print('Created on: '.$crsuhome.'<br>');
  423: #
  424: # Are we cloning?
  425: #
  426:     my $cloneid='';
  427:     if (($ENV{'form.clonecourse'}) && ($ENV{'form.clonedomain'})) {
  428: 	$cloneid='/'.$ENV{'form.clonedomain'}.'/'.$ENV{'form.clonecourse'};
  429:         my ($clonecrsudom,$clonecrsunum)=($cloneid=~/^\/(\w+)\/(\w+)$/);
  430: 	my $clonehome=&Apache::lonnet::homeserver($clonecrsunum,$clonecrsudom);
  431: 	if ($clonehome eq 'no_host') {
  432: 	    $r->print(
  433:     '<br /><font color="red">Attempting to clone non-existing course '.$cloneid.'</font>');
  434: 	} else {
  435: 	    $r->print(
  436:     '<br /><font color="green">Cloning course from '.$clonehome.'</font>');
  437: 	    my %oldcenv=&Apache::lonnet::dump('environment',$crsudom,$crsunum);
  438: # Copy all files
  439: 	    &copycoursefiles($cloneid,$courseid);
  440: # Restore URL
  441: 	    $cenv{'url'}=$oldcenv{'url'};
  442: # Restore title
  443: 	    $cenv{'description'}=$oldcenv{'description'};
  444: # Mark as cloned
  445: 	    $cenv{'clonedfrom'}=$cloneid;
  446: 	}
  447:     }
  448: #
  449: # Set environment (will override cloned, if existing)
  450: #
  451:     if ($ENV{'form.crsid'}) {
  452:         $cenv{'courseid'}=$ENV{'form.crsid'};
  453:     }
  454:     if (($ccdomain) && ($ccuname)) {
  455:        if ($ENV{'form.setpolicy'}) {
  456:            $cenv{'policy.email'}=$ccuname.':'.$ccdomain;
  457:        }
  458:        if ($ENV{'form.setcontent'}) {
  459:            $cenv{'question.email'}=$ccuname.':'.$ccdomain;
  460:        }
  461:     }
  462:     if ($ENV{'form.setkeys'}) {
  463:        $cenv{'keyaccess'}='yes';
  464:     }
  465:     if ($ENV{'form.disresdis'}) {
  466:         $cenv{'pch.roles.denied'}='st';
  467:     }
  468:     if ($ENV{'form.disablechat'}) {
  469:         $cenv{'plc.roles.denied'}='st';
  470:     }
  471: 
  472:     # Record we've not yet viewed the Course Initialization Helper for this 
  473:     # course
  474:     $cenv{'course.helper.not.run'} = 1;
  475:     #
  476:     # Use new Randomseed
  477:     #
  478:     $cenv{'rndseed'}=&Apache::lonnet::latest_rnd_algorithm_id();;
  479:     #
  480:     # By default, use standard grading
  481:     $cenv{'grading'} = 'standard';
  482: 
  483:     $r->print('<br />Setting environment: '.                 
  484:           &Apache::lonnet::put('environment',\%cenv,$crsudom,$crsunum).'<br>');
  485: #
  486: # Open all assignments
  487: #
  488:     if ($ENV{'form.openall'}) {
  489:        my $storeunder=$crsudom.'_'.$crsunum.'.0.opendate';
  490:        my %storecontent = ($storeunder         => time,
  491:                            $storeunder.'.type' => 'date_start');
  492:        
  493:        $r->print('Opening all assignments: '.&Apache::lonnet::cput
  494:                  ('resourcedata',\%storecontent,$crsudom,$crsunum).'<br>');
  495:    }
  496: #
  497: # Set first page
  498: #
  499:     unless (($ENV{'form.nonstandard'}) || ($ENV{'form.firstres'} eq 'blank')) {
  500: 	$r->print('Setting first resource: ');
  501:         my ($errtext,$fatal)=
  502:            &Apache::londocs::mapread($crsunum,$crsudom,'default.sequence');
  503:         $r->print(($fatal?$errtext:'read ok').' - ');
  504:         my $title; my $url;
  505:         if ($ENV{'form.firstres'} eq 'syl') {
  506: 	    $title='Syllabus';
  507:             $url='/public/'.$crsudom.'/'.$crsunum.'/syllabus';
  508:         } else {
  509:             $title='Navigate Contents';
  510:             $url='/adm/navmaps';
  511:         }
  512:         $Apache::lonratedt::resources[1]=$title.':'.$url.':false:start:res';
  513:         ($errtext,$fatal)=
  514:            &Apache::londocs::storemap($crsunum,$crsudom,'default.sequence');
  515:         $r->print(($fatal?$errtext:'write ok').'<br>');
  516:   }
  517: #
  518: # Make current user course adminstrator
  519: #
  520:     my $end=undef;
  521:     my $addition='';
  522:     if ($ENV{'form.expireown'}) { $end=time+5; $addition='expired'; }
  523:     $r->print('Assigning '.$addition.' role of course coordinator to self: '.
  524:     &Apache::lonnet::assignrole(
  525:      $ENV{'user.domain'},$ENV{'user.name'},$courseid,'cc',$end).'<br>');
  526: #
  527: # Make additional user course administrator
  528: #
  529:    if (($ccdomain) && ($ccuname)) {
  530:     $r->print('Assigning role of course coordinator to '.
  531:                $ccuname.' at '.$ccdomain.': '.
  532:     &Apache::lonnet::assignrole($ccdomain,$ccuname,$courseid,'cc').'<p>');
  533:    }
  534:     if ($ENV{'form.setkeys'}) {
  535: 	$r->print(
  536:  '<p><a href="/adm/managekeys?cid='.$crsudom.'_'.$crsunum.'">Manage Access Keys</a></p>');
  537:     }
  538:     $r->print('<p>Roles will be active at next login.</p></body></html>');
  539: }
  540: 
  541: # ===================================================================== Handler
  542: sub handler {
  543:     my $r = shift;
  544: 
  545:     if ($r->header_only) {
  546:        &Apache::loncommon::content_type($r,'text/html');
  547:        $r->send_http_header;
  548:        return OK;
  549:     }
  550: 
  551:     if (&Apache::lonnet::allowed('ccc',$ENV{'request.role.domain'})) {
  552:        &Apache::loncommon::content_type($r,'text/html');
  553:        $r->send_http_header;
  554: 
  555:        if ($ENV{'form.phase'} eq 'two') {
  556:            &create_course($r);
  557:        } else {
  558: 	   &print_course_creation_page($r);
  559:        }
  560:    } else {
  561:       $ENV{'user.error.msg'}=
  562:         "/adm/createcourse:ccc:0:0:Cannot create courses";
  563:       return HTTP_NOT_ACCEPTABLE; 
  564:    }
  565:    return OK;
  566: } 
  567: 
  568: 1;
  569: __END__

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