version 1.52, 2008/01/02 07:53:47
|
version 1.56, 2008/06/04 21:33:54
|
Line 208 sub print_mainbox {
|
Line 208 sub print_mainbox {
|
} |
} |
my $page = ''; |
my $page = ''; |
if ($action eq "information") { |
if ($action eq "information") { |
$page = "<b>Automated Student Enrollment</b>"; |
$page = "<b>".&mt("Automated Enrollment")."</b>"; |
} else { |
} else { |
$page = '<a href="/adm/populate">Automated Student Enrollment</a>'; |
$page = '<a href="/adm/populate">'.&mt('Automated Enrollment').'</a>'; |
if ($reply) { |
if ($reply) { |
if ($action eq "newcross") { |
if ($action eq "newcross") { |
$action = "crosslist"; |
$action = "crosslist"; |
Line 222 sub print_mainbox {
|
Line 222 sub print_mainbox {
|
$page .= " -> <b>".$$tasklongref{$action}."</b>"; |
$page .= " -> <b>".$$tasklongref{$action}."</b>"; |
} |
} |
} |
} |
|
my $usrmang = &mt('User Management'); |
|
my $autenrl = &mt('Automated Enrollment Manager'); |
$r->print(<<ENDTHIS); |
$r->print(<<ENDTHIS); |
<table width="100%" border="0" cellpadding="0" cellspacing="0"> |
<table width="100%" border="0" cellpadding="0" cellspacing="0"> |
<tr> |
<tr> |
<td bgcolor="#CCCCFF"> |
<td bgcolor="#CCCCFF"> |
<font size="2"><a href="/adm/menu">$realm</a> -> <a href="/adm/createuser">User Management</a> -> $page</font><br/> |
<font size="2"><a href="/adm/menu">$realm</a> -> <a href="/adm/createuser">$usrmang</a> -> $page</font><br/> |
</td> |
</td> |
<td align="right" bgcolor="#CCCCFF" valign="top"> |
<td align="right" bgcolor="#CCCCFF" valign="top"> |
<font size="+1">Automated Student Enrollment Manager </font> |
<font size="+1">$autenrl </font> |
</td> |
</td> |
</tr> |
</tr> |
</table> |
</table> |
Line 1000 ENDTWO
|
Line 1002 ENDTWO
|
} |
} |
$r->print(' |
$r->print(' |
<tr> |
<tr> |
<td>'. |
<td>' |
&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).'<br /><br />'.&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).'<br /><br /><input type="button" name="mainmenu" value="Go back" onclick="javascript:history.go(-1);" /> |
.&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) |
|
.'<br /><br />' |
|
.&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) |
|
.'<br /><br /><input type="button" name="mainmenu" value="Go back" onclick="javascript:history.go(-1);" /> |
</td> |
</td> |
</tr> |
</tr> |
</form> |
</form> |
Line 1089 onclick="javascript:document.photoupdate
|
Line 1094 onclick="javascript:document.photoupdate
|
<input type ="hidden" name="state" value="process" /> |
<input type ="hidden" name="state" value="process" /> |
</form>'); |
</form>'); |
} else { |
} else { |
$r->print(&mt('Update of photos via the Automated Student Enrollment Manager is unavailable in this domain.').'<br /><br /><input type="button" name=mainmenu" value="Go back" onclick="javascript:history.go(-1);" />'); |
$r->print(&mt('Update of photos via the Automated Enrollment Manager is unavailable in this domain.') |
|
.'<br /><br /><input type="button" name=mainmenu" value="'.&mt('Go back').'" onclick="javascript:history.go(-1);" />'); |
} |
} |
} else { |
} else { |
$r->print('Update of photos is unavailable, as import of student photos is currently disabled.<br />Enable this first via: <a href="/adm/populate?action=photos">'.$$tasktitleref{'photos'}.'</a>'); |
$r->print('Update of photos is unavailable, as import of student photos is currently disabled.<br />Enable this first via: <a href="/adm/populate?action=photos">'.$$tasktitleref{'photos'}.'</a>'); |
Line 2419 function agreement_result(caller) {
|
Line 2425 function agreement_result(caller) {
|
if ($owneremail) { |
if ($owneremail) { |
$emailstr = "(e-mail: $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).'<br /><br />'.&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) |
|
.'<br /><br />' |
|
.&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}); |
&print_reply($r,$response,$$tasktitleref{$action}); |
} |
} |
Line 2485 onclick="javascript:document.photoupdate
|
Line 2493 onclick="javascript:document.photoupdate
|
} |
} |
} |
} |
if (keys(%newenv) > 0) { |
if (keys(%newenv) > 0) { |
&Apache::lonnet::appenv(%newenv); |
&Apache::lonnet::appenv(\%newenv); |
} |
} |
&print_reply($r,$response,$$tasktitleref{$action}); |
&print_reply($r,$response,$$tasktitleref{$action}); |
return; |
return; |
Line 2505 sub print_photoupdate_response {
|
Line 2513 sub print_photoupdate_response {
|
my %LC_code; |
my %LC_code; |
my %affiliates; |
my %affiliates; |
my $outcome; |
my $outcome; |
&get_institutional_codes(\%settings,,\@allcourses,\%LC_code); |
&Apache::loncommon::get_institutional_codes(\%settings,\@allcourses,\%LC_code); |
if (@allcourses > 0) { |
if (@allcourses > 0) { |
@{$affiliates{$crs}} = @allcourses; |
@{$affiliates{$crs}} = @allcourses; |
$outcome = &Apache::lonnet::auto_photoupdate(\%affiliates,$dom,$crs,\%changes); |
$outcome = &Apache::lonnet::auto_photoupdate(\%affiliates,$dom,$crs,\%changes); |
Line 2609 sub print_update_result () {
|
Line 2617 sub print_update_result () {
|
} elsif ($coursecode eq '') { |
} 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"; |
$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 { |
} else { |
&get_institutional_codes(\%settings,\@allcourses,\%LC_code); |
&Apache::loncommon::get_institutional_codes(\%settings,\@allcourses,\%LC_code); |
if (@allcourses > 0) { |
if (@allcourses > 0) { |
@{$affiliates{$crs}} = @allcourses; |
@{$affiliates{$crs}} = @allcourses; |
my $outcome = &Apache::lonnet::fetch_enrollment_query('updatenow',\%affiliates,\%reply,$dom,$crs); |
my $outcome = &Apache::lonnet::fetch_enrollment_query('updatenow',\%affiliates,\%reply,$dom,$crs); |
Line 2643 sub print_update_result () {
|
Line 2651 sub print_update_result () {
|
return; |
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 { |
sub print_viewclass_response { |
my ($r,$realm,$dom,$crs,$action,$tasktitleref) = @_; |
my ($r,$realm,$dom,$crs,$action,$tasktitleref) = @_; |
my $response; |
my $response; |
Line 2739 sub print_viewclass_response {
|
Line 2705 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); |
my $modreply = &Apache::lonnet::modify_student_enrollment($udom,$uname,$uid,'','','','',$section,$end,$start,$newtype,$newlock,$cid,'','chgtype'); |
if ($modreply eq 'ok') { |
if ($modreply eq 'ok') { |
$chgok ++; |
$chgok ++; |
$chg{$student} = "Changed to $change"; |
$chg{$student} = "Changed to $change"; |
Line 2771 sub print_viewclass_response {
|
Line 2737 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); |
my $lockreply = &Apache::lonnet::modify_student_enrollment($udom,$uname,$uid,'','','','',$section,$end,$start,$type,$newlock,$cid,'','chgtype'); |
if ($lockreply eq 'ok') { |
if ($lockreply eq 'ok') { |
$lockok ++; |
$lockok ++; |
$lockchg{$student} = 'Changed to '.$newlockname; |
$lockchg{$student} = 'Changed to '.$newlockname; |