version 1.74, 2013/02/11 02:39:11
|
version 1.82, 2014/12/12 14:30:47
|
Line 254 sub print_navmenu {
|
Line 254 sub print_navmenu {
|
<tr class="LC_pick_box_row"> |
<tr class="LC_pick_box_row"> |
<td valign="top" class="LC_pick_box_title"> |
<td valign="top" class="LC_pick_box_title"> |
'); |
'); |
print STDERR "action is ||$action|| and state is ||$state||\n"; |
|
foreach my $task (@{$tasksref}) { |
foreach my $task (@{$tasksref}) { |
if (($task eq $action) && ($state eq 'choose')) { |
if (($task eq $action) && ($state eq 'choose')) { |
$r->print(' |
$r->print(' |
Line 291 sub print_main_frame {
|
Line 290 sub print_main_frame {
|
# Get course settings |
# Get course settings |
my %enrollvar; |
my %enrollvar; |
my %settings = &Apache::lonnet::dump('environment',$dom,$crs); |
my %settings = &Apache::lonnet::dump('environment',$dom,$crs); |
foreach my $item (keys %settings) { |
foreach my $item (keys(%settings)) { |
if ($item =~ m/^internal\.(.+)$/) { |
if ($item =~ m/^internal\.(.+)$/) { |
$enrollvar{$1} = $settings{$item}; |
$enrollvar{$1} = $settings{$item}; |
} elsif ($item =~ /^default_enrollment_(start|end)_date$/) { |
} elsif ($item =~ /^default_enrollment_(start|end)_date$/) { |
Line 750 sub print_main_frame {
|
Line 749 sub print_main_frame {
|
$r->print( |
$r->print( |
&mt('Currently, this LON-CAPA course is crosslisted with [quant,_1,course section,course sections].',$cross_str).' '. |
&mt('Currently, this LON-CAPA course is crosslisted with [quant,_1,course section,course sections].',$cross_str).' '. |
&mt('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.').' '. |
&mt('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.').' '. |
&mt('For each crosslisting, leave the checkbox checked if you want registered students in that course to be included in the student roster for LON-CAPA course: [_1; otherwise uncheck it.',"<b>$realm ($enrollvar{coursecode})</b>").' '. |
&mt('For each crosslisting, leave the checkbox checked if you want registered students in that course to be included in the student roster for LON-CAPA course: [_1]; otherwise uncheck it.',"<b>$realm ($enrollvar{coursecode})</b>").' '. |
&mt('If you wish to change the section ID assigned in your LON-CAPA course for a crosslisted course, enter the new section ID in the appropriate textbox.').' '. |
&mt('If you wish to change the section ID assigned in your LON-CAPA course for a crosslisted course, enter the new section ID in the appropriate textbox.').' '. |
&mt('The LON-CAPA section ID can be left (or set to) empty, if you do not wish to tie a section ID to this crosslisting.').' '. |
&mt('The LON-CAPA section ID can be left (or set to) empty, if you do not wish to tie a section ID to this crosslisting.').' '. |
&mt('If you wish to add new crosslisted courses, enter the number of new courses to add in the textbox at the bottom of the page.').' '. |
&mt('If you wish to add new crosslisted courses, enter the number of new courses to add in the textbox at the bottom of the page.').' '. |
Line 1357 sub print_accessdate_table {
|
Line 1356 sub print_accessdate_table {
|
'fnew' => 'for new students added when you update the class roster', |
'fnew' => 'for new students added when you update the class roster', |
'ifad' => 'If automated adds are enabled, then when students are added their student roles will become active on the date set here for first access, and their roles will become inactive on the date set here for last access. These default access dates will be overridden for specific students if the institutional classlist data supplied to the automatic enrollment process includes entries for the startdate and enddate fields for those students.', |
'ifad' => 'If automated adds are enabled, then when students are added their student roles will become active on the date set here for first access, and their roles will become inactive on the date set here for last access. These default access dates will be overridden for specific students if the institutional classlist data supplied to the automatic enrollment process includes entries for the startdate and enddate fields for those students.', |
); |
); |
$lt{'ncds'} = &mt('changing default start and end access dates will affect [_1]future enrollments[_2] and also [_1]currently inactive[_2] students (i.e., those for whom access will begin in the future).','<b>','</b>'); |
$lt{'ncds'} = &mt('Changing default start and end access dates will affect [_1]future enrollments[_2] and also [_1]currently inactive[_2] students (i.e., those for whom access will begin in the future).','<b>','</b>'); |
$lt{'tcha'} = &mt('To change access dates for [_1]currently active[_2] students, use User Management -> "Manage Course Users" to display currently active students, then use the dropdown menu for "Action to take for selected users:" to choose "Change starting/ending dates", select the students to change, and click "Proceed".','<b>','</b>'); |
$lt{'tcha'} = &mt('To change access dates for [_1]currently active[_2] students, use User Management -> "Manage Course Users" to display currently active students, then use the dropdown menu for "Action to take for selected users:" to choose "Change starting/ending dates", select the students to change, and click "Proceed".','<b>','</b>'); |
my $dateshow; |
my $dateshow; |
if ( ($oldendshow eq '') && ($oldstartshow eq '') ) { |
if ( ($oldendshow eq '') && ($oldstartshow eq '') ) { |
Line 1707 sub print_setaccess_response {
|
Line 1706 sub print_setaccess_response {
|
'<br />'. |
'<br />'. |
&mt('Any change in access dates will only apply to students who are not currently active, i.e., those who currently have access start dates in the future, and to those added by future automated enrollment.'). |
&mt('Any change in access dates will only apply to students who are not currently active, i.e., those who currently have access start dates in the future, and to those added by future automated enrollment.'). |
'<br /><br />'. |
'<br /><br />'. |
&mt('To change access dates for any currently active students, use User Management -> "Manage Users" to display currently active students, then use the dropdown menu for "Action to take for selected users:" to choose "Change starting/ending dates", select the students to change, and click "Proceed".'). |
&mt('To change access dates for [_1]currently active[_2] students, use User Management -> "Manage course users" to display currently active students, then use the dropdown menu for "Action to take for selected users:" to choose "Change starting/ending dates", select the students to change, and click "Proceed".','<b>','</b>'). |
'<br />'; |
'<br />'; |
|
|
# Generate message in case where old first access date was later than today, but new first access date is now today or earlier. |
# Generate message in case where old first access date was later than today, but new first access date is now today or earlier. |
Line 1921 sub print_crosslistings_menu {
|
Line 1920 sub print_crosslistings_menu {
|
if ($numcross) { |
if ($numcross) { |
$response .= |
$response .= |
&mt('You indicated that you wish to add an additional [quant,_1,crosslisting].',$numcross).' '. |
&mt('You indicated that you wish to add an additional [quant,_1,crosslisting].',$numcross).' '. |
&mt('For each new crosslisting enter the insititutional course section code (e.g., fs03zol101001, for section 001 of zol101 for fs03 semester), and the LON-CAPA section ID you wish to assign to students who will be enrolled in your LON-CAPA class as a result of their registration in the crosslisted course section.').' '. |
&mt('For each new crosslisting enter the institutional course section code (e.g., fs03zol101001, for section 001 of zol101 for fs03 semester), and the LON-CAPA section ID you wish to assign to students who will be enrolled in your LON-CAPA class as a result of their registration in the crosslisted course section.').' '. |
&mt('The LON-CAPA section ID can be left blank, if you do not wish to tie a section ID to this crosslisting.').' '. |
&mt('The LON-CAPA section ID can be left blank, if you do not wish to tie a section ID to this crosslisting.').' '. |
&mt("The institutional course section code should only contain letters and/or numbers, and must be consistent with the scheme adopted by your Domain Coordinator to map course codes (and section numbers) to your institution's student information system."). |
&mt("The institutional course section code should only contain letters and/or numbers, and must be consistent with the scheme adopted by your Domain Coordinator to map course codes (and section numbers) to your institution's student information system."). |
'<br /><br /> |
'<br /><br /> |
Line 2251 sub print_sections_menu {
|
Line 2250 sub print_sections_menu {
|
if ($numsec > 0) { |
if ($numsec > 0) { |
$response .= |
$response .= |
&mt('You indicated that you wish to incorporate student enrollment in your LON-CAPA course from an additional [quant,_1,section].',$numsec).' '. |
&mt('You indicated that you wish to incorporate student enrollment in your LON-CAPA course from an additional [quant,_1,section].',$numsec).' '. |
&mt('For each new section enter the insititutional section code (e.g., 004), and the LON-CAPA section ID you wish to assign to students who will be enrolled in your LON-CAPA class as a result of their registration in this particular section.').' '. |
&mt('For each new section enter the institutional section code (e.g., 004), and the LON-CAPA section ID you wish to assign to students who will be enrolled in your LON-CAPA class as a result of their registration in this particular section.').' '. |
&mt('The LON-CAPA section ID can be left blank, if you do not wish to designate a section ID for this course section.').' '. |
&mt('The LON-CAPA section ID can be left blank, if you do not wish to designate a section ID for this course section.').' '. |
&mt("The institutional section code should only contain letters and/or numbers, and must be consistent with the scheme adopted by your Domain Coordinator to map course section numbers to your institution's student information system.").' |
&mt("The institutional section code should only contain letters and/or numbers, and must be consistent with the scheme adopted by your Domain Coordinator to map course section numbers to your institution's student information system.").' |
<br /><br /> |
<br /><br /> |
Line 2357 sub print_sections_response {
|
Line 2356 sub print_sections_response {
|
} |
} |
} |
} |
|
|
if ($putreply ne 'ok') { |
if ($putreply eq 'ok') { |
$response = &mt('Students enrolling in the sections listed below will be automatically added to the class roster for LON-CAPA course [_1], if you have chosen to enable a nightly automated enrollment update.', |
$response = &mt('Students enrolling in the sections listed below will be automatically added to the class roster for LON-CAPA course [_1], if you have chosen to enable a nightly automated enrollment update.', |
"$realm ($coursecode)").'<br /><ul>'."\n"; |
"$realm ($coursecode)").'<br /><ul>'."\n"; |
foreach my $section (@allsections) { |
foreach my $section (@allsections) { |
Line 2727 sub print_update_result {
|
Line 2726 sub print_update_result {
|
my %settings = |
my %settings = |
&Apache::lonnet::get('environment', |
&Apache::lonnet::get('environment', |
['internal.coursecode','internal.sectionnums','internal.crosslistings', |
['internal.coursecode','internal.sectionnums','internal.crosslistings', |
'internal.authtype','internal.autharg','internal.showphoto'], |
'internal.authtype','internal.autharg','internal.showphoto','internal.defaultcredits', |
|
'internal.textbook'], |
$dom,$crs); |
$dom,$crs); |
my $coursecode = $settings{'internal.coursecode'}; |
my $coursecode = $settings{'internal.coursecode'}; |
my $authtype = $settings{'internal.authtype'}; |
my $authtype = $settings{'internal.authtype'}; |
my $autharg = $settings{'internal.autharg'}; |
my $autharg = $settings{'internal.autharg'}; |
my $showphotos = $settings{'internal.showphoto'}; |
my $showphotos = $settings{'internal.showphoto'}; |
|
my $textbook = $settings{'internal.textbook'}; |
|
my ($showcredits,$defaultcredits); |
|
my %domdefaults = &Apache::lonnet::get_domain_defaults($dom); |
|
if ($domdefaults{'officialcredits'} || $domdefaults{'unofficialcredits'} || $domdefaults{'textbookcredits'}) { |
|
$showcredits = 1; |
|
$defaultcredits = $settings{'internal.defaultcredits'}; |
|
if ($defaultcredits eq '') { |
|
if ($coursecode ne '') { |
|
$defaultcredits = $domdefaults{'officialcredits'}; |
|
} elsif ($textbook ne '') { |
|
$defaultcredits = $domdefaults{'textbookcredits'}; |
|
} else { |
|
$defaultcredits = $domdefaults{'unofficialcredits'}; |
|
} |
|
} |
|
} |
my ($startaccess,$endaccess) = &get_dates_from_form(); |
my ($startaccess,$endaccess) = &get_dates_from_form(); |
if ( exists($env{'form.updateadds'}) ) { |
if ( exists($env{'form.updateadds'}) ) { |
$updateadds = $env{'form.updateadds'}; |
$updateadds = $env{'form.updateadds'}; |
Line 2767 sub print_update_result {
|
Line 2783 sub print_update_result {
|
": ".$outcome); |
": ".$outcome); |
} |
} |
if ($reply{$crs} > 0) { |
if ($reply{$crs} > 0) { |
($changecount,$response) = &LONCAPA::Enrollment::update_LC($dom,$crs,$updateadds,$updatedrops,$startaccess,$endaccess,$authtype,$autharg,\@allcourses,\%LC_code,\$logmsg,\$newusermsg,"updatenow",\%phototypes); |
($changecount,$response) = &LONCAPA::Enrollment::update_LC($dom,$crs,$updateadds,$updatedrops,$startaccess,$endaccess,$authtype,$autharg,$showcredits,$defaultcredits,\@allcourses,\%LC_code,\$logmsg,\$newusermsg,"updatenow",\%phototypes); |
} else { |
} else { |
$response = &mt('There was a problem retrieving institutional class list data for the course sections and crosslisted courses which contribute enrollment to this course.').' '. |
$response = &mt('There was a problem retrieving institutional class list data for the course sections and crosslisted courses which contribute enrollment to this course.').' '. |
&mt('No updates have been carried out, and the roster remains unchanged.'); |
&mt('No updates have been carried out, and the roster remains unchanged.'); |
Line 2812 sub print_viewclass_response {
|
Line 2828 sub print_viewclass_response {
|
my $secidx=&Apache::loncoursedata::CL_SECTION; |
my $secidx=&Apache::loncoursedata::CL_SECTION; |
my $typeidx=&Apache::loncoursedata::CL_TYPE; |
my $typeidx=&Apache::loncoursedata::CL_TYPE; |
my $lockedidx=&Apache::loncoursedata::CL_LOCKEDTYPE; |
my $lockedidx=&Apache::loncoursedata::CL_LOCKEDTYPE; |
|
my $creditsidx=&Apache::loncoursedata::CL_CREDITS; |
&Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'}, |
&Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'}, |
['chgauto','chgmanual','lockchg','unlockchg']); |
['chgauto','chgmanual','lockchg','unlockchg']); |
my @typechglist = (&Apache::loncommon::get_env_multiple('form.chgauto'), |
my @typechglist = (&Apache::loncommon::get_env_multiple('form.chgauto'), |
Line 2819 sub print_viewclass_response {
|
Line 2836 sub print_viewclass_response {
|
my @lockchglist = (&Apache::loncommon::get_env_multiple('form.lockchg'), |
my @lockchglist = (&Apache::loncommon::get_env_multiple('form.lockchg'), |
&Apache::loncommon::get_env_multiple('form.unlockchg')); |
&Apache::loncommon::get_env_multiple('form.unlockchg')); |
|
|
foreach my $student (sort @typechglist) { |
foreach my $student (sort(@typechglist)) { |
my ($uname,$udom) = split(/:/,$student); |
my ($uname,$udom) = split(/:/,$student); |
my $sdata = $classlist->{$student}; |
my $sdata = $classlist->{$student}; |
my $section = $sdata->[$secidx]; |
my $section = $sdata->[$secidx]; |
Line 2828 sub print_viewclass_response {
|
Line 2845 sub print_viewclass_response {
|
my $end = $sdata->[$endidx]; |
my $end = $sdata->[$endidx]; |
my $type = $sdata->[$typeidx]; |
my $type = $sdata->[$typeidx]; |
my $lock = $sdata->[$lockedidx]; |
my $lock = $sdata->[$lockedidx]; |
|
my $credits = $sdata->[$creditsidx]; |
my $newlock = $lock; |
my $newlock = $lock; |
$chgtotal ++; |
$chgtotal ++; |
my $newtype = 'auto'; |
my $newtype = 'auto'; |
Line 2844 sub print_viewclass_response {
|
Line 2862 sub print_viewclass_response {
|
} elsif ($newtype eq '') { |
} elsif ($newtype eq '') { |
$newlock = '1'; |
$newlock = '1'; |
} |
} |
my $modreply = &Apache::lonnet::modify_student_enrollment($udom,$uname,$uid,'','','','',$section,$end,$start,$newtype,$newlock,$cid,'','chgtype'); |
my $modreply = |
|
&Apache::lonnet::modify_student_enrollment($udom,$uname,$uid,'', |
|
'','','',$section,$end, |
|
$start,$newtype, |
|
$newlock,$cid,'', |
|
'chgtype',$credits); |
if ($modreply eq 'ok') { |
if ($modreply eq 'ok') { |
$chgok ++; |
$chgok ++; |
$chg{$student} = &mt("Changed to $change"); |
$chg{$student} = &mt("Changed to $change"); |
Line 2866 sub print_viewclass_response {
|
Line 2889 sub print_viewclass_response {
|
my $end = $sdata->[$endidx]; |
my $end = $sdata->[$endidx]; |
my $type = $sdata->[$typeidx]; |
my $type = $sdata->[$typeidx]; |
my $lock = $sdata->[$lockedidx]; |
my $lock = $sdata->[$lockedidx]; |
|
my $credits = $sdata->[$creditsidx]; |
my $newlock = 1; |
my $newlock = 1; |
my $oldlockname = &mt('unlocked'); |
my $oldlockname = &mt('unlocked'); |
my $newlockname = &mt('locked'); |
my $newlockname = &mt('locked'); |
Line 2876 sub print_viewclass_response {
|
Line 2900 sub print_viewclass_response {
|
$newlockname = &mt('unlocked'); |
$newlockname = &mt('unlocked'); |
$oldlockname = &mt('locked'); |
$oldlockname = &mt('locked'); |
} |
} |
my $lockreply = &Apache::lonnet::modify_student_enrollment($udom,$uname,$uid,'','','','',$section,$end,$start,$type,$newlock,$cid,'','chgtype'); |
my $lockreply = &Apache::lonnet::modify_student_enrollment($udom,$uname,$uid,'','','','',$section,$end,$start,$type,$newlock,$cid,'','chgtype',$credits); |
if ($lockreply eq 'ok') { |
if ($lockreply eq 'ok') { |
$lockok ++; |
$lockok ++; |
$lockchg{$student} = &mt('Changed to [_1]',$newlockname); |
$lockchg{$student} = &mt('Changed to [_1]',$newlockname); |
Line 3014 sub warning_message {
|
Line 3038 sub warning_message {
|
unless ( $caller eq 'chgsettings') { |
unless ( $caller eq 'chgsettings') { |
if ( (!$curradds) && (!$currdrops) ) { |
if ( (!$curradds) && (!$currdrops) ) { |
$warning .= '<li>'. |
$warning .= '<li>'. |
&mt('You [_1]must[_2] now use [_3]Automated adds/drops[_4] to enable automated adds and/or drops if you want automatic enrollment updates to occur in this course.','<b>','</b>','<a href="/adm/populate?action=chgsettings">').'</li>'; |
&mt('You [_1]must[_2] now use [_3]Automated adds/drops[_4] to enable automated adds and/or drops if you want automatic enrollment updates to occur in this course.','<b>','</b>','<a href="/adm/populate?action=chgsettings">','</a>').'</li>'; |
} |
} |
} |
} |
if ($warning) { |
if ($warning) { |