File:  [LON-CAPA] / loncom / enrollment / localenroll.pm
Revision 1.22: download - view: text, annotated - select for diffs
Sat Aug 25 18:35:17 2007 UTC (16 years, 8 months ago) by raeburn
Branches: MAIN
CVS tags: HEAD
Update documentation for &get_userinfo()
- begins added as a searchtype (look for matches which begin with the
  searchterm).

    1: # functions to glue school database system into Lon-CAPA for 
    2: # automated enrollment
    3: # $Id: localenroll.pm,v 1.22 2007/08/25 18:35:17 raeburn Exp $
    4: #
    5: # Copyright Michigan State University Board of Trustees
    6: #
    7: # This file is part of the LearningOnline Network with CAPA (LON-CAPA).
    8: #
    9: # LON-CAPA is free software; you can redistribute it and/or modify
   10: # it under the terms of the GNU General Public License as published by
   11: # the Free Software Foundation; either version 2 of the License, or
   12: # (at your option) any later version.
   13: #
   14: # LON-CAPA is distributed in the hope that it will be useful,
   15: # but WITHOUT ANY WARRANTY; without even the implied warranty of
   16: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   17: # GNU General Public License for more details.
   18: #
   19: # You should have received a copy of the GNU General Public License
   20: # along with LON-CAPA; if not, write to the Free Software
   21: # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
   22: #
   23: # /home/httpd/html/adm/gpl.txt
   24: #
   25: # http://www.lon-capa.org/
   26: #
   27: package localenroll;
   28: 
   29: use strict;
   30: 
   31: ################################
   32: # sub run
   33: # set this to return 1 if you want the auto enrollment to run
   34: #
   35: # Beginning with LON-CAPA version 2.4, use of this routine is
   36: # deprecated.  Whether or not Autoenroll.pl should run is set
   37: # by the Domain Coordinator via "Set domain configuration",
   38: # provided in the Domain Management section of the Main menu. 
   39: ################################
   40: 
   41: sub run() {
   42:     my $dom = shift;
   43:     return 0;
   44: }
   45: 
   46: ################################
   47: # sub fetch_enrollment
   48: #
   49: # connects to the institutional classlist data source,
   50: # reads classlist data and stores in an XML file
   51: # in /home/httpd/perl/tmp/
   52: #
   53: # classlist files are named as follows:
   54: #
   55: # DOMAIN_COURSE_INSTITUTIONALCODE_classlist.xml
   56: #
   57: # e.g., msu_43551dedcd43febmsul1_fs03nop590001_classlist.xml
   58: # where DOMAIN = msu  COURSE = 43551dedcd43febmsul1 
   59: # INSTITUTIONALCODE = fs03nop590001 
   60: # (MSU's course naming scheme - fs03 = Fall semester 2003, nop =
   61: # department name, 590 = course number, 001 = section number.)
   62: #
   63: # fetch_enrollment requires three arguments -
   64: # $dom - DOMAIN e.g., msu
   65: # $affiliatesref - a reference to a hash of arrays that contains LON-CAPA 
   66: # courses that are to be updated as keys, and institutional coursecodes 
   67: # contributing enrollment to that LON-CAPA course as elements in each array.
   68: # $replyref - a reference to a hash that contains LON-CAPA courses
   69: # that are to be updated as keys, and the total enrollment count in all 
   70: # affiliated sections, as determined from institutional data as hash elements. 
   71: #
   72: # As an example, if fetch_enrollment is called to retrieve institutional
   73: # classlists for a single LON-CAPA course - 43551dedcd43febmsul1 which 
   74: # corresponds to fs03nop590, sections 001, 601 and 602 , and the course
   75: # also accommodates enrollment from a crosslisted course in the ost
   76: # department - fs03ost580002:
   77: #
   78: # the affiliatesref would be a reference to %affiliates which would be:
   79: #
   80: # @{$affiliates{'43551dedcd43febmsul1'}} =
   81: #   ("fs03nop590001","fs03nop590601","fs03nop590602","fs03ost580002");
   82: #
   83: # fetch_enrollment would create four files in /home/httpd/perl/tmp/.
   84: # msu_43551dedcd43febmsul1_fs03nop590001_classlist.xml
   85: # msu_43551dedcd43febmsul1_fs03nop590601_classlist.xml
   86: # msu_43551dedcd43febmsul1_fs03nop590602_classlist.xml
   87: # msu_43551dedcd43febmsul1_fs03ost580002_classlist.xml
   88: #
   89: # In each file, student data would be stored in the following format
   90: # 
   91: # <student username="smith">
   92: #  <autharg>MSU.EDU</autharg>
   93: #  <authtype>krb4</authtype>
   94: #  <email>smith@msu.edu</email>
   95: #  <enddate></enddate>
   96: #  <firstname>John</firstname>
   97: #  <generation>II</generation>
   98: #  <groupID>fs03nop590001</groupID>
   99: #  <lastname>Smith</lastname>
  100: #  <middlename>D</middlename>
  101: #  <startdate></startdate>
  102: #  <studentID>A12345678</studentID>
  103: # </student>
  104: # 
  105: # with the following at the top of the file
  106: #<?xml version="1.0" encoding="UTF-8"?>
  107: #<!DOCTYPE text>
  108: #<students>
  109: #
  110: # (all comment - #s removed)
  111: #
  112: # and a closing:
  113: #</students>
  114: #
  115: # The <startdate> and the <enddate> are the activation date and expiration date
  116: # for this student's role. If they are absent, then the default access start and
  117: # default access end dates are used. The default access dates can be set when 
  118: # the course is created, and can be modified using the Automated Enrollment
  119: # Manager, or via the 'Upload a class list','Enroll a single student' or 
  120: # 'Modify student data' utilities in the Enrollment Manager, by checking the 
  121: # 'make these dates the default for future enrollment' checkbox. If no default 
  122: # dates have been set, then the tudent role will be active immediately, and will 
  123: # remain active until the role is explicitly expired using ENRL -> Drop students. 
  124: # If dates are to included in the XML file, they should be in the format
  125: # YYYY:MM:DD:HH:MM:SS (: separators required).
  126: #
  127: # If there were 10 students in fs03nop590001, 5 students in fs03nop59o601, 
  128: # 8 students in fs03nop590602, and 2 students in fs03ost580002,
  129: # then $$reply{'43551dedcd43febmsul1'} = 25
  130: #
  131: # The purpose of the %reply hash is to detect cases where the institutional 
  132: # enrollment is 0 (most likely due to a problem with the data source).
  133: # In such a case, the LON-CAPA course roster is left unchanged (i.e., no
  134: # students are expired, even if automated drops is enabled.
  135: # 
  136: # fetch_enrollment should return a 0 or 1, depending on whether a connection
  137: # could be established to the institutional data source.
  138: # 0 is returned if no connection could be made.
  139: # 1 is returned if connection was successful
  140: #
  141: # A return of 1 is required for the calling modules to perform LON-CAPA
  142: # roster changes based on the contents of the XML classlist file(s), e,g,,
  143: # msu_43551dedcd43febmsul1_fs03nop590001_classlist.xml
  144: #
  145: # XML classlist files are temporary. They are deleted after the enrollment 
  146: # update process in the calling module is complete.
  147: #
  148: ################################
  149: 
  150: sub fetch_enrollment {
  151:     my ($dom,$affiliatesref,$replyref) = @_;
  152:     foreach my $crs (sort keys %{$affiliatesref}) {
  153:         $$replyref{$crs} = 0;
  154:     }
  155:     my $okflag = 0;
  156:     return $okflag;
  157: }
  158: 
  159: ###############################
  160: # sub get_sections
  161: #
  162: # This is called by the Automated Enrollment Manager interface
  163: # (lonpopulate.pm) to create an array of valid sections for 
  164: # a specific institutional coursecode.
  165: # e.g., for MSU coursecode: fs03nop590
  166: # ("001","601","602") would be returned
  167: #
  168: # If the array returned contains at least one element, then 
  169: # the interface offerred to the course coordinator, lists
  170: # official sections and provides a checkbox to use to
  171: # select enrollment in the LON-CAPA course from each official section.  
  172: #
  173: # get_sections takes two arguments - (a) the institutional coursecode
  174: # (in the MSU case this is a concatenation of semester code, department
  175: # and course number), and (b) the LON-CAPA domain that contains the course. 
  176: # 
  177: # If there is no access to official course sections at your institution,
  178: # then an empty array is returned, and the Automated Enrollment Manager
  179: # interface will allow the course coordinator to enter section numbers
  180: # in text boxes.
  181: # 
  182: ###############################
  183: 
  184: sub get_sections {
  185:     my ($coursecode,$dom) = @_;
  186:     my @secs = ();
  187:     return @secs;
  188: }
  189: 
  190: ###############################
  191: # sub new_course
  192: #
  193: # This is called by loncreatecourse.pm and 
  194: # lonpopulate.pm to record that fact that a new course section
  195: # has been added to LON-CAPA that requires access to institutional data
  196: # At MSU, this is required, as institutional classlists can only made
  197: # available to faculty who are officially assigned to a course.
  198: # 
  199: # The new_course subroutine is used to check that the course owner
  200: # of the LON-CAPA course is permitted to access the institutional
  201: # classlist for any course sections and crosslisted classes that
  202: # the course coordinator wishes to have affiliated with the course.
  203: # 
  204: # If access is permitted, then 'ok' is returned.
  205: # The course section or crosslisted course will only be added to the list of
  206: # affiliates if 'ok' is returned.
  207: #
  208: # new_course takes three arguments -
  209: # (a) the institutional courseID (in the MSU case this is a concatenation of 
  210: # semester code, department code, course number, and section number
  211: # e.g., fs03nop590001).
  212: # (b) the course owner. This is the LON-CAPA username and domain of the course 
  213: # coordinator assigned to the course when it is first created, in the form
  214: # username:domain
  215: # (c) the LON-CAPA domain that contains the course
  216: #
  217: #################################
  218: 
  219: sub new_course  {
  220:     my ($course_id,$owner,$dom) = @_;
  221:     my $outcome = 'ok';
  222:     return $outcome;
  223: }
  224: 
  225: ###############################
  226: # sub validate_courseID
  227: #
  228: # This is called whenever a new course section or crosslisted course
  229: # is being affiliated with a LON-CAPA course (i.e., by loncreatecourse.pm
  230: # and the Automated Enrollment Manager in lonpopulate.pm).
  231: # A check is made that the courseID that the course coordinator wishes
  232: # to affiliate with the course is valid according to the institutional
  233: # schedule of official classes 
  234: #
  235: # A valid courseID is confirmed by returning 'ok'
  236: #
  237: # validate_courseID takes two arguments -
  238: # (a) the institutional courseID (in the MSU case this is a concatenation of
  239: # semester code, department code, course number, and section number
  240: # e.g., fs03nop590001).
  241: # (b) the LON-CAPA domain that contains the course
  242: #
  243: ###############################  
  244: 
  245: sub validate_courseID {
  246:     my ($course_id,$dom) = @_;
  247:     my $outcome = 'ok';
  248:     return $outcome;   
  249: }
  250: 
  251: ###############################
  252: # sub create_password 
  253: #
  254: # This is called when the authentication method set for the automated 
  255: # enrollment process when enrolling new users in the domain is "localauth".
  256: # This could be signalled for the specific user by the value of localauth
  257: # for the <authtype> tag from the classlist.xml files, or if this is blank,
  258: # the default authtype, set by the domain coordinator when creating the course
  259: # with loncreatecourse.pm.
  260: #  
  261: # create_password takes three arguments -
  262: # (a) $authparam - the value of <autharg> from the classlist.xml files,
  263: # or if this blank, the default autharg, set by the domain coordinator when 
  264: # creating the course with loncreatecourse.pm
  265: # (b) $dom - the domain of the new user.
  266: # (c) $username - the username of the new user (currently not actually used)
  267: #
  268: # Four values are returned:
  269: # (a) the value of $authparam - which might have been changed
  270: # (b) a flag to indicate whether a password had been created
  271: # 0 means no password created
  272: # 1 means password created.  In this case the calling module - Enrollment.pm
  273: # will send the LON-CAPA username and password to the new user's e-mail
  274: # (if one was provided), or to the course owner (if one was not provided and
  275: # the new user was created by the automated process), or to the active
  276: # course coordinator (if the new user was created using the 'update roster
  277: # now' interface included in the Automated Enrollment Manager).  
  278: # (c) a flag to indicate that the authentication method is correct - 'ok'.
  279: # If $authchk is not set to 'ok' then account creation and enrollment of the 
  280: # new user will not occur.
  281: # (d) if a password was created it can be sent along.  This is the password 
  282: # which will be included in the e-mail sent to the new user, or made available    
  283: # to the course owner/course coordinator if no e-mail address is provided. If
  284: # you do not wish to send a password, but want to give instructions on obtaining
  285: # one, you could set $newpasswd as those instructions. (e.g.,
  286: # $newpasswd = '(Please visit room 212, ACNS Bldg. to obtain your password)';
  287: # The value of $newpasswd is NOT written in the user's LON-CAPA passwd file in
  288: # /home/httpd/lonUsers/$dom/a/b/c/abcuser/passwd, which in the case of a user
  289: # employing localauth will contain 'localauth:$authparam'.  If you need to include
  290: # a parameter in the user's passwd file, you should return it as $authparam,
  291: # i.e., the first of the variables returned by create_password().             
  292: ###############################
  293: 
  294: sub create_password {
  295:     my ($authparam,$dom,$username) = @_;
  296:     my $authchk = 'ok';
  297:     my $newpasswd = '';
  298:     my $create_passwd = 0;
  299:     return ($authparam,$create_passwd,$authchk,$newpasswd);
  300: }
  301: 
  302: ###############################
  303: # sub instcode_format 
  304: #
  305: # Split coursecodes into constituent parts.   
  306: # e.g., INSTITUTIONALCODE = fs03nop590, LON-CAPA COURSEID: 43551dedcd43febmsul1
  307: # (MSU's course naming scheme - fs03 = Fall semester 2003, nop =
  308: # department name, 590 = course number)
  309: #
  310: # Incoming data:
  311: # $dom (domain)
  312: # $$instcodes{'43551dedcd43febmsul1'} = 'fs03nop590' (hash of courseIDs)
  313: # 
  314: # fs03nop590 would be split as follows
  315: # @{$codetitles} = ("year","semester","department","number")
  316: # $$codes{{'year'} = '2003'
  317: # $$codes{'semester'} = 'Fall'
  318: # $$codes{'department'} = 'nop'
  319: # $$codes{'number'} = '590'
  320: #
  321: # requires six arguments:
  322: # domain ($dom)
  323: # reference to hash of institutional course IDs ($instcodes)  
  324: # reference to hash of codes ($codes)
  325: # reference to array of titles ($codetitles)
  326: # reference to hash of abbreviations used in categories
  327: # reference to hash of arrays specifying sort order used in category titles   
  328: #
  329: # e.g.,     %{$$cat_titles{'Semester'}} = (
  330: #                   fs => 'Fall',
  331: #                   ss => 'Spring',
  332: #                   us => 'Summer');
  333: #
  334: # e.g., @{$$cat_order{'Semester'}} = ('ss','us','fs'); 
  335: # returns 1 parameter: 'ok' if no processing errors.  
  336: ###############################
  337: 
  338: sub instcode_format () {
  339:     my ($dom,$instcodes,$codes,$codetitles,$cat_titles,$cat_order) = @_;
  340:     my $outcome = 'ok';
  341:     return $outcome;
  342: }
  343: 
  344: ###############################
  345: # sub institutional_photos
  346: #
  347: # Called when automated enrollment manager is used to update student photos.
  348: #
  349: # Incoming data: six arguments
  350: # (a) $dom (domain)
  351: # (b) $crs (LONCAPA course number)
  352: # (c) $affiliates: a reference to a hash with the keys set to the 
  353: # institutional course IDs for the course.
  354: # (d) $result: a reference to a hash which will return usernames  
  355: #     of students (& separated) in following categories (the keys):
  356: #     new, update, missing, same, deleted, noid, nouser. The list 
  357: #     includes those students for whom the result of the modification 
  358: #     process was either addition of a new photo. update of an
  359: #     existing photo, photo was found to be missing from institution's
  360: #     data store, photo used is same as before, or photo was 
  361: #     deleted from storage on LON-CAPA server housing student's
  362: #     information, no student ID was available. 
  363:                
  364: # (e) $action: the type of action needed. (e.g., update, delete);
  365: # (f) $students: a reference to a hash with the keys set to student 
  366: # usernames and domains in the form username:domain, and values set
  367: # to the studentID, if action is required for specific students.  
  368: #
  369: # returns 1 parameter: 'ok' if no processing errors.
  370: # other course or student specific values can be stored as values
  371: # in the appropriate referenced hashes. 
  372: ###############################
  373: 
  374: sub institutional_photos {
  375:     my ($dom,$crs,$affiliates,$result,$action,$students) = @_;
  376:     my $outcome = 'ok';
  377:     return $outcome;
  378: }
  379: 
  380: ###############################
  381: # sub photo_permission
  382: #
  383: # Incoming data: three arguments
  384: # (a) $dom (domain)
  385: # (b) $perm_reqd: a reference to a a scalar that is either 'yes'
  386: # if a course owner must indicate acceptance of conditions of use,
  387: # 'no' otherwise.
  388: # (c) $conditions: the text of the conditions of use.
  389: #    
  390: # returns 1 parameter: 'ok' if no processing errors.
  391: # $$perm_reqd is set to 'yes' or 'no'
  392: # $$agreement is set to conditions of use - plain text string
  393: #             which will be displayed in a textarea in a web form.
  394: ###############################
  395:  
  396: sub photo_permission {
  397:    my ($dom,$perm_reqd,$conditions) = @_;
  398:    $$perm_reqd = 'no';
  399:    $$conditions = '';
  400:    my $outcome = 'ok';
  401:    return $outcome;
  402: }
  403: 
  404: 
  405: ###############################
  406: # sub manager_photo_update
  407: #
  408: # Incoming data: one argument
  409: # (a) $dom (domain)
  410: #
  411: # returns 2 parameters: update (0 or 1), and comment.
  412: # Called by automated enrollment manager, to determine 
  413: # whether "Update Student photos" button will be available,
  414: # and if so, the message (plain text string) that will be displayed
  415: # with the button. 
  416: ###############################
  417:                                                                                         
  418: sub manager_photo_update {
  419:     my ($dom) = @_;
  420:     my $update = 0;
  421:     my $comment = '';
  422:     return ($update,$comment);
  423: }
  424: 
  425: ###############################
  426: # sub check_section
  427: #
  428: # Incoming data: three arguments (+ fourth optional argument)
  429: # (a) $class - institutional class id (coursecode concatanated with section) 
  430: # (b) $owner - course owner (2.2 and later username:domain; pre-2.2 username)
  431: # (c) $dom 0 domain of course
  432: # (d) $dbh - optional database handle  
  433: #
  434: # returns 1 parameter - $sectioncheck ('ok' or other value). 
  435: # Verifies that course owner has access to classlist for specific class
  436: # according to institution's SIS. 'ok' if access available  
  437: ###############################
  438: 
  439: sub check_section {
  440:     my ($class,$owner,$dom,$dbh) = @_;
  441:     my $sectioncheck = 'ok';
  442:     return $sectioncheck;
  443: }
  444: 
  445: ###############################
  446: # sub instcode_defaults
  447: #
  448: # Incoming data: three arguments
  449: # (a) $dom - domain
  450: # (b) $defaults - reference to hash which will contain default regular
  451: #                 expression matches for different components of an 
  452: #                 institutional course code 
  453: # (c) $code_order - reference to array which will contain order of 
  454: #                   component parts used in institutional code.  
  455: #
  456: # returns 1 parameter - ('ok' or other value).
  457: # Used to construct a regular expression to be used when searching for
  458: # courses based on fragments of an institutional code.
  459: # $defaults contains defaults to use for each component, and code_order
  460: # contains keys of hash in order in which they are to be concatenated.
  461: #
  462: # e.g., INSTITUTIONALCODE = fs03nop590
  463: # (MSU's course naming scheme - fs  = semester, 03 = year, nop =
  464: # department name, 590 = course number)
  465: #
  466: #     %{$defaults} = (
  467: #        'Year' => '\d{2}',
  468: #        'Semester' => '^[sfu]s', 
  469: #        'Department' => '\w{2,3}',
  470: #        'Number' => '\d{3,4}\w?',
  471: #     );
  472: #
  473: #     @{$code_order} = ('Semester','Year','Department','Number');
  474: #
  475: ###############################
  476: 
  477: sub instcode_defaults {
  478:     my ($dom,$defaults,$code_order) = @_;
  479:     return 'ok';
  480: }
  481: 
  482: ###############################
  483: # sub allusers_info
  484: #
  485: # Incoming data: three arguments
  486: # (a) $dom - domain
  487: # (b) $instusers - reference to hash which will contain hashes, 
  488: #                 where keys will be usernames and value will be a 
  489: #                 hash of user information. Keys in the inner hash 
  490: #                 will be some or all of: lastname,firstname,
  491: #                 middlename, generation, id, inststatus - 
  492: #                 institutional status (e.g., faculty,staff,student)
  493: #                 Values are all scalars except inststatus,
  494: #                 which is an array.
  495: # (c) $instids - reference to hash which will contain ID numbers. 
  496: #                keys will be unique IDs (student or faculty/staff ID)
  497: #                values will be either: scalar (username) or an array 
  498: #                if a single ID matches multiple usernames.
  499: # returns 1 parameter - ('ok' or other value).
  500: # side effects - populates the $instusers and $instids refs to hashes.
  501: #                with information for all users from all available 
  502: #                institutional datafeeds.
  503: #
  504: ###############################
  505: 
  506: sub allusers_info {
  507:     my ($dom,$instusers,$instids) = @_;
  508:     my $outcome = 'ok';
  509:     return $outcome; 
  510: }
  511: 
  512: ###############################
  513: # sub get_userinfo
  514: #
  515: # Incoming data: four required arguments and additional optional argumenta
  516: # Two modes of operation:
  517: # (1) Retrieves institutional data for a single user either by username
  518: #     if $uname is included as second argument, or by ID if $id is 
  519: #     included as a third argument.  Either (b) or (c) must be provided.
  520: #     (g), (h) and (i) will be undefined.
  521: # (2) Retrieves institutional user data from search of an institutional
  522: #     directory based on a search. (g) and (h) are required.
  523: #     (i) is optional. (b) and (c) will be undefined. 
  524: #
  525: # (a) $dom - domain
  526: # (b) $uname - username of user
  527: # (c) $id - student/faculty ID of user
  528: # (d) $instusers - reference to hash which will contain info for user
  529: #                 as key = value; keys will be one or all of:
  530: #                 lastname,firstname,middlename,generation,id,inststatus -
  531: #                 institutional status (e.g., faculty,staff,student)
  532: #                 Values are all scalars except inststatus,
  533: #                 which is an array.
  534: # (e) $instids - reference to hash which will contain ID numbers - 
  535: #                 keys will be unique IDs (student or faculty/staff ID)  
  536: #                 values will be either: scalar (username) or an array
  537: #                 if a single ID matches multiple usernames.
  538: # (f) $types - optional reference to array which contains 
  539: #              institutional types to check.
  540: # (g) $srchby - optional if $uname or $id defined, otherwise required.
  541: #               Allowed values include: 1. lastfirst, 2. last, 3. uname
  542: #               corresponding to searches by 1. lastname,firstname;
  543: #               2. lastname; 3. username
  544: # (h) $srchterm - optional if $uname or $id defined, otherwise required
  545: #                String to search for.
  546: # (i) $srchtype - optional. Allowed values: contains, begins (defaults
  547: #                to exact match otherwise).
  548: #
  549: # returns 1 parameter - ('ok' or other value).
  550: # side effects - populates the $instusers and $instids refs to hashes.
  551: #                with information for specified username, or specified
  552: #                id, if fifth argument provided, from all available, or 
  553: #                specified (e.g., faculty only) institutional datafeeds,
  554: #                if sixth argument provided.
  555: ###############################
  556: 
  557: sub get_userinfo {
  558:     my ($dom,$uname,$id,$instusers,$instids,$types,
  559:         $srchby,$srchterm,$srchtype) = @_;
  560:     my $outcome = 'ok';
  561:     return $outcome;
  562: }
  563: 
  564: ###############################
  565: # sub inst_usertypes 
  566: #
  567: # Incoming data: three arguments
  568: # (a) $dom - domain
  569: # (b) $usertypes - reference to hash which will contain 
  570: #                 key = value, where keys are institution 
  571: #                 affiliation types (e.g., Faculty, Student etc.)
  572: #                 and values are titles (e.g., Faculty/Academic Staff)
  573: # (c) $order - reference to array which will contain the order in
  574: #              which institutional types should be shown
  575: #              when displaying data tables (e.g., default quotas    
  576: #              or updateable user fields (see domainprefs.pm) 
  577: # returns 1 parameter - ('ok' or other value).
  578: #
  579: ###############################
  580: 
  581: sub inst_usertypes {
  582:     my ($dom,$usertypes,$order) = @_;
  583:     @{$order} = ();
  584:     %{$usertypes} = ();
  585:     my $outcome = 'ok';
  586:     return $outcome;
  587: }
  588: 
  589: ###############################
  590: # sub AUTOLOAD
  591: #
  592: # Incoming data: none
  593: # Returns ''
  594: #
  595: # Prevents errors when undefined subroutines are called in this package
  596: # Will allow new routines added in the future to be called from lond etc.
  597: # without the need for customized versions of local*.pm packages to be
  598: # modified to include the new subroutines immediately.
  599: #
  600: # See "Programming Perl" 3rd ed. pp 296-298.   
  601: ###############################
  602: 
  603: sub AUTOLOAD {
  604:     our $AUTOLOAD;
  605:     return '';
  606: }
  607: 
  608: 1;

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