--- loncom/interface/loncoursequeueadmin.pm 2009/11/18 19:15:45 1.12 +++ loncom/interface/loncoursequeueadmin.pm 2010/01/15 15:38:10 1.12.2.6 @@ -1,7 +1,7 @@ # The LearningOnline Network # Utilities to administer domain course requests and course self-enroll requests # -# $Id: loncoursequeueadmin.pm,v 1.12 2009/11/18 19:15:45 raeburn Exp $ +# $Id: loncoursequeueadmin.pm,v 1.12.2.6 2010/01/15 15:38:10 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -33,7 +33,9 @@ Apache::loncoursequeueadmin.pm =head1 SYNOPSIS -Adminitsration utilities used by domain coordinators for queued course creation requests, and by course coordinators for queued self-enrollment requests. +Utilities used by domain coordinators to administer queued course creation requests, +and by course coordinators for queued self-enrollment requests, and by general +users to display their queued self-enrollment requests. This is part of the LearningOnline Network with CAPA project described at http://www.lon-capa.org. @@ -50,6 +52,14 @@ described at http://www.lon-capa.org. =item get_student_counts() +=item course_creation() + +=item build_batchcreatehash() + +=item can_clone_course() + +=item queued_selfenrollment() + =back =cut @@ -57,7 +67,6 @@ described at http://www.lon-capa.org. package Apache::loncoursequeueadmin; use strict; -use Apache::Constants qw(:common :http); use Apache::lonnet; use Apache::loncommon; use Apache::lonmsg; @@ -366,7 +375,8 @@ sub update_request_queue { @existing,@missingreq,@invalidusers,@limitexceeded,@completed, @processing_errors,@warn_approves,@warn_rejects,@approvals, @rejections,@rejectionerrors,@nopermissions,%courseroles, - %communityroles,%domdefs,%approvalmsg,%rejectionmsg,$crstype); + %communityroles,%domdefs,%approvalmsg,%rejectionmsg,$crstype, + @warn_coursereqs); @approvals = &Apache::loncommon::get_env_multiple('form.approvereq'); @rejections = &Apache::loncommon::get_env_multiple('form.rejectreq'); $now = time; @@ -455,7 +465,10 @@ sub update_request_queue { my $uhome = &Apache::lonnet::homeserver($uname,$udom); if ($uhome ne 'no_host') { if (exists($requesthash{$uname.':'.$udom})) { - + if ($cdom eq 'gci' && $cnum eq '9615072b469884921gcil1') { + my $enresult = &enable_gci_submission($udom,$uname, + $access_end,$access_start); + } if (exists($classlist->{$uname.':'.$udom})) { if (ref($classlist->{$uname.':'.$udom}) eq 'ARRAY') { if (($classlist->{$uname.':'.$udom}->[$idx->{'status'}] eq 'Active') || @@ -501,6 +514,15 @@ sub update_request_queue { &Apache::lonnet::put($namespace,\%userrequest,$udom,$uname); if ($userresult ne 'ok') { push(@warn_approves,$uname.':'.$udom); + } elsif ($udom eq 'gci') { + my %changehash = ( + 'reqcrsotherdom.unofficial' => 'gcitest:autolimit=', + ); + my $reqresult = &Apache::lonnet::put('environment',\%changehash, + $udom,$uname); + if ($reqresult ne 'ok') { + push(@warn_coursereqs,$uname.':'.$udom); + } } } else { push(@processing_errors,$uname.':'.$udom); @@ -885,9 +907,33 @@ sub update_request_queue { $output .= '
'; } } + if (@warn_coursereqs) { + $output .= ''..&mt("For the following users, an error occurred when setting rights to request creation of Concept Test courses:").'