[LON-CAPA-cvs] cvs: loncom / lond /enrollment localenroll.pm /interface loncoursequeueadmin.pm /lonnet/perl lonnet.pm
raeburn
raeburn at source.lon-capa.org
Wed Apr 30 13:17:47 EDT 2014
raeburn Wed Apr 30 17:17:47 2014 EDT
Modified files:
/loncom lond
/loncom/enrollment localenroll.pm
/loncom/interface loncoursequeueadmin.pm
/loncom/lonnet/perl lonnet.pm
Log:
- Pass default start access date and default end access dates to
localenroll::crsreq_updates() so they are available to course request
validator.
Index: loncom/lond
diff -u loncom/lond:1.508 loncom/lond:1.509
--- loncom/lond:1.508 Wed Apr 16 14:39:59 2014
+++ loncom/lond Wed Apr 30 17:17:14 2014
@@ -2,7 +2,7 @@
# The LearningOnline Network
# lond "LON Daemon" Server (port "LOND" 5663)
#
-# $Id: lond,v 1.508 2014/04/16 14:39:59 raeburn Exp $
+# $Id: lond,v 1.509 2014/04/30 17:17:14 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -61,7 +61,7 @@
my $status='';
my $lastlog='';
-my $VERSION='$Revision: 1.508 $'; #' stupid emacs
+my $VERSION='$Revision: 1.509 $'; #' stupid emacs
my $remoteVERSION;
my $currenthostid="default";
my $currentdomainid;
@@ -5317,7 +5317,8 @@
sub crsreq_update_handler {
my ($cmd, $tail, $client) = @_;
my $userinput = "$cmd:$tail";
- my ($cdom,$cnum,$crstype,$action,$ownername,$ownerdomain,$fullname,$title,$code,$infohashref) =
+ my ($cdom,$cnum,$crstype,$action,$ownername,$ownerdomain,$fullname,$title,$code,
+ $accessstart,$accessend,$infohashref) =
split(/:/, $tail);
$crstype = &unescape($crstype);
$action = &unescape($action);
@@ -5326,6 +5327,8 @@
$fullname = &unescape($fullname);
$title = &unescape($title);
$code = &unescape($code);
+ $accessstart = &unescape($accessstart);
+ $accessend = &unescape($accessend);
my $incoming = &Apache::lonnet::thaw_unescape($infohashref);
my ($result,$outcome);
eval {
@@ -5333,7 +5336,8 @@
my %rtnhash;
$outcome = &localenroll::crsreq_updates($cdom,$cnum,$crstype,$action,
$ownername,$ownerdomain,$fullname,
- $title,$code,$incoming,\%rtnhash);
+ $title,$code,$accessstart,$accessend,
+ $incoming,\%rtnhash);
if ($outcome eq 'ok') {
my @posskeys = qw(createdweb createdmsg queuedweb queuedmsg formitems reviewweb);
foreach my $key (keys(%rtnhash)) {
Index: loncom/enrollment/localenroll.pm
diff -u loncom/enrollment/localenroll.pm:1.46 loncom/enrollment/localenroll.pm:1.47
--- loncom/enrollment/localenroll.pm:1.46 Wed Apr 16 14:40:11 2014
+++ loncom/enrollment/localenroll.pm Wed Apr 30 17:17:25 2014
@@ -1,6 +1,6 @@
# functions to glue school database system into Lon-CAPA for
# automated enrollment
-# $Id: localenroll.pm,v 1.46 2014/04/16 14:40:11 raeburn Exp $
+# $Id: localenroll.pm,v 1.47 2014/04/30 17:17:25 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -443,7 +443,7 @@
sub crsreq_updates {
my ($cdom,$cnum,$crstype,$action,$ownername,$ownerdomain,$fullname,$title,
- $code,$incoming,$outgoing) = @_;
+ $code,$accessstart,$accessend,$incoming,$outgoing) = @_;
unless (ref($outgoing) eq 'HASH') {
return 'fail';
}
Index: loncom/interface/loncoursequeueadmin.pm
diff -u loncom/interface/loncoursequeueadmin.pm:1.46 loncom/interface/loncoursequeueadmin.pm:1.47
--- loncom/interface/loncoursequeueadmin.pm:1.46 Sat Apr 19 20:48:43 2014
+++ loncom/interface/loncoursequeueadmin.pm Wed Apr 30 17:17:35 2014
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Utilities to administer domain course requests and course self-enroll requests
#
-# $Id: loncoursequeueadmin.pm,v 1.46 2014/04/19 20:48:43 raeburn Exp $
+# $Id: loncoursequeueadmin.pm,v 1.47 2014/04/30 17:17:35 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1605,7 +1605,9 @@
my ($result,$ownername,$ownerdom);
my $crstype = $details->{'crstype'};
my $coursedesc = $details->{'cdescr'};
- my %domconfig = &Apache::lonnet::get_dom('configuration',['requestauthor'],$dom);
+ my $accessstart = $details->{'accessstart'};
+ my $accessend = $details->{'accessend'};
+ my %domconfig = &Apache::lonnet::get_dom('configuration',['requestcourses'],$dom);
if (ref($domconfig{'requestcourses'}) eq 'HASH') {
if (ref($domconfig{'requestcourses'}{'uniquecode'}) eq 'HASH') {
if ($domconfig{'requestcourses'}{'uniquecode'}{$crstype}) {
@@ -1639,7 +1641,8 @@
$code = $$coderef;
}
$postprocess = &Apache::lonnet::auto_crsreq_update($dom,$cnum,$crstype,$result,$ownername,
- $ownerdom,$fullname,$coursedesc,$code,$customhash);
+ $ownerdom,$fullname,$coursedesc,$code,
+ $accessstart,$accessend,$customhash);
} else {
$result = 'error: '.$cid;
}
Index: loncom/lonnet/perl/lonnet.pm
diff -u loncom/lonnet/perl/lonnet.pm:1.1256 loncom/lonnet/perl/lonnet.pm:1.1257
--- loncom/lonnet/perl/lonnet.pm:1.1256 Wed Apr 23 10:11:34 2014
+++ loncom/lonnet/perl/lonnet.pm Wed Apr 30 17:17:46 2014
@@ -1,7 +1,7 @@
# The LearningOnline Network
# TCP networking package
#
-# $Id: lonnet.pm,v 1.1256 2014/04/23 10:11:34 raeburn Exp $
+# $Id: lonnet.pm,v 1.1257 2014/04/30 17:17:46 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -7893,7 +7893,7 @@
sub auto_crsreq_update {
my ($cdom,$cnum,$crstype,$action,$ownername,$ownerdomain,$fullname,$title,
- $code,$inbound) = @_;
+ $code,$accessstart,$accessend,$inbound) = @_;
my ($homeserver,%crsreqresponse);
if ($cdom =~ /^$match_domain$/) {
$homeserver = &domain($cdom,'primary');
@@ -7906,7 +7906,9 @@
my $response=&reply('autocrsrequpdate:'.$cdom.':'.$cnum.':'.&escape($crstype).
':'.&escape($action).':'.&escape($ownername).':'.
&escape($ownerdomain).':'.&escape($fullname).':'.
- &escape($title).':'.&escape($code).':'.$info,$homeserver);
+ &escape($title).':'.&escape($code).':'.
+ &escape($accessstart).':'.&escape($accessend).':'.$info,
+ $homeserver);
unless ($response =~ /(con_lost|error|no_such_host|refused)/) {
my @items = split(/&/,$response);
foreach my $item (@items) {
More information about the LON-CAPA-cvs
mailing list