'.
-&mt('Previously the owner of this course agreed to the conditions of use of digital student photos required by [_1].', $institution).' '.&mt('As a result [_1]s can choose to automatically import student photos into this course.',&Apache::lonnet::plaintext('cc')).'
+&mt('Previously the owner of this course agreed to the conditions of use of digital student photos required by [_1].', $institution).' '.&mt('As a result [_1]s can choose to automatically import student photos into this course.',&Apache::lonnet::plaintext('cc')).'
');
@@ -1000,8 +1002,11 @@ ENDTWO
}
$r->print('
-
'.
-&mt('The policies of your institution ([_1]) require that the course owner ([_2]) must indicate acceptance of the conditions of use of digital photos of registered students, before they may be made available for use in a course.',$institution,$ownername).'
'.&mt('Please direct the course owner [_1] to visit the "Student photos" page in the Automated Student Enrollment Manager to indicate acceptance of these conditions of use.',$emailstr).'
+
'
+ .&mt('The policies of your institution ([_1]) require that the course owner ([_2]) must indicate acceptance of the conditions of use of digital photos of registered students, before they may be made available for use in a course.',$institution,$ownername)
+ .'
'
+ .&mt('Please direct the course owner [_1] to visit the "Student photos" page in the Automated Enrollment Manager to indicate acceptance of these conditions of use.',$emailstr)
+ .'
@@ -1089,7 +1094,8 @@ onclick="javascript:document.photoupdate
');
} else {
- $r->print(&mt('Update of photos via the Automated Student Enrollment Manager is unavailable in this domain.').'
');
+ $r->print(&mt('Update of photos via the Automated Enrollment Manager is unavailable in this domain.')
+ .'
');
}
} else {
$r->print('Update of photos is unavailable, as import of student photos is currently disabled. Enable this first via: '.$$tasktitleref{'photos'}.'');
@@ -2419,7 +2425,9 @@ function agreement_result(caller) {
if ($owneremail) {
$emailstr = "(e-mail: $owneremail)";
}
- $response = &mt('The policies of your institution [_1] require that the course owner [_2] must indicate acceptance of the conditions of use of digital photos of registered students, before they may be made available for use in a course.',$institution,$ownername).'
'.&mt('Please direct the course owner [_1] to visit the "Student photos" page in the Automated Student Enrollment Manager to indicate acceptance of these conditions of use',$emailstr);
+ $response = &mt('The policies of your institution [_1] require that the course owner [_2] must indicate acceptance of the conditions of use of digital photos of registered students, before they may be made available for use in a course.',$institution,$ownername)
+ .'
'
+ .&mt('Please direct the course owner [_1] to visit the "Student photos" page in the Automated Enrollment Manager to indicate acceptance of these conditions of use.',$emailstr);
}
&print_reply($r,$response,$$tasktitleref{$action});
}
@@ -2485,7 +2493,7 @@ onclick="javascript:document.photoupdate
}
}
if (keys(%newenv) > 0) {
- &Apache::lonnet::appenv(%newenv);
+ &Apache::lonnet::appenv(\%newenv);
}
&print_reply($r,$response,$$tasktitleref{$action});
return;
@@ -2505,7 +2513,7 @@ sub print_photoupdate_response {
my %LC_code;
my %affiliates;
my $outcome;
- &get_institutional_codes(\%settings,,\@allcourses,\%LC_code);
+ &Apache::loncommon::get_institutional_codes(\%settings,\@allcourses,\%LC_code);
if (@allcourses > 0) {
@{$affiliates{$crs}} = @allcourses;
$outcome = &Apache::lonnet::auto_photoupdate(\%affiliates,$dom,$crs,\%changes);
@@ -2609,7 +2617,7 @@ sub print_update_result () {
} elsif ($coursecode eq '') {
$response = "There was a problem retrieving the course code for this LON-CAPA course. An update of the class roster has not been carried out, and enrollment remains unchanged";
} else {
- &get_institutional_codes(\%settings,\@allcourses,\%LC_code);
+ &Apache::loncommon::get_institutional_codes(\%settings,\@allcourses,\%LC_code);
if (@allcourses > 0) {
@{$affiliates{$crs}} = @allcourses;
my $outcome = &Apache::lonnet::fetch_enrollment_query('updatenow',\%affiliates,\%reply,$dom,$crs);
@@ -2643,48 +2651,6 @@ sub print_update_result () {
return;
}
-sub get_institutional_codes {
- my ($settings,$allcourses,$LC_code) = @_;
-# Get complete list of course sections to update
- my @currsections = ();
- my @currxlists = ();
- my $coursecode = $$settings{'internal.coursecode'};
-
- if ($$settings{'internal.sectionnums'} ne '') {
- @currsections = split(/,/,$$settings{'internal.sectionnums'});
- }
-
- if ($$settings{'internal.crosslistings'} ne '') {
- @currxlists = split(/,/,$$settings{'internal.crosslistings'});
- }
-
- if (@currxlists > 0) {
- foreach (@currxlists) {
- if (m/^([^:]+):(\w*)$/) {
- unless (grep/^$1$/,@{$allcourses}) {
- push @{$allcourses},$1;
- $$LC_code{$1} = $2;
- }
- }
- }
- }
-
- if (@currsections > 0) {
- foreach (@currsections) {
- if (m/^(\w+):(\w*)$/) {
- my $sec = $coursecode.$1;
- my $lc_sec = $2;
- unless (grep/^$sec$/,@{$allcourses}) {
- push @{$allcourses},$sec;
- $$LC_code{$sec} = $lc_sec;
- }
- }
- }
- }
- return;
-}
-
-
sub print_viewclass_response {
my ($r,$realm,$dom,$crs,$action,$tasktitleref) = @_;
my $response;
@@ -2739,7 +2705,7 @@ sub print_viewclass_response {
} elsif ($newtype eq '') {
$newlock = '1';
}
- my $modreply = &Apache::lonnet::modify_student_enrollment($udom,$uname,$uid,'','','','',$section,$end,$start,$newtype,$newlock,$cid);
+ my $modreply = &Apache::lonnet::modify_student_enrollment($udom,$uname,$uid,'','','','',$section,$end,$start,$newtype,$newlock,$cid,'','chgtype');
if ($modreply eq 'ok') {
$chgok ++;
$chg{$student} = "Changed to $change";
@@ -2771,7 +2737,7 @@ sub print_viewclass_response {
$newlockname = &mt('unlocked');
$oldlockname = &mt('locked');
}
- my $lockreply = &Apache::lonnet::modify_student_enrollment($udom,$uname,$uid,'','','','',$section,$end,$start,$type,$newlock,$cid);
+ my $lockreply = &Apache::lonnet::modify_student_enrollment($udom,$uname,$uid,'','','','',$section,$end,$start,$type,$newlock,$cid,'','chgtype');
if ($lockreply eq 'ok') {
$lockok ++;
$lockchg{$student} = 'Changed to '.$newlockname;
@@ -2969,11 +2935,11 @@ sub get_dates_from_form {
sub date_setting_table {
my ($starttime,$endtime,$action) = @_;
my ($startform,$endform) = &setup_date_selectors($starttime,$endtime,$action);
- my $perpetual = '';
+ $perpetual.= ' />'.' no ending date';
my $start_table = '';
$start_table .= "