version 1.159, 2007/04/17 18:28:44
|
version 1.163, 2007/07/17 21:24:17
|
Line 752 sub enroll_single_student {
|
Line 752 sub enroll_single_student {
|
} |
} |
|
|
$r->print('<h3>'.&mt('Enrolling Student').'</h3>'); |
$r->print('<h3>'.&mt('Enrolling Student').'</h3>'); |
$r->print('<p>'.&mt('Enrolling').' '.$env{'form.cuname'}." \@ ". |
$r->print('<p>'.&mt('Enrolling [_1] : [_2]',$env{'form.cuname'}, |
$env{'form.lcdomain'}.'</p>'); |
$env{'form.lcdomain'}).'</p>'); |
if (($env{'form.cuname'}) |
if (($env{'form.cuname'}) |
&& ($env{'form.cuname'} |
&& ($env{'form.cuname'} |
eq &LONCAPA::clean_username($env{'form.cuname'})) |
eq &LONCAPA::clean_username($env{'form.cuname'})) |
Line 886 sub date_setting_table {
|
Line 886 sub date_setting_table {
|
my ($startform,$endform)=&setup_date_selectors($starttime,$endtime,$mode); |
my ($startform,$endform)=&setup_date_selectors($starttime,$endtime,$mode); |
my $dateDefault = '<nobr>'. |
my $dateDefault = '<nobr>'. |
'<label><input type="checkbox" name="makedatesdefault" /> '. |
'<label><input type="checkbox" name="makedatesdefault" /> '. |
&mt('make these dates the default for future enrollment').'</label>'; |
&mt('make these dates the default for future enrollment'). |
|
'</label></nobr>'; |
if ($mode eq 'create_enrolldates' || $mode eq 'create_defaultdates') { |
if ($mode eq 'create_enrolldates' || $mode eq 'create_defaultdates') { |
$dateDefault = ' '; |
$dateDefault = ' '; |
} |
} |
Line 1020 sub print_enroll_single_student_form {
|
Line 1021 sub print_enroll_single_student_form {
|
); |
); |
my $authhelp=&Apache::loncommon::help_open_topic('Auth_Options'); |
my $authhelp=&Apache::loncommon::help_open_topic('Auth_Options'); |
$user_data_html = <<END; |
$user_data_html = <<END; |
<h3>$lt{'udf'} $username\@$domain</h3> |
<h3>$lt{'udf'} $username:$domain</h3> |
<table> |
<table> |
<tr><td class="LC_dropadd_labeltext"><label for="cfirst">$lt{'fn'}</label>:</td> |
<tr><td class="LC_dropadd_labeltext"><label for="cfirst">$lt{'fn'}</label>:</td> |
<td><input type="text" name="cfirst" size="15"></td></tr> |
<td><input type="text" name="cfirst" size="15" /></td></tr> |
<tr><td class="LC_dropadd_labeltext"><label for="cmiddle">$lt{'mn'}</label>:</td> |
<tr><td class="LC_dropadd_labeltext"><label for="cmiddle">$lt{'mn'}</label>:</td> |
<td><input type="text" name="cmiddle" size="15"></td></tr> |
<td><input type="text" name="cmiddle" size="15" /></td></tr> |
<tr><td class="LC_dropadd_labeltext"><label for="clast">$lt{'ln'}</label>:</td> |
<tr><td class="LC_dropadd_labeltext"><label for="clast">$lt{'ln'}</label>:</td> |
<td><input type="text" name="clast" size="15"></td></tr> |
<td><input type="text" name="clast" size="15" /></td></tr> |
<tr><td class="LC_dropadd_labeltext"><label for="cgen">$lt{'gen'}</label>:</td> |
<tr><td class="LC_dropadd_labeltext"><label for="cgen">$lt{'gen'}</label>:</td> |
<td><input type="text" name="cgen" size="5"> </td></tr> |
<td><input type="text" name="cgen" size="5" /> </td></tr> |
<tr><td class="LC_dropadd_labeltext"><label for="lcserver">$lt{'hs'}</label>:</td> |
<tr><td class="LC_dropadd_labeltext"><label for="lcserver">$lt{'hs'}</label>:</td> |
<td>$homeserver_form</td></tr> |
<td>$homeserver_form</td></tr> |
<tr><td class="LC_dropadd_labeltext"><label for="emailaddress">$lt{'mail'}</label>:</td> |
<tr><td class="LC_dropadd_labeltext"><label for="emailaddress">$lt{'mail'}</label>:</td> |
Line 1059 END
|
Line 1060 END
|
'mail' => "Email Address", |
'mail' => "Email Address", |
); |
); |
$user_data_html = <<END; |
$user_data_html = <<END; |
<h3>$lt{'udf'} $username\@$domain</h3> |
<h3>$lt{'udf'} $username:$domain</h3> |
<input type="hidden" name="lcserver" value="default" /> |
<input type="hidden" name="lcserver" value="default" /> |
<table> |
<table> |
<tr><td class="LC_dropadd_labeltext"><label for="cfirst">$lt{'fn'}</label>:</td> |
<tr><td class="LC_dropadd_labeltext"><label for="cfirst">$lt{'fn'}</label>:</td> |
<td> |
<td><input type="text" name="cfirst" value="$uenv{'firstname'}" size="15" /></td></tr> |
<input type="text" name="cfirst" value="$uenv{'firstname'}" size="15" /> |
|
</td></tr> |
|
<tr><td class="LC_dropadd_labeltext"><label for="cmiddle">$lt{'mn'}</label>:</td> |
<tr><td class="LC_dropadd_labeltext"><label for="cmiddle">$lt{'mn'}</label>:</td> |
<td> |
<td><input type="text" name="cmiddle" value="$uenv{'middlename'}" size="15" /></td></tr> |
<input type="text" name="cmiddle" value="$uenv{'middlename'}" size="15" /> |
|
</td></tr> |
|
<tr><td class="LC_dropadd_labeltext"><label for="clast">$lt{'ln'}</label>:</td> |
<tr><td class="LC_dropadd_labeltext"><label for="clast">$lt{'ln'}</label>:</td> |
<td> |
<td><input type="text" name="clast" value="$uenv{'lastname'}" size="15" /></td></tr> |
<input type="text" name="clast"value="$uenv{'lastname'}" size="15" /> |
<tr><td class="LC_dropadd_labeltext"><label for="cgen">$lt{'gen'}</label>:</td> |
</td></tr> |
<td><input type="text" name="cgen" value="$uenv{'generation'}" size="5" /> </td></tr> |
<tr><td><label for="cgen">$lt{'gen'}</label>:</td> |
<tr><td class="LC_dropadd_labeltext"><label for="emailaddress">$lt{'mail'}</label>:</td> |
<td class="LC_dropadd_labeltext"> |
<td><input type="text" name="emailaddress" value="$uenv{'permanentemail'}" size="20" /></td></tr> |
<input type="text" name="cgen" value="$uenv{'generation'}" size="5" /> |
|
</td></tr> |
|
<tr><td><label for="emailaddress">$lt{'mail'}</label>:</td> |
|
<td> |
|
<input type="text" name="emailaddress" value="$uenv{'permanentemail'}" size="20" /> |
|
</td></tr> |
|
</table> |
</table> |
END |
END |
} |
} |
Line 1144 $user_data_html
|
Line 1135 $user_data_html
|
<h3>$lt{'cd'}</h3> |
<h3>$lt{'cd'}</h3> |
|
|
<p><label for="csec">$lt{'gs'}</label>: <input type="text" name="csec" size="5" /> |
<p><label for="csec">$lt{'gs'}</label>: <input type="text" name="csec" size="5" /> |
<p> |
|
$date_table |
|
</p> |
</p> |
|
$date_table |
<h3>$lt{'idsn'}</h3> |
<h3>$lt{'idsn'}</h3> |
<p> |
<p> |
<label for="cstid">$lt{'idsn'}</label>: <input type="text" name="cstid" size="10"> |
<label for="cstid">$lt{'idsn'}</label>: <input type="text" name="cstid" size="10" /> |
</p><p> |
</p><p> |
<label> |
<label> |
<input type="checkbox" name="forceid" value="yes"> |
<input type="checkbox" name="forceid" value="yes" /> |
$lt{'disn'} |
$lt{'disn'} |
</label> |
</label> |
</p><p> |
</p><p> |
<input type="button" onClick="verify(this.form,this.form.csec)" value="$lt{'eas'}"> |
<input type="button" onClick="verify(this.form,this.form.csec)" value="$lt{'eas'}" /> |
</p> |
</p> |
END |
END |
return; |
return; |
Line 1306 END
|
Line 1296 END
|
'start' => "start date", |
'start' => "start date", |
'end' => "end date", |
'end' => "end date", |
'type' => "enroll type/action", |
'type' => "enroll type/action", |
|
'email' => "email address", |
'photo' => "photo", |
'photo' => "photo", |
); |
); |
unless ($mode eq 'autoenroll') { |
unless ($mode eq 'autoenroll') { |
Line 1358 function photowindow(photolink) {
|
Line 1349 function photowindow(photolink) {
|
<a href="javascript:document.studentform.sortby.value='end';document.studentform.submit();">$lt{'end'}</a> |
<a href="javascript:document.studentform.sortby.value='end';document.studentform.submit();">$lt{'end'}</a> |
</th><th> |
</th><th> |
<a href="javascript:document.studentform.sortby.value='groups';document.studentform.submit();">$lt{'grp'}</a> |
<a href="javascript:document.studentform.sortby.value='groups';document.studentform.submit();">$lt{'grp'}</a> |
|
</th><th> |
|
<a href="javascript:document.studentform.sortby.value='email';document.studentform.submit();">$lt{'email'}</a> |
</th> |
</th> |
END |
END |
if ($env{'course.'.$env{'request.course.id'}.'.internal.showphoto'}) { |
if ($env{'course.'.$env{'request.course.id'}.'.internal.showphoto'}) { |
Line 1401 END
|
Line 1394 END
|
print $CSVfile '"'.join('","',map { |
print $CSVfile '"'.join('","',map { |
&Apache::loncommon::csv_translate(&mt($_)) |
&Apache::loncommon::csv_translate(&mt($_)) |
} ("username","domain","ID","student name", |
} ("username","domain","ID","student name", |
"section","start date","end date","status","active groups")) |
"section","start date","end date","status", |
|
"active groups","email address")) |
.'"'."\n"; |
.'"'."\n"; |
} else { |
} else { |
print $CSVfile '"'.join('","',map { |
print $CSVfile '"'.join('","',map { |
&Apache::loncommon::csv_translate(&mt($_)) |
&Apache::loncommon::csv_translate(&mt($_)) |
} ("username","domain","ID","student name", |
} ("username","domain","ID","student name", |
"section","start date","end date","active groups")).'"'."\n"; |
"section","start date","end date", |
|
"active groups","email address")).'"'."\n"; |
} |
} |
} elsif ($mode eq 'excel') { |
} elsif ($mode eq 'excel') { |
# Create the excel spreadsheet |
# Create the excel spreadsheet |
Line 1423 END
|
Line 1418 END
|
$excel_sheet->write($row++,0,["username","domain","ID", |
$excel_sheet->write($row++,0,["username","domain","ID", |
"student name","section", |
"student name","section", |
"start date","end date","status", |
"start date","end date","status", |
"active groups"], |
"active groups","email address"], |
$format->{'bold'}); |
$format->{'bold'}); |
} |
} |
# |
# |
Line 1462 END
|
Line 1457 END
|
my $name = $sdata->[$index{'fullname'}]; |
my $name = $sdata->[$index{'fullname'}]; |
my $id = $sdata->[$index{'id'}]; |
my $id = $sdata->[$index{'id'}]; |
my $status = $sdata->[$index{'status'}]; |
my $status = $sdata->[$index{'status'}]; |
|
next if (($statusmode ne 'Any') && ($status ne $statusmode)); |
my $start = $sdata->[$index{'start'}]; |
my $start = $sdata->[$index{'start'}]; |
my $end = $sdata->[$index{'end'}]; |
my $end = $sdata->[$index{'end'}]; |
my $type = $sdata->[$index{'type'}]; |
my $type = $sdata->[$index{'type'}]; |
next if (($statusmode ne 'Any') && ($status ne $statusmode)); |
|
|
my %emails = &Apache::loncommon::getemails($username,$domain); |
|
my $email; |
|
foreach my $type ('critnotification', 'permanentemail', |
|
'notification') { |
|
if ($emails{$type} =~ /\S/) { |
|
$email = $emails{$type}; |
|
last; |
|
} |
|
} |
|
|
if ($mode eq 'view' || $mode eq 'html' || $mode eq 'autoenroll') { |
if ($mode eq 'view' || $mode eq 'html' || $mode eq 'autoenroll') { |
if (! defined($start) || $start == 0) { |
if (! defined($start) || $start == 0) { |
$start = &mt('none'); |
$start = &mt('none'); |
Line 1525 END
|
Line 1531 END
|
<td>$start</td> |
<td>$start</td> |
<td>$end</td> |
<td>$end</td> |
<td>$active_groups</td> |
<td>$active_groups</td> |
|
<td>$email</td> |
END |
END |
if ($env{'course.'.$env{'request.course.id'}. |
if ($env{'course.'.$env{'request.course.id'}. |
'.internal.showphoto'}) { |
'.internal.showphoto'}) { |
Line 1561 END
|
Line 1568 END
|
push @line,&Apache::loncommon::csv_translate($status); |
push @line,&Apache::loncommon::csv_translate($status); |
} |
} |
push @line,&Apache::loncommon::csv_translate($active_groups); |
push @line,&Apache::loncommon::csv_translate($active_groups); |
|
push @line,&Apache::loncommon::csv_translate($email); |
print $CSVfile '"'.join('","',@line).'"'."\n"; |
print $CSVfile '"'.join('","',@line).'"'."\n"; |
} elsif ($mode eq 'excel') { |
} elsif ($mode eq 'excel') { |
$excel_sheet->write($row,0,[$username,$domain,$id, |
$excel_sheet->write($row,0,[$username,$domain,$id, |
Line 1577 END
|
Line 1585 END
|
} |
} |
$excel_sheet->write($row,$col++,$status); |
$excel_sheet->write($row,$col++,$status); |
$excel_sheet->write($row,$col++,$active_groups); |
$excel_sheet->write($row,$col++,$active_groups); |
|
$excel_sheet->write($row,$col++,$email); |
$row++; |
$row++; |
} |
} |
} |
} |
Line 1698 $lt{'odcc'}
|
Line 1707 $lt{'odcc'}
|
<input type="hidden" name="sortby" value="$sortby" /> |
<input type="hidden" name="sortby" value="$sortby" /> |
<input type="hidden" name="Status" value="$env{'form.Status'}" /> |
<input type="hidden" name="Status" value="$env{'form.Status'}" /> |
<h2>$lt{'mef'} $info{'firstname'} $info{'middlename'} |
<h2>$lt{'mef'} $info{'firstname'} $info{'middlename'} |
$info{'lastname'} $info{'generation'}, $sname\@$sdom</h2> |
$info{'lastname'} $info{'generation'}, $sname:$sdom</h2> |
<p> |
<p> |
<b>$lt{'sn'}</b> |
<b>$lt{'sn'}</b> |
<table> |
<table> |
Line 1710 $info{'lastname'} $info{'generation'}, $
|
Line 1719 $info{'lastname'} $info{'generation'}, $
|
<input type="text" name="generation" value="$info{'generation'}" /></td></tr> |
<input type="text" name="generation" value="$info{'generation'}" /></td></tr> |
</table> |
</table> |
</p><p> |
</p><p> |
<b>$lt{'sid'}</b>: <input type="text" name="id" value="$info{'id'}" size="12"/> |
<b>$lt{'sid'}</b>: <input type="text" name="id" value="$info{'id'}" size="12" /> |
</p><p> |
</p><p> |
<label> |
<label> |
<input type="checkbox" name="forceid" > |
<input type="checkbox" name="forceid" /> |
$lt{'disn'} |
$lt{'disn'} |
</label> |
</label> |
</p><p> |
</p><p> |
<b>$lt{'sec'}</b>: <input type="text" name="section" value="$section" size="14"/> |
<b>$lt{'sec'}</b>: <input type="text" name="section" value="$section" size="14" /> |
</p> |
</p> |
<p>$current_date_description</p> |
<p>$current_date_description</p> |
<p>$date_table</p> |
<p>$date_table</p> |
Line 1759 sub modify_single_student {
|
Line 1768 sub modify_single_student {
|
$env{'request.course.id'}); |
$env{'request.course.id'}); |
my ($tmp) = keys(%old); |
my ($tmp) = keys(%old); |
if ($tmp =~ /^(con_lost|error|no_such_host)/i) { |
if ($tmp =~ /^(con_lost|error|no_such_host)/i) { |
$r->print(&mt('There was an error determining the environment values for')." $slogin \@ $sdom."); |
$r->print(&mt('There was an error determining the environment values for')." $slogin : $sdom."); |
return; |
return; |
} |
} |
undef $tmp; |
undef $tmp; |
Line 1799 sub modify_single_student {
|
Line 1808 sub modify_single_student {
|
'et' => "End Time", |
'et' => "End Time", |
); |
); |
$r->print(<<END); |
$r->print(<<END); |
<h2>$lt{'mdu'} $slogin \@ $sdom </h2> |
<h2>$lt{'mdu'} $slogin : $sdom </h2> |
<h3>$lt{'si'}</h3> |
<h3>$lt{'si'}</h3> |
<table rules="rows" border="1" cellpadding="3" > |
<table rules="rows" border="1" cellpadding="3" > |
<tr> |
<tr> |
Line 1859 END
|
Line 1868 END
|
&mt('The error reported was')." ". |
&mt('The error reported was')." ". |
$roleresults); |
$roleresults); |
&Apache::lonnet::logthis("londropadd:failed attempt to modify student". |
&Apache::lonnet::logthis("londropadd:failed attempt to modify student". |
" data for ".$slogin." \@ ".$sdom." by ". |
" data for ".$slogin." : ".$sdom." by ". |
$env{'user.name'}." \@ ".$env{'user.domain'}. |
$env{'user.name'}." : ".$env{'user.domain'}. |
":".$roleresults); |
":".$roleresults); |
} else { # everything is okay! |
} else { # everything is okay! |
$r->print(&mt('Student information updated successfully.')." <br />". |
$r->print(&mt('Student information updated successfully.')." <br />". |