version 1.502, 2013/08/10 01:27:31
|
version 1.509, 2014/04/30 17:17:14
|
Line 1685 sub read_lonnet_global {
|
Line 1685 sub read_lonnet_global {
|
sub server_devalidatecache_handler { |
sub server_devalidatecache_handler { |
my ($cmd,$tail,$client) = @_; |
my ($cmd,$tail,$client) = @_; |
my $userinput = "$cmd:$tail"; |
my $userinput = "$cmd:$tail"; |
my ($name,$id) = map { &unescape($_); } split(/:/,$tail); |
my $items = &unescape($tail); |
&Apache::lonnet::devalidate_cache_new($name,$id); |
my @cached = split(/\&/,$items); |
|
foreach my $key (@cached) { |
|
if ($key =~ /:/) { |
|
my ($name,$id) = map { &unescape($_); } split(/:/,$key); |
|
&Apache::lonnet::devalidate_cache_new($name,$id); |
|
} |
|
} |
my $result = 'ok'; |
my $result = 'ok'; |
&Reply($client,\$result,$userinput); |
&Reply($client,\$result,$userinput); |
return 1; |
return 1; |
Line 3831 sub put_course_id_hash_handler {
|
Line 3837 sub put_course_id_hash_handler {
|
# creationcontext - include courses created in specified context |
# creationcontext - include courses created in specified context |
# |
# |
# domcloner - flag to indicate if user can create CCs in course's domain. |
# domcloner - flag to indicate if user can create CCs in course's domain. |
# If so, ability to clone course is automatic. |
# If so, ability to clone course is automatic. |
|
# hasuniquecode - filter by courses for which a six character unique code has |
|
# been set. |
# |
# |
# $client - The socket open on the client. |
# $client - The socket open on the client. |
# Returns: |
# Returns: |
Line 3856 sub dump_course_id_handler {
|
Line 3864 sub dump_course_id_handler {
|
my ($udom,$since,$description,$instcodefilter,$ownerfilter,$coursefilter, |
my ($udom,$since,$description,$instcodefilter,$ownerfilter,$coursefilter, |
$typefilter,$regexp_ok,$rtn_as_hash,$selfenrollonly,$catfilter,$showhidden, |
$typefilter,$regexp_ok,$rtn_as_hash,$selfenrollonly,$catfilter,$showhidden, |
$caller,$cloner,$cc_clone_list,$cloneonly,$createdbefore,$createdafter, |
$caller,$cloner,$cc_clone_list,$cloneonly,$createdbefore,$createdafter, |
$creationcontext,$domcloner) =split(/:/,$tail); |
$creationcontext,$domcloner,$hasuniquecode) =split(/:/,$tail); |
my $now = time; |
my $now = time; |
my ($cloneruname,$clonerudom,%cc_clone); |
my ($cloneruname,$clonerudom,%cc_clone); |
if (defined($description)) { |
if (defined($description)) { |
Line 3929 sub dump_course_id_handler {
|
Line 3937 sub dump_course_id_handler {
|
} else { |
} else { |
$creationcontext = '.'; |
$creationcontext = '.'; |
} |
} |
|
unless ($hasuniquecode) { |
|
$hasuniquecode = '.'; |
|
} |
my $unpack = 1; |
my $unpack = 1; |
if ($description eq '.' && $instcodefilter eq '.' && $ownerfilter eq '.' && |
if ($description eq '.' && $instcodefilter eq '.' && $ownerfilter eq '.' && |
$typefilter eq '.') { |
$typefilter eq '.') { |
Line 4017 sub dump_course_id_handler {
|
Line 4028 sub dump_course_id_handler {
|
$selfenroll_end = $items->{'selfenroll_end_date'}; |
$selfenroll_end = $items->{'selfenroll_end_date'}; |
$created = $items->{'created'}; |
$created = $items->{'created'}; |
$context = $items->{'context'}; |
$context = $items->{'context'}; |
|
if ($hasuniquecode ne '.') { |
|
next unless ($items->{'uniquecode'}); |
|
} |
if ($selfenrollonly) { |
if ($selfenrollonly) { |
next if (!$selfenroll_types); |
next if (!$selfenroll_types); |
if (($selfenroll_end > 0) && ($selfenroll_end <= $now)) { |
if (($selfenroll_end > 0) && ($selfenroll_end <= $now)) { |
Line 5249 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 5276 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 5299 sub validate_crsreq_handler {
|
Line 5314 sub validate_crsreq_handler {
|
} |
} |
®ister_handler("autocrsreqvalidation", \&validate_crsreq_handler, 0, 1, 0); |
®ister_handler("autocrsreqvalidation", \&validate_crsreq_handler, 0, 1, 0); |
|
|
|
sub crsreq_update_handler { |
|
my ($cmd, $tail, $client) = @_; |
|
my $userinput = "$cmd:$tail"; |
|
my ($cdom,$cnum,$crstype,$action,$ownername,$ownerdomain,$fullname,$title,$code, |
|
$accessstart,$accessend,$infohashref) = |
|
split(/:/, $tail); |
|
$crstype = &unescape($crstype); |
|
$action = &unescape($action); |
|
$ownername = &unescape($ownername); |
|
$ownerdomain = &unescape($ownerdomain); |
|
$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 { |
|
local($SIG{__DIE__})='DEFAULT'; |
|
my %rtnhash; |
|
$outcome = &localenroll::crsreq_updates($cdom,$cnum,$crstype,$action, |
|
$ownername,$ownerdomain,$fullname, |
|
$title,$code,$accessstart,$accessend, |
|
$incoming,\%rtnhash); |
|
if ($outcome eq 'ok') { |
|
my @posskeys = qw(createdweb createdmsg queuedweb queuedmsg formitems reviewweb); |
|
foreach my $key (keys(%rtnhash)) { |
|
if (grep(/^\Q$key\E/,@posskeys)) { |
|
$result .= &escape($key).'='.&Apache::lonnet::freeze_escape($rtnhash{$key}).'&'; |
|
} |
|
} |
|
$result =~ s/\&$//; |
|
} |
|
}; |
|
if (!$@) { |
|
if ($outcome eq 'ok') { |
|
&Reply($client, \$result, $userinput); |
|
} else { |
|
&Reply($client, "format_error\n", $userinput); |
|
} |
|
} else { |
|
&Failure($client,"unknown_cmd\n",$userinput); |
|
} |
|
return 1; |
|
} |
|
®ister_handler("autocrsrequpdate", \&crsreq_update_handler, 0, 1, 0); |
|
|
# |
# |
# Read and retrieve institutional code format (for support form). |
# Read and retrieve institutional code format (for support form). |
# Formal Parameters: |
# Formal Parameters: |
Line 6496 sub make_new_child {
|
Line 6558 sub make_new_child {
|
&Authen::Krb5::init_context(); |
&Authen::Krb5::init_context(); |
unless (($dist eq 'fedora5') || ($dist eq 'fedora4') || |
unless (($dist eq 'fedora5') || ($dist eq 'fedora4') || |
($dist eq 'fedora6') || ($dist eq 'suse9.3') || |
($dist eq 'fedora6') || ($dist eq 'suse9.3') || |
($dist eq 'suse12.2') || ($dist eq 'suse12.3')) { |
($dist eq 'suse12.2') || ($dist eq 'suse12.3') || |
|
($dist eq 'suse13.1')) { |
&Authen::Krb5::init_ets(); |
&Authen::Krb5::init_ets(); |
} |
} |
|
|