version 1.506, 2014/01/03 18:39:43
|
version 1.509, 2014/04/30 17:17:14
|
Line 5263 sub crsreq_checks_handler {
|
Line 5263 sub crsreq_checks_handler {
|
my $userinput = "$cmd:$tail"; |
my $userinput = "$cmd:$tail"; |
my $dom = $tail; |
my $dom = $tail; |
my $result; |
my $result; |
my @reqtypes = ('official','unofficial','community'); |
my @reqtypes = ('official','unofficial','community','textbook'); |
eval { |
eval { |
local($SIG{__DIE__})='DEFAULT'; |
local($SIG{__DIE__})='DEFAULT'; |
my %validations; |
my %validations; |
Line 5290 sub crsreq_checks_handler {
|
Line 5290 sub crsreq_checks_handler {
|
sub validate_crsreq_handler { |
sub validate_crsreq_handler { |
my ($cmd, $tail, $client) = @_; |
my ($cmd, $tail, $client) = @_; |
my $userinput = "$cmd:$tail"; |
my $userinput = "$cmd:$tail"; |
my ($dom,$owner,$crstype,$inststatuslist,$instcode,$instseclist) = split(/:/, $tail); |
my ($dom,$owner,$crstype,$inststatuslist,$instcode,$instseclist,$customdata) = split(/:/, $tail); |
$instcode = &unescape($instcode); |
$instcode = &unescape($instcode); |
$owner = &unescape($owner); |
$owner = &unescape($owner); |
$crstype = &unescape($crstype); |
$crstype = &unescape($crstype); |
$inststatuslist = &unescape($inststatuslist); |
$inststatuslist = &unescape($inststatuslist); |
$instcode = &unescape($instcode); |
$instcode = &unescape($instcode); |
$instseclist = &unescape($instseclist); |
$instseclist = &unescape($instseclist); |
|
my $custominfo = &Apache::lonnet::thaw_unescape($customdata); |
my $outcome; |
my $outcome; |
eval { |
eval { |
local($SIG{__DIE__})='DEFAULT'; |
local($SIG{__DIE__})='DEFAULT'; |
$outcome = &localenroll::validate_crsreq($dom,$owner,$crstype, |
$outcome = &localenroll::validate_crsreq($dom,$owner,$crstype, |
$inststatuslist,$instcode, |
$inststatuslist,$instcode, |
$instseclist); |
$instseclist,$custominfo); |
}; |
}; |
if (!$@) { |
if (!$@) { |
&Reply($client, \$outcome, $userinput); |
&Reply($client, \$outcome, $userinput); |
Line 5316 sub validate_crsreq_handler {
|
Line 5317 sub validate_crsreq_handler {
|
sub crsreq_update_handler { |
sub crsreq_update_handler { |
my ($cmd, $tail, $client) = @_; |
my ($cmd, $tail, $client) = @_; |
my $userinput = "$cmd:$tail"; |
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); |
split(/:/, $tail); |
$crstype = &unescape($crstype); |
$crstype = &unescape($crstype); |
$action = &unescape($action); |
$action = &unescape($action); |
Line 5325 sub crsreq_update_handler {
|
Line 5327 sub crsreq_update_handler {
|
$fullname = &unescape($fullname); |
$fullname = &unescape($fullname); |
$title = &unescape($title); |
$title = &unescape($title); |
$code = &unescape($code); |
$code = &unescape($code); |
|
$accessstart = &unescape($accessstart); |
|
$accessend = &unescape($accessend); |
my $incoming = &Apache::lonnet::thaw_unescape($infohashref); |
my $incoming = &Apache::lonnet::thaw_unescape($infohashref); |
my ($result,$outcome); |
my ($result,$outcome); |
eval { |
eval { |
Line 5332 sub crsreq_update_handler {
|
Line 5336 sub crsreq_update_handler {
|
my %rtnhash; |
my %rtnhash; |
$outcome = &localenroll::crsreq_updates($cdom,$cnum,$crstype,$action, |
$outcome = &localenroll::crsreq_updates($cdom,$cnum,$crstype,$action, |
$ownername,$ownerdomain,$fullname, |
$ownername,$ownerdomain,$fullname, |
$title,$code,$incoming,\%rtnhash); |
$title,$code,$accessstart,$accessend, |
|
$incoming,\%rtnhash); |
if ($outcome eq 'ok') { |
if ($outcome eq 'ok') { |
my @posskeys = qw(createdweb createdmsg queuedweb queuedmsg formitems reviewweb); |
my @posskeys = qw(createdweb createdmsg queuedweb queuedmsg formitems reviewweb); |
foreach my $key (keys(%rtnhash)) { |
foreach my $key (keys(%rtnhash)) { |