--- loncom/interface/lonpopulate.pm 2003/12/09 20:06:37 1.4 +++ loncom/interface/lonpopulate.pm 2003/12/11 02:54:51 1.5 @@ -1,5 +1,5 @@ # automated enrollment configuration handler -# $Id: lonpopulate.pm,v 1.4 2003/12/09 20:06:37 albertel Exp $ +# $Id: lonpopulate.pm,v 1.5 2003/12/11 02:54:51 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -622,7 +622,8 @@ As you are the only user with the role o - For each section, check the checkbox if you want registered students in that section to be included in the student roster for LON-CAPA course: $realm ($enrollvar{coursecode}); otherwise uncheck it. If you want to change the section/group designation used for this section in LON-CAPA, delete the currecnt value in the LON-CAPA section/group textbox and enter the new value. The LON-CAPA section/group ID can be left (or set to) empty, if you do not wish to tie a section/group ID to this section. If you wish to add new course section, enter the number of new sections to add in the textbox at the bottom of the page. You will provide information about each of the new sections on a subsequent page. Click 'Go' to store your changes. + For each section, check the checkbox if you want registered students in that section to be included in the student roster for LON-CAPA course: $realm ($enrollvar{coursecode}); otherwise uncheck it. If you want to change the section/group designation used for this section in LON-CAPA, delete the current value in the LON-CAPA section/group textbox and enter the new value. The LON-CAPA section/group ID can be left (or set to) empty, if you do not wish to tie a section/group ID to this section. To add a new section, check the 'Enrollment in this course?' checkbox, and enter the desired LON-CAPA section/groupID in the appropriate textbox. Click 'Go' to store +your changes.
@@ -631,7 +632,7 @@ As you are the only user with the role o - @@ -640,8 +641,8 @@ As you are the only user with the role o for (my $i=0; $i<@sections; $i++) { my $colflag = $i%2; my $shrflag = 0; - $r->print(" - +
Course code/td> + Section Current status LON-CAPA section/group ID Enrollment in this course?
$sections[$i]/td> + $r->print("
$sections[$i] "); if (grep/^$sections[$i]$/,@currsections) { @@ -701,7 +702,7 @@ As you are the only user with the role o if (@currsections) { my $secshow = @currsections; $r->print(" - Currently, LON-CAPA course: $realm ($enrollvar{coursecode}) incorporates enrollment from $secshow sections. Students enrolling in any of these course sections will be automatically added to the class roster for the course, if you have chosen to enable a nightly automated enrollment update. For each section, uncheck the checkbox if you want registered students in that section to cease being included in the student roster for LON-CAPA course: $realm ($enrollvar{coursecode}); otherwise leave it checked. If you want to change the section/group designation used for this section in LON-CAPA, delete the current value in the LON-CAPA section/groupID textbox and enter the new value. If you wish to add new course section, enter the number of new sections to add in the textbox at the bottom of the page. You will provide information about each of the new sections on a subsequent page. Click 'Go' to store your changes. + Currently, LON-CAPA course: $realm ($enrollvar{coursecode}) incorporates enrollment from $secshow sections. Students enrolling in any of these course sections will be automatically added to the class roster for the course, if you have chosen to enable a nightly automated enrollment update. For each section, uncheck the checkbox if you want registered students in that section to cease being included in the student roster for LON-CAPA course: $realm ($enrollvar{coursecode}); otherwise leave it checked. If you want to change the section/group designation used for this section in LON-CAPA, delete the current value in the LON-CAPA section/groupID textbox and enter the new value. If you wish to add new course section, enter the number of new sections to add in the textbox at the bottom of the page. You will provide information about each of the new sections on a subsequent page. Click 'Go' to store your changes.
@@ -1110,7 +1111,7 @@ sub print_crosslistings_menu () { $response = "There was a problem processing your requested changes. The automated enrollment settings for this course have been left unchanged.
"; } else { if ($removecount > 0) { - $response = "A total of $removecount courses are no longer crosslisted with LON-CAPA course: $realm ($coursecode).
/
"; + $response = "A total of $removecount courses are no longer crosslisted with LON-CAPA course: $realm ($coursecode).

"; } if ($crosscount > 0) { $response .= "The $crosscount courses listed below remain crosslisted with this LON-CAPA course, and students enrolling in these course sections will be automatically added to the class roster for the course, if you have chosen to enable a nightly automated enrollment update.

\n"; + $response .= "

\n"; + + if (@badxlists > 0) { + $response .= "The courses listed below could not be included in the crosslistings for this LON-CAPA course, because they are not valid courses according to your institution's official schedule of classes and sections.


\n"; + } + + if (@badowner > 0) { + $response .= "The courses listed below could not be included in the crosslistings for this LON-CAPA course, because the owner of this course - $owner - does not have rights to view enrollment in those classes as determined by your instititution's policies on access to official classlists.


\n"; + } &print_reply($r,$response,$$tasktitleref{$action}); return; @@ -1430,6 +1462,7 @@ sub print_update_result () { my @allcourses = (); my %LC_code = (); my $logmsg = ''; + my $newusermsg = ''; my %settings = &Apache::lonnet::get('environment',['internal.coursecode','internal.sectionnums','internal.crosslistings','internal.authtype','internal.autharg','internal.autostart','internal.autoend'],$dom,$crs); my $coursecode = $settings{'internal.coursecode'}; @@ -1493,11 +1526,7 @@ sub print_update_result () { @{$affiliates{$crs}} = @allcourses; &localenroll::fetch_enrollment($dom,\%affiliates,\%reply); if ($reply{$crs} > 0) { - ($changecount,$response) = &LONCAPA::Enrollment::update_LC($dom,$crs,$updateadds,$updatedrops,$autostart,$autoend,$authtype,$autharg,\@allcourses,\%LC_code,\$logmsg,"updatenow"); - unless ($changecount == 0) { - my $responselength = length($response); - $response = substr($response,0,$responselength-4); - } + ($changecount,$response) = &LONCAPA::Enrollment::update_LC($dom,$crs,$updateadds,$updatedrops,$autostart,$autoend,$authtype,$autharg,\@allcourses,\%LC_code,\$logmsg,\$newusermsg,"updatenow"); } else { $response = "There was a problem retrieving institutional class list data for the course sections and crosslisted courses which contribute enrollment to this course. No updates have been carried out, and the roster remains unchanged."; } @@ -1510,7 +1539,11 @@ sub print_update_result () { $logmsg = substr($logmsg,0,$loglength-4); $logmsg = "

The following messages were generated by the roster update process:

"; } - $response .= $logmsg; + unless ($newusermsg eq '') { + $newusermsg = substr( $newusermsg,0,rindex($newusermsg,'
  • ') ); + $newusermsg = "

    The following new system user(s) who was/were created will be using internal authentication with an initial randomly generated password. A valid e-mail address was not available for this/these user(s) so LON-CAPA account credentials could not be sent via e-mail.

    "; + } + $response .= $logmsg.$newusermsg; &print_reply($r,$response,$$tasktitleref{$action}); return; }