version 1.69, 2007/03/02 20:58:32
|
version 1.72, 2007/06/06 17:35:32
|
Line 311 sub display_actions_box {
|
Line 311 sub display_actions_box {
|
$r->print(&mt('Page set to be displayed after you have selected a role in this '.$lctype). |
$r->print(&mt('Page set to be displayed after you have selected a role in this '.$lctype). |
'. <nobr>'.&mt('Currently: <i>[_1]</i>',$currinit).'. '. |
'. <nobr>'.&mt('Currently: <i>[_1]</i>',$currinit).'. '. |
&mt('<b>Change</b> for just <a href="/adm/whatsnew?command=courseinit&refpage=[_1]">this '.$lctype.'</a>',$refpage).' '. |
&mt('<b>Change</b> for just <a href="/adm/whatsnew?command=courseinit&refpage=[_1]">this '.$lctype.'</a>',$refpage).' '. |
&mt('or for all <a href="/adm/preferences?action=changecourseinit&refpage=[_1]">your courses</a>',$refpage).'</nobr><br /><hr />'); |
&mt('or for all <a href="/adm/preferences?action=changecourseinit&refpage=[_1]">your courses</a>.',$refpage).'</nobr><br /><hr />'); |
|
|
if ($command eq 'reset') { |
if ($command eq 'reset') { |
$result = &process_reset($cdom,$crs); |
$result = &process_reset($cdom,$crs); |
Line 326 sub display_actions_box {
|
Line 326 sub display_actions_box {
|
my $store_result=&store_display_settings($uname,$udom,$cid,$checkallowed); |
my $store_result=&store_display_settings($uname,$udom,$cid,$checkallowed); |
|
|
unless ($store_result eq 'ok') { |
unless ($store_result eq 'ok') { |
&Apache::lonnet::logthis('Error storing whatsnew settings: '. |
&Apache::lonnet::logthis('Error saving whatsnew settings: '. |
$store_result.' for '.'user '.$uname.':'.$udom.' in '.$lctype.' '.$cid); |
$store_result.' for '.'user '.$uname.':'.$udom.' in '.$lctype.' '.$cid); |
$result .= &mt('Unable to store visibility settings due to [_1]', |
$result .= &mt('Unable to save visibility settings due to [_1]', |
$store_result); |
$store_result); |
} |
} |
|
|
Line 470 sub display_threshold_config {
|
Line 470 sub display_threshold_config {
|
$r->print('<br /><form name="thresholdform" method="post" action="/adm/whatsnew">'. |
$r->print('<br /><form name="thresholdform" method="post" action="/adm/whatsnew">'. |
&Apache::loncommon::start_data_table(). |
&Apache::loncommon::start_data_table(). |
&Apache::loncommon::start_data_table_header_row(). |
&Apache::loncommon::start_data_table_header_row(). |
'<th>Threshold Name</th>'."\n". |
'<th>'.&mt('Threshold Name').'</th>'."\n". |
'<th>Current value</th>'."\n". |
'<th>'.&mt('Current value').'</th>'."\n". |
'<th>Change?</th>'."\n". |
'<th>'.&mt('Change?').'</th>'."\n". |
&Apache::loncommon::end_data_table_header_row()); |
&Apache::loncommon::end_data_table_header_row()); |
foreach my $type (@thresholditems) { |
foreach my $type (@thresholditems) { |
my $parameter = $env{'request.course.id'}.':threshold_'.$type; |
my $parameter = $env{'request.course.id'}.':threshold_'.$type; |
Line 521 sub display_interval_config {
|
Line 521 sub display_interval_config {
|
<select name="interval"> |
<select name="interval"> |
'); |
'); |
foreach my $key (reverse sort ({$a cmp $b} (keys(%{$interval_titles})))) { |
foreach my $key (reverse sort ({$a cmp $b} (keys(%{$interval_titles})))) { |
$r->print('<option value="'.$key.'">Version changes '.$$interval_titles{$key}. |
$r->print('<option value="'.$key.'">'.&mt('Version changes').' '.$$interval_titles{$key}. |
'</option>'."\n"); |
'</option>'."\n"); |
} |
} |
$r->print('</select> |
$r->print('</select> |
Line 556 function toggle_countunread(choice) {
|
Line 556 function toggle_countunread(choice) {
|
document.discussionswitch.submit(); |
document.discussionswitch.submit(); |
} |
} |
</script>'); |
</script>'); |
$r->print('<br />'.&mt('Choose whether or not to display a count of the number of new posts for each resource or bulletin board which has unread posts.').'<br />'.&mt('This can increase the time taken to gather data for the [_1] page by a few seconds.',"<i>What's New?</i>").' '.&mt('Currently set to [_1].','<b>'.$current.'</b>')); |
$r->print('<br />'.&mt('Choose whether or not to display a count of the number of new posts for each resource or bulletin board which has unread posts.').'<br />'.&mt("This can increase the time taken to gather data for the '<i>What's New?</i>' page by a few seconds.").' '.&mt("Currently set to <b>$current</b>.")); |
$r->print('<br /><br /> |
$r->print('<br /><br /> |
<form method="post" name="discussionswitch" action="/adm/whatsnew"> |
<form method="post" name="discussionswitch" action="/adm/whatsnew"> |
<input type="hidden" name="command" value="newdiscconf" /> |
<input type="hidden" name="command" value="newdiscconf" /> |
Line 1302 sub display_coursediscussion {
|
Line 1302 sub display_coursediscussion {
|
my $css_class = $rowNum%2?' class="LC_odd_row"':''; |
my $css_class = $rowNum%2?' class="LC_odd_row"':''; |
my $lastpost = &Apache::lonnavmaps::timeToHumanString( |
my $lastpost = &Apache::lonnavmaps::timeToHumanString( |
$$unread{$ressymb}{'lastpost'}); |
$$unread{$ressymb}{'lastpost'}); |
$r->print('<tr'.$css_class.'><td><a href="'.$disclink.'">'.$forum_title.'</a> </td><td>'.$type.' </td>'); |
$r->print('<tr'.$css_class.'><td><a href="'.$disclink.'">'.$forum_title.'</a> </td><td>'.&mt($type).' </td>'); |
if ($countunread eq 'on') { |
if ($countunread eq 'on') { |
my $unreadnum = $$unread{$ressymb}{'unreadcount'}; |
my $unreadnum = $$unread{$ressymb}{'unreadcount'}; |
$r->print('<td>'.$lastpost.'</td><td class="LC_right_item">'. |
$r->print('<td>'.$lastpost.'</td><td class="LC_right_item">'. |
Line 1332 sub display_coursenormalmail {
|
Line 1332 sub display_coursenormalmail {
|
$r->print('<tr'.$css_class.'><td>'.$mailcount. |
$r->print('<tr'.$css_class.'><td>'.$mailcount. |
'. </td><td><a href="/adm/communicate">'. |
'. </td><td><a href="/adm/communicate">'. |
$msg->{'shortsub'}.'</a> </td><td> '. |
$msg->{'shortsub'}.'</a> </td><td> '. |
$msg->{'from'}.'@'.$msg->{'fromdom'}.' </td><td>'. |
$msg->{'from'}.':'.$msg->{'fromdom'}.' </td><td>'. |
$msg->{'sendtime'}.'</td></tr>'); |
$msg->{'sendtime'}.'</td></tr>'); |
} |
} |
} else { |
} else { |
Line 1356 sub display_coursecritmail {
|
Line 1356 sub display_coursecritmail {
|
$r->print('<tr'.$css_class.'><td>'.$mailcount. |
$r->print('<tr'.$css_class.'><td>'.$mailcount. |
'. </td><td><a href="/adm/email?folder=critical">'. |
'. </td><td><a href="/adm/email?folder=critical">'. |
$msg->{'shortsub'}.'</a> </td><td> '. |
$msg->{'shortsub'}.'</a> </td><td> '. |
$msg->{'from'}.'@'.$msg->{'fromdom'}.' </td><td>'. |
$msg->{'from'}.':'.$msg->{'fromdom'}.' </td><td>'. |
$msg->{'sendtime'}.'</td></tr>'); |
$msg->{'sendtime'}.'</td></tr>'); |
} |
} |
} else { |
} else { |
Line 1424 sub store_interval_setting {
|
Line 1424 sub store_interval_setting {
|
|
|
} else { |
} else { |
my $lctype = lc(&Apache::loncommon::course_type()); |
my $lctype = lc(&Apache::loncommon::course_type()); |
&Apache::lonnet::logthis('Error storing whatsnew interval setting'. |
&Apache::lonnet::logthis('Error saving whatsnew interval setting'. |
' '.$outcome.' for '.$uname.':'.$udom.' in '.$lctype.' '.$cid); |
' '.$outcome.' for '.$uname.':'.$udom.' in '.$lctype.' '.$cid); |
$result = &mt('Unable to set interval to [_1] due to [_2].', |
$result = &mt('Unable to set interval to [_1] due to [_2].', |
'<b>'.$$interval_titles{$env{'form.interval'}}.'</b>', |
'<b>'.$$interval_titles{$env{'form.interval'}}.'</b>', |
Line 1448 sub store_discussion_setting {
|
Line 1448 sub store_discussion_setting {
|
|
|
} else { |
} else { |
my $lctype = lc(&Apache::loncommon::course_type()); |
my $lctype = lc(&Apache::loncommon::course_type()); |
&Apache::lonnet::logthis('Error storing whatsnew countunread setting'. |
&Apache::lonnet::logthis('Error saving whatsnew countunread setting'. |
' '.$outcome.' for '.$uname.':'.$udom.' in '.$lctype.' '.$cid); |
' '.$outcome.' for '.$uname.':'.$udom.' in '.$lctype.' '.$cid); |
$result = &mt('Unable to set "number unread posts display" to [_1]'. |
$result = &mt('Unable to set "number unread posts display" to [_1]'. |
' due to [_2].', |
' due to [_2].', |
Line 1486 sub store_courseinit_setting {
|
Line 1486 sub store_courseinit_setting {
|
$result = &mt('Page displayed after role selection in this '.$lctype.' set to <b>[_2]</b>',$lctype,$$initpage{$env{'form.courseinit_page'}}); |
$result = &mt('Page displayed after role selection in this '.$lctype.' set to <b>[_2]</b>',$lctype,$$initpage{$env{'form.courseinit_page'}}); |
} |
} |
} else { |
} else { |
&Apache::lonnet::logthis('Error storing whatsnew courseinit '. |
&Apache::lonnet::logthis('Error saving whatsnew courseinit '. |
'setting: '.$outcome.' for '.$uname. |
'setting: '.$outcome.' for '.$uname. |
':'.$udom.' in '.$lctype.' '.$cid); |
':'.$udom.' in '.$lctype.' '.$cid); |
if ($page_control eq 'global preferences') { |
if ($page_control eq 'global preferences') { |
Line 1514 sub start_box {
|
Line 1514 sub start_box {
|
my $showhide; |
my $showhide; |
if ($$show{$caller}) { |
if ($$show{$caller}) { |
$showhide = '<b><a href="javascript:change_display(document.visible.'. |
$showhide = '<b><a href="javascript:change_display(document.visible.'. |
'display_'.$caller.",'hide'".');">Hide</a></b>'; |
'display_'.$caller.",'hide'".');">'. |
|
&mt('Hide').'</a></b>'; |
|
|
} else { |
} else { |
$showhide = '<b><a href="javascript:change_display(document.visible.'. |
$showhide = '<b><a href="javascript:change_display(document.visible.'. |
'display_'.$caller.",'show'".');">Show</a></b>'; |
'display_'.$caller.",'show'".');">'. |
|
&mt('Show').'</a></b>'; |
} |
} |
|
|
$r->print(' |
$r->print(' |