[LON-CAPA-cvs] cvs: loncom /interface lonuserutils.pm
bisitz
bisitz at source.lon-capa.org
Fri Feb 14 12:44:00 EST 2014
bisitz Fri Feb 14 17:44:00 2014 EDT
Modified files:
/loncom/interface lonuserutils.pm
Log:
- Corrected typo (attribute)
- Close page only once (-> loncreateuser, only call, already closes for sub print_drop_menu)
- XHTML
- Internationalization:
- Added missing &mt() calls
- Allow flexible parameters -> exclude HTML paragraph start
Index: loncom/interface/lonuserutils.pm
diff -u loncom/interface/lonuserutils.pm:1.161 loncom/interface/lonuserutils.pm:1.162
--- loncom/interface/lonuserutils.pm:1.161 Wed Feb 5 18:02:15 2014
+++ loncom/interface/lonuserutils.pm Fri Feb 14 17:44:00 2014
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Utility functions for managing LON-CAPA user accounts
#
-# $Id: lonuserutils.pm,v 1.161 2014/02/05 18:02:15 bisitz Exp $
+# $Id: lonuserutils.pm,v 1.162 2014/02/14 17:44:00 bisitz Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1394,9 +1394,9 @@
&default_course_roles($context,$checkpriv,'Course',%customroles)."\n".
'</select></td><td>'.
'<table class="LC_createuser">'.
- '<tr class="LC_section_row"><td valign"top">'.
+ '<tr class="LC_section_row"><td valign="top">'.
$lt{'exs'}.'<br /><select name="currsec">'.
- ' <option value=""><--'.&mt('Pick course first').
+ ' <option value=""><--'.&mt('Pick course first').
'</select></td>'.
'<td> </td>'.
'<td valign="top">'.$lt{'new'}.'<br />'.
@@ -3005,10 +3005,10 @@
if ($mode eq 'autoenroll') {
my $cellentry;
if ($in{'type'} eq 'auto') {
- $cellentry = '<b>'.&mt('auto').'</b> <label><input type="checkbox" name="chgauto" value="'.$in{'username'}.':'.$in{'domain'}.'" /> Change</label>';
+ $cellentry = '<b>'.&mt('auto').'</b> <label><input type="checkbox" name="chgauto" value="'.$in{'username'}.':'.$in{'domain'}.'" /> '.&mt('Change').'</label>';
$autocount ++;
} else {
- $cellentry = '<table border="0" cellspacing="0"><tr><td rowspan="2"><b>'.&mt('manual').'</b></td><td><span class="LC_nobreak"><label><input type="checkbox" name="chgmanual" value="'.$in{'username'}.':'.$in{'domain'}.'" /> Change</label></span></td></tr><tr><td><span class="LC_nobreak">';
+ $cellentry = '<table border="0" cellspacing="0"><tr><td rowspan="2"><b>'.&mt('manual').'</b></td><td><span class="LC_nobreak"><label><input type="checkbox" name="chgmanual" value="'.$in{'username'}.':'.$in{'domain'}.'" /> '.&mt('Change').'</label></span></td></tr><tr><td><span class="LC_nobreak">';
$manualcount ++;
if ($in{'lockedtype'}) {
$cellentry .= '<label><input type="checkbox" name="unlockchg" value="'.$in{'username'}.':'.$in{'domain'}.'" /> '.&mt('Unlock').'</label>';
@@ -3139,10 +3139,10 @@
$r->print(&Apache::loncommon::end_data_table().'<br />');
} elsif ($mode eq 'excel') {
$excel_workbook->close();
- $r->print(&mt('[_1]Your Excel spreadsheet[_2] is ready for download.', '<p><a href="'.$excel_filename.'">','</a>')."</p>\n");
+ $r->print('<p>'.&mt('[_1]Your Excel spreadsheet[_2] is ready for download.', '<a href="'.$excel_filename.'">','</a>')."</p>\n");
} elsif ($mode eq 'csv') {
close($CSVfile);
- $r->print(&mt('[_1]Your CSV file[_2] is ready for download.', '<p><a href="'.$CSVfilename.'">','</a>')."</p>\n");
+ $r->print('<p>'.&mt('[_1]Your CSV file[_2] is ready for download.', '<a href="'.$CSVfilename.'">','</a>')."</p>\n");
$r->rflush();
}
if ($mode eq 'autoenroll') {
@@ -3840,7 +3840,6 @@
$check_uncheck_js
// ]]>
</script>
-<p>
<input type="hidden" name="phase" value="four" />
END
my ($indexhash,$keylist) = &make_keylist_array();
@@ -3877,6 +3876,7 @@
$classlist,$keylist,$cdom,$cnum);
my %lt=&Apache::lonlocal::texthash('usrn' => "username",
'dom' => "domain",
+ 'id' => "ID",
'sn' => "student name",
'mn' => "member name",
'sec' => "section",
@@ -3895,7 +3895,7 @@
<th> </th>
<th>$lt{'usrn'}</th>
<th>$lt{'dom'}</th>
- <th>ID</th>
+ <th>$lt{'id'}</th>
<th>$nametitle</th>
<th>$lt{'sec'}</th>
<th>$lt{'start'}</th>
@@ -3909,21 +3909,21 @@
$r->print(<<END);
<th> </th>
<th>
- <a href="/adm/createuser?action=$action&sortby=username">$lt{'usrn'}</a>
+ <a href="/adm/createuser?action=$action&sortby=username">$lt{'usrn'}</a>
</th><th>
- <a href="/adm/createuser?action=$action&sortby=domain">$lt{'dom'}</a>
+ <a href="/adm/createuser?action=$action&sortby=domain">$lt{'dom'}</a>
</th><th>
- <a href="/adm/createuser?action=$action&sortby=id">ID</a>
+ <a href="/adm/createuser?action=$action&sortby=id">$lt{'id'}</a>
</th><th>
- <a href="/adm/createuser?action=$action&sortby=fullname">$nametitle</a>
+ <a href="/adm/createuser?action=$action&sortby=fullname">$nametitle</a>
</th><th>
- <a href="/adm/createuser?action=$action&sortby=section">$lt{'sec'}</a>
+ <a href="/adm/createuser?action=$action&sortby=section">$lt{'sec'}</a>
</th><th>
- <a href="/adm/createuser?action=$action&sortby=start">$lt{'start'}</a>
+ <a href="/adm/createuser?action=$action&sortby=start">$lt{'start'}</a>
</th><th>
- <a href="/adm/createuser?action=$action&sortby=end">$lt{'end'}</a>
+ <a href="/adm/createuser?action=$action&sortby=end">$lt{'end'}</a>
</th><th>
- <a href="/adm/createuser?action=$action&sortby=groups">$lt{'groups'}</a>
+ <a href="/adm/createuser?action=$action&sortby=groups">$lt{'groups'}</a>
</th>
END
$r->print(&Apache::loncommon::end_data_table_header_row());
@@ -3994,7 +3994,6 @@
$btn = $lt{'dm'};
}
$r->print(<<"END");
-</p>
<p>
<input type="button" value="$lt{'ca'}" onclick="javascript:checkAll(document.studentform.droplist)" />
<input type="button" value="$lt{'ua'}" onclick="javascript:uncheckAll(document.studentform.droplist)" />
@@ -4820,7 +4819,7 @@
} else {
&show_drop_list($r,$classlist,'nosort',$permission,$crstype);
}
- $r->print('</form>'. &Apache::loncommon::end_page());
+ $r->print('</form>');
return;
}
More information about the LON-CAPA-cvs
mailing list