Use "Section settings" to make changes to the choice of sections included for enrollment in your LON-CAPA course.
-
Use "Student photos" to enable or disable automatic upload of student photos to your course.
+
Use "Student photo settings" to enable or disable automatic import of photos for registered students in your course.
@@ -320,6 +337,10 @@ sub print_main_frame {
+
Use "Update student photos" to import your institution's most current digital photos for registered students in your course.
+
+
+
Use "View students and change type" to display the current course roster, and (optionally) change enrollment type for selected students from 'auto' to 'manual' and vice versa.
-Note: Any students added manually by course coordinators using the Enrollment Manager will be unaffected by the nightly removal process if you choose to enable it.
+Note: Any students added manually by course coordinators using the User Manager will be unaffected by the nightly removal process if you choose to enable it.
-
+
-
-
+
+
");
} elsif ($action eq "setdates") {
@@ -462,12 +483,12 @@ Note: Any students added manually by cou
-
-
+
+
ENDTWO
} elsif ($action eq "notify") {
+ my $notifycount = 0;
my @notified = split(/,/,$enrollvar{notifylist});
- foreach (@notified) {
- unless ($_ eq '') { $notifycount ++; }
+ my @domcoord;
+ my @showdom;
+ for (my $i=0; $i<@notified; $i++) {
+ if ($notified[$i] !~ /:/) {
+ $notified[$i] =~ s/\@/:/;
+ }
+ unless ($notified[$i] eq '') { $notifycount ++; }
}
my $noteset = '';
if ($notifycount) {
@@ -495,7 +522,15 @@ ENDTWO
} else {
$noteset = "OFF";
}
-
+ my %dompersonnel = &Apache::lonnet::get_domain_roles($dom,['dc']);
+ foreach my $server (keys(%dompersonnel)) {
+ foreach my $user (sort(keys(%{$dompersonnel{$server}}))) {
+ my ($trole,$uname,$udom,$runame,$rudom,$rsec) = split(/:/,$user);
+ if (!grep(/^$uname:$udom$/,@domcoord)) {
+ push(@domcoord,$uname.':'.$udom);
+ }
+ }
+ }
$r->print("
+
+
+
+
+
");
} elsif ($action eq "crosslist") {
my @xlists;
if ($enrollvar{crosslistings} ne '') {
@xlists = split(/,/,$enrollvar{crosslistings});
}
- my $cross_str = join(' ',@xlists);
+ my $cross_str = @xlists;
$r->print("
");
} elsif ($action eq "sections") {
@@ -725,7 +785,7 @@ ENDTWO
}
}
if (@sections > 0) {
- my $secshow = join(' ',@sections);
+ my $secshow = @sections;
$r->print("
");
} else {
@@ -791,38 +854,33 @@ your changes.
$$tasktitleref{$action}
");
if (@currsections) {
- my $secshow = join(' ',@currsections);
+ my $secshow = @currsections;
$r->print("
- Currently, this LON-CAPA course 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, this LON-CAPA course 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 ID designation used for this section in LON-CAPA, delete the current value in the LON-CAPA section ID 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 save your changes.
- ");
+ $r->print(&Apache::loncommon::end_data_table());
} else {
$r->print("
Currently no sections of $realm ($enrollvar{coursecode}) are contributing enrollment to the LON-CAPA class roster.
@@ -845,12 +903,12 @@ your changes.
@@ -871,40 +929,105 @@ your changes.
Automatic import of student photos from institutional data repository:
");
- if ($enrollvar{showphotos}) {
+ if ($enrollvar{showphoto}) {
$r->print("
- Yes
- No
+
+
");
} else {
$r->print("
- Yes
- No
+
+
");
}
- $r->print("
+ $r->print('
+
+
+ ');
+ my ($result,$perm_reqd)=&Apache::lonnet::auto_photo_permission($crs,$dom);
+ my $can_enable = 1;
+ my $institution = &Apache::lonnet::domain($dom,'description');
+ if ($result eq 'ok') {
+ if ($perm_reqd eq 'yes') {
+ if (!($enrollvar{'photopermission'} eq 'yes')) {
+ $can_enable = 0;
+ } else {
+ if (&user_is_courseowner($enrollvar{'courseowner'})) {
+ $r->print('
+
+
'.
+&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')).'
+ ');
+ }
+ }
+ }
+ } else {
+ $r->print('
+
+
'.
+&mt('There was a problem determining whether course owner permission is required in order for a course coordinator to have access to student photos in this domain.').' '.&mt('As a result you will not be able to configure access to student photos at this time').'
-
-Note: if you enable automatic import of student photos, your course will automatically have access to photos stored by your institution for all officially registered students, via a conduit established by your LON-CAPA domain coordinator.
+ '.
+&mt('Note: if you enable automatic import of student photos, your course will automatically have access to photos saved by your institution for officially registered students, via a conduit established by your LON-CAPA domain coordinator.').'
'.
+&mt('[_1] requires a course owner to indicate acceptance of conditions of use of digital student photos before enabling automatic import into a course. If you choose to enable import of photos you will be prompted for your agreement on the next page.',$institution).'
+
+
+ ');
+ } else {
+ my ($ownername,$owneremail) = &get_ownerinfo($dom,
+ $enrollvar{'courseowner'});
+ my $emailstr;
+ if ($owneremail) {
+ $emailstr = "(e-mail: $owneremail)";
+ }
+ $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 Enrollment Manager to indicate acceptance of these conditions of use.',$emailstr)
+ .'
");
+ if ($enrollvar{'showphoto'}) {
+ my ($update,$commentary) = &Apache::lonnet::auto_photochoice($crs,
+ $dom);
+ if ($update) {
+ $r->print(' '.$commentary.'
+');
+ } else {
+ $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'}.'');
+ }
+ $r->print('