--- loncom/interface/Attic/londropadd.pm 2001/08/24 21:09:53 1.15 +++ loncom/interface/Attic/londropadd.pm 2002/01/04 18:13:58 1.19 @@ -1,6 +1,30 @@ # The LearningOnline Network with CAPA # Handler to drop and add students in courses # +# $Id: londropadd.pm,v 1.19 2002/01/04 18:13:58 www Exp $ +# +# Copyright Michigan State University Board of Trustees +# +# This file is part of the LearningOnline Network with CAPA (LON-CAPA). +# +# LON-CAPA is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# LON-CAPA is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with LON-CAPA; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# /home/httpd/html/adm/gpl.txt +# +# http://www.lon-capa.org/ +# # (Handler to set parameters for assessments # # (Handler to resolve ambiguous file locations @@ -19,6 +43,11 @@ # YEAR=2001 # 01/01/01,01/15,02/10,02/13,02/14,02/22 Gerd Kortemeyer # 8/6 Scott Harrison +# Guy Albertelli +# 9/25 Gerd Kortemeyer +# 12/19 Guy Albertelli +# YEAR=2002 +# 1/4 Gerd Kortemeyer package Apache::londropadd; @@ -150,7 +179,7 @@ sub dropstudent { if ($key=~/^$courseid(?:\/)*(\w+)*\_st$/) { my $section=$1; if ($key eq $courseid.'_st') { $section=''; } - if ($section ne $csec) { + if (((!$section) && (!$csec)) || ($section ne $csec)) { my ($dummy,$end,$start)=split(/\_/, &Apache::lonnet::unescape($value)); my $now=time; @@ -473,6 +502,10 @@ LON-CAPA domain: Full Update Full update (also print list of users not enrolled anymore)
+
Note: for large courses, this operation might be time consuming.
ENDPICK
@@ -507,7 +540,7 @@ sub enroll_single_student {
$ENV{'form.cfirst'},$ENV{'form.cmiddle'},
$ENV{'form.clast'},$ENV{'form.cgen'},
$ENV{'form.csec'},$ENV{'form.enddate'},
- $ENV{'form.startdate'}));
+ $ENV{'form.startdate'},$ENV{'form.forceid'}));
} else {
$r->print('Invalid login mode or password');
}
@@ -716,6 +749,10 @@ Local Authentication with argument
Set Ending Date
+
ENDSENROLL
@@ -882,7 +919,8 @@ sub upfile_drop_add {
&dropstudent($domain,$username,$cid,$sec);
my $reply=&Apache::lonnet::modifystudent(
$domain,$username,$id,$amode,$password,
- $fname,$mname,$lname,$gen,$sec,$enddate,$startdate);
+ $fname,$mname,$lname,$gen,$sec,$enddate,$startdate,
+ $ENV{'form.forceid'});
unless ($reply eq 'ok') {
$r->print(
"
Error enrolling $username: $reply
");