version 1.5, 2003/12/11 15:43:29
|
version 1.9, 2004/06/17 18:31:25
|
Line 29 package localenroll;
|
Line 29 package localenroll;
|
use strict; |
use strict; |
|
|
################################ |
################################ |
|
# sub run |
|
# set this to return 1 if you want the auto enrollment to run |
|
################################ |
|
|
|
sub run() { |
|
my $dom = shift; |
|
return 0; |
|
} |
|
|
|
################################ |
# sub fetch_enrollment |
# sub fetch_enrollment |
# |
# |
# connects to the institutional classlist data source, |
# connects to the institutional classlist data source, |
Line 43 use strict;
|
Line 53 use strict;
|
# where DOMAIN = msu COURSE = 43551dedcd43febmsul1 |
# where DOMAIN = msu COURSE = 43551dedcd43febmsul1 |
# INSTITUTIONALCODE = fs03nop590001 |
# INSTITUTIONALCODE = fs03nop590001 |
# (MSU's course naming scheme - fs03 = Fall semester 2003, nop = |
# (MSU's course naming scheme - fs03 = Fall semester 2003, nop = |
# department name, 590 = course number, 001 = section number. |
# department name, 590 = course number, 001 = section number.) |
# |
# |
# fetch_enrollment requires three arguments - |
# fetch_enrollment requires three arguments - |
# $dom - DOMAIN e.g., msu |
# $dom - DOMAIN e.g., msu |
Line 98 use strict;
|
Line 108 use strict;
|
#</students> |
#</students> |
# |
# |
# The <startdate> and the <enddate> are the activation date and expiration date |
# The <startdate> and the <enddate> are the activation date and expiration date |
# for this student's role. If they are absent, then the date set for |
# for this student's role. If they are absent, then the default access start and |
# first automated enrollment is used as the default activation date, and the |
# default access end dates are used. The default access dates can be set when |
# date set for last automated enrollment is used as the default expiration date. |
# 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 |
# If dates are to included in the XML file, they should be in the format |
# YYYY:MM:DD:HH:MM:SS (: separators required). |
# YYYY:MM:DD:HH:MM:SS (: separators required). |
# |
# |
Line 128 use strict;
|
Line 143 use strict;
|
################################ |
################################ |
|
|
sub fetch_enrollment { |
sub fetch_enrollment { |
my ($dom,$affiliatesref,$replyref) = @_; |
my ($dom,$affiliatesref,$replyref) = @_; |
foreach my $crs (sort keys %{$affiliatesref}) { |
foreach my $crs (sort keys %{$affiliatesref}) { |
$$replyref{$crs} = 0; |
$$replyref{$crs} = 0; |
} |
} |
} |
my $okflag = 0; |
my $okflag = 0; |
return $okflag; |
return $okflag; |
|
} |
} |
|
|
############################### |
############################### |
Line 151 sub fetch_enrollment {
|
Line 165 sub fetch_enrollment {
|
# official sections and provides a checkbox to use to |
# official sections and provides a checkbox to use to |
# select enrollment in the LON-CAPA course from each official section. |
# select enrollment in the LON-CAPA course from each official section. |
# |
# |
# get_sections requires one argument - the instituional coursecode |
# get_sections requires one argument - the institutional coursecode |
# (in the MSU case this is a concatenation of semester code, department |
# (in the MSU case this is a concatenation of semester code, department |
# and course number). |
# and course number). |
# |
# |
Line 163 sub fetch_enrollment {
|
Line 177 sub fetch_enrollment {
|
################################ |
################################ |
|
|
sub get_sections { |
sub get_sections { |
my $coursecode = shift; |
my ($coursecode,$dom) = @_; |
my @secs = (); |
my @secs = (); |
return @secs; |
return @secs; |
} |
} |
Line 175 sub get_sections {
|
Line 189 sub get_sections {
|
# lonpopulate.pm to record that fact that a new course section |
# lonpopulate.pm to record that fact that a new course section |
# has been added to LON-CAPA that requires access to institutional data |
# has been added to LON-CAPA that requires access to institutional data |
# At MSU, this is required, as institutional classlists can only made |
# At MSU, this is required, as institutional classlists can only made |
# available to faculty who are officially assigned to a course |
# available to faculty who are officially assigned to a course. |
# |
# |
# The new_course subroutine is used to check that the course owner |
# The new_course subroutine is used to check that the course owner |
# of the LON-CAPA course is permitted to access the institutional |
# of the LON-CAPA course is permitted to access the institutional |
Line 196 sub get_sections {
|
Line 210 sub get_sections {
|
################################# |
################################# |
|
|
sub new_course { |
sub new_course { |
my ($course_id,$owner) = @_; |
my ($course_id,$owner,$dom) = @_; |
my $outcome = 'ok'; |
my $outcome = 'ok'; |
return $outcome; |
return $outcome; |
} |
} |
Line 221 sub new_course {
|
Line 235 sub new_course {
|
############################### |
############################### |
|
|
sub validate_courseID { |
sub validate_courseID { |
my $course_id = shift; |
my ($course_id,$dom) = @_; |
my $outcome = 'ok'; |
my $outcome = 'ok'; |
return $outcome; |
return $outcome; |
} |
} |
Line 230 sub validate_courseID {
|
Line 244 sub validate_courseID {
|
# sub create_password |
# sub create_password |
# |
# |
# This is called when the authentication method set for the automated |
# This is called when the authentication method set for the automated |
# enrollment process when enrolling new users in the domain is "local". |
# enrollment process when enrolling new users in the domain is "localauth". |
# This could be signalled for the specific user by the value of local |
# This could be signalled for the specific user by the value of localauth |
# for the <authtype> tag from the classlist.xml files, or if this is blank, |
# for the <authtype> tag from the classlist.xml files, or if this is blank, |
# the default authtype, set by the domain coordinator when creating the course |
# the default authtype, set by the domain coordinator when creating the course |
# with loncreatecourse.pm. |
# with loncreatecourse.pm. |
Line 246 sub validate_courseID {
|
Line 260 sub validate_courseID {
|
# (b) a flag to indicate whether a password had been created |
# (b) a flag to indicate whether a password had been created |
# 0 means no password created |
# 0 means no password created |
# 1 means password created. In this case the calling module - Enrollment.pm |
# 1 means password created. In this case the calling module - Enrollment.pm |
# will send the LON-CAPA username and passwod to the new user's e-mail |
# will send the LON-CAPA username and password to the new user's e-mail |
# (if one was provided), or to the course owner (if one was not provided and |
# (if one was provided), or to the course owner (if one was not provided and |
# the new user was created by the automated process), or to the active |
# the new user was created by the automated process), or to the active |
# course coordinator (if the new user was created using the 'update roster |
# course coordinator (if the new user was created using the 'update roster |
# now' interface included in the Automated Enrollment Manager. |
# now' interface included in the Automated Enrollment Manager). |
# (c) a flag to indicate that the authentication method is correct - 'ok'. |
# (c) a flag to indicate that the authentication method is correct - 'ok'. |
# If $authchk is not set to 'ok' then account creation and enrollment of the |
# If $authchk is not set to 'ok' then account creation and enrollment of the |
# new user will not occur. |
# new user will not occur. |
Line 258 sub validate_courseID {
|
Line 272 sub validate_courseID {
|
############################### |
############################### |
|
|
sub create_password { |
sub create_password { |
my $authparam = shift; |
my ($authparam,$dom) = @_; |
my $authchk = 'ok'; |
my $authchk = 'ok'; |
my $create_passwd = 0; |
my $create_passwd = 0; |
return ($authparam,$create_passwd,$authchk); |
return ($authparam,$create_passwd,$authchk); |