--- loncom/enrollment/localenroll.pm 2004/03/18 01:02:20 1.8 +++ loncom/enrollment/localenroll.pm 2004/07/03 18:37:20 1.10 @@ -1,6 +1,6 @@ # functions to glue school database system into Lon-CAPA for # automated enrollment -# $Id: localenroll.pm,v 1.8 2004/03/18 01:02:20 raeburn Exp $ +# $Id: localenroll.pm,v 1.10 2004/07/03 18:37:20 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -33,7 +33,10 @@ use strict; # set this to return 1 if you want the auto enrollment to run ################################ -sub run { return 0; } +sub run() { + my $dom = shift; + return 0; +} ################################ # sub fetch_enrollment @@ -105,13 +108,14 @@ sub run { return 0; } # # # The and the are the activation date and expiration date -# for this student's role. If they are absent, then neither a start date nor an end -# date will be set, and the student role will remain active until the role is -# explicitly expired using ENRL -> Drop students. -# An option to set a default activation date, and a default expiration date will -# be added to loncreatecourse.pm, and lonpopulate.pm in a future release. -# Once these default parameters are available, they will be used as the start date and -# the end date in cases where the and fields are blank. +# for this student's role. If they are absent, then the default access start and +# default access end dates are used. The default access dates can be set when +# the course is created, and can be modified using the Automated Enrollment +# Manager, or via the 'Upload a class list','Enroll a single student' or +# 'Modify student data' utilities in the Enrollment Manager, by checking the +# 'make these dates the default for future enrollment' checkbox. If no default +# dates have been set, then the tudent role will be active immediately, and will +# remain active until the role is explicitly expired using ENRL -> Drop students. # If dates are to included in the XML file, they should be in the format # YYYY:MM:DD:HH:MM:SS (: separators required). # @@ -170,10 +174,10 @@ sub fetch_enrollment { # interface will allow the course coordinator to enter section numbers # in text boxes. # -################################ +############################### sub get_sections { - my $coursecode = shift; + my ($coursecode,$dom) = @_; my @secs = (); return @secs; } @@ -206,7 +210,7 @@ sub get_sections { ################################# sub new_course { - my ($course_id,$owner) = @_; + my ($course_id,$owner,$dom) = @_; my $outcome = 'ok'; return $outcome; } @@ -231,7 +235,7 @@ sub new_course { ############################### sub validate_courseID { - my $course_id = shift; + my ($course_id,$dom) = @_; my $outcome = 'ok'; return $outcome; } @@ -268,10 +272,52 @@ sub validate_courseID { ############################### sub create_password { - my $authparam = shift; + my ($authparam,$dom) = @_; my $authchk = 'ok'; my $create_passwd = 0; return ($authparam,$create_passwd,$authchk); } +############################### +# sub instcode_format +# +# Split coursecodes into constituent parts. +# e.g., INSTITUTIONALCODE = fs03nop590, LON-CAPA COURSEID: 43551dedcd43febmsul1 +# (MSU's course naming scheme - fs03 = Fall semester 2003, nop = +# department name, 590 = course number) +# +# Incoming data: +# $dom (domain) +# $$courseIDs{'43551dedcd43febmsul1'} = 'Title of course' (hash of courseIDs) +# +# fs03nop590 would be split as follows +# @{$codetitles} = ("year","semester","department","number") +# $$codes{{'year'} = '2003' +# $$codes{'semester'} = 'Fall' +# $$codes{'department'} = 'nop' +# $$codes{'number'} = '590' +# +# requires five arguments: +# domain ($dom) +# reference to hash of institutional course IDs ($instcodes) +# reference to hash of codes ($codes) +# reference to array of titles ($codetitles) +# reference to hash of abbreviations used in categories +# reference to hash of arrays specifying sort order used in category titles +# +# e.g., %{$$cat_titles{'Semester'}} = ( +# fs => 'Fall', +# ss => 'Spring', +# us => 'Summer'); +# +# e.g., @{$$cat_order{'Semester'}} = ('ss','us','fs'); +# returns 1 parameter: 'ok' if no processing errors. +############################### + +sub instcode_format () { + my ($dom,$instcodes,$codes,$codetitles,$cat_titles,$cat_order) = @_; + my $outcome = 'ok'; + return $outcome; +} + 1;