version 1.77, 2008/04/30 23:52:00
|
version 1.83, 2008/12/12 15:48:05
|
Line 169 sub display_main_box {
|
Line 169 sub display_main_box {
|
degdiff => 'Degree of difficulty', |
degdiff => 'Degree of difficulty', |
numstudents => 'Total number of students with submissions', |
numstudents => 'Total number of students with submissions', |
); |
); |
my %versions = &Apache::lonlocal::texthash ( |
my %versions = ( |
-1 => "version changes since start of $lctype", |
-1 => "version changes since start of $lctype", |
2592000 => 'version changes since last month', |
2592000 => 'version changes since last month', |
604800 => 'version changes since last week', |
604800 => 'version changes since last week', |
86400 => 'version changes since yesterday', |
86400 => 'version changes since yesterday', |
); |
); |
my %newroles = &Apache::lonlocal::texthash ( |
my %newroles = ( |
-1 => "roles which have become active since start of $lctype", |
-1 => "roles which have become active since start of $lctype", |
2592000 => 'roles which have become active since last month', |
2592000 => 'roles which have become active since last month', |
604800 => 'roles which have become active since last week', |
604800 => 'roles which have become active since last week', |
86400 => 'roles which have become active since yesterday', |
86400 => 'roles which have become active since yesterday', |
); |
); |
my %oldroles = &Apache::lonlocal::texthash ( |
my %oldroles = ( |
-1 => "roles which expired since start of $lctype", |
-1 => "roles which expired since start of $lctype", |
2592000 => 'roles which expired since last month', |
2592000 => 'roles which expired since last month', |
604800 => 'roles which expired since last week', |
604800 => 'roles which expired since last week', |
Line 352 sub display_actions_box {
|
Line 352 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).'.' |
.' <span class="LC_nobreak">' |
.' <span class="LC_nobreak">' |
.&mt('Currently: <i>[_1]</i>',$currinit) |
.&mt('Currently: [_1].','<i>'.$currinit.'</i>') |
.'. ' |
.' ' |
# &mt('<b>Change</b> for just <a href="/adm/whatsnew?command=courseinit&refpage=[_1]">this '.$lctype.'</a>',$refpage).' '. |
.&mt('[_1]Change[_2] for just [_3]this course[_4] or for all [_5]your courses[_6].' |
# &mt('or for all <a href="/adm/preferences?action=changecourseinit&refpage=[_1]">your courses</a>.',$refpage).'</span><br /><hr />'); |
,'<b>' |
.&mt('<b>Change</b> for just [_1]this course[_2]' |
,'</b>' |
.' or for all [_3]your courses[_2].' |
|
,'<a href="/adm/whatsnew?command=courseinit&refpage='.$refpage.'">' |
,'<a href="/adm/whatsnew?command=courseinit&refpage='.$refpage.'">' |
,'</a>' |
,'</a>' |
,'<a href="/adm/preferences?action=changecourseinit&refpage='.$refpage.'">') |
,'<a href="/adm/preferences?action=changecourseinit&refpage='.$refpage.'">' |
|
,'</a>') |
.' </span><br /><hr />'); |
.' </span><br /><hr />'); |
|
|
if ($command eq 'reset') { |
if ($command eq 'reset') { |
Line 402 sub display_actions_box {
|
Line 402 sub display_actions_box {
|
); |
); |
|
|
if ($timediff{'versions'} == -1) { |
if ($timediff{'versions'} == -1) { |
$headings{'versionchanges'} = 'Resources in '.$lctype.' with version changes since start of '.$lctype; |
$headings{'versionchanges'} = &mt('Resources in '.$lctype.' with version changes since start of '.$lctype); |
} elsif ($timediff{'versions'} == 2592000) { |
} elsif ($timediff{'versions'} == 2592000) { |
$headings{'versionchanges'} = 'Resources in '.$lctype.' with version changes since last month'; |
$headings{'versionchanges'} = &mt('Resources in '.$lctype.' with version changes since last month'); |
} elsif ($timediff{'versions'} == 604800) { |
} elsif ($timediff{'versions'} == 604800) { |
$headings{'versionchanges'} = 'Resources in '.$lctype.' with version changes since last week'; |
$headings{'versionchanges'} = &mt('Resources in '.$lctype.' with version changes since last week'); |
} elsif ($timediff{'versions'} == 86400) { |
} elsif ($timediff{'versions'} == 86400) { |
$headings{'versionchanges'} = 'Resources in '.$lctype.' with version changes since yesterday'; |
$headings{'versionchanges'} = &mt('Resources in '.$lctype.' with version changes since yesterday'); |
} |
} |
|
|
$timediff{'oldroles'} = $display_settings{$cid.':oldroleinterval'}; |
$timediff{'oldroles'} = $display_settings{$cid.':oldroleinterval'}; |
Line 416 sub display_actions_box {
|
Line 416 sub display_actions_box {
|
$interval{'oldroles'} = $interval_titles->{'oldroles'}->{$timediff{'oldroles'}}; |
$interval{'oldroles'} = $interval_titles->{'oldroles'}->{$timediff{'oldroles'}}; |
|
|
if ($timediff{'oldroles'} == -1) { |
if ($timediff{'oldroles'} == -1) { |
$headings{'oldroles'} = 'Roles for which access to '.$lctype.' has expired since start of '.$lctype; |
$headings{'oldroles'} = &mt('Roles for which access to '.$lctype.' has expired since start of '.$lctype); |
} elsif ($timediff{'oldroles'} == 2592000) { |
} elsif ($timediff{'oldroles'} == 2592000) { |
$headings{'oldroles'} = 'Roles for which access to '.$lctype.' has expired since last month'; |
$headings{'oldroles'} = &mt('Roles for which access to '.$lctype.' has expired since last month'); |
} elsif ($timediff{'oldroles'} == 604800) { |
} elsif ($timediff{'oldroles'} == 604800) { |
$headings{'oldroles'} = 'Roles for which access to '.$lctype.' has expired since last week'; |
$headings{'oldroles'} = &mt('Roles for which access to '.$lctype.' has expired since last week'); |
} elsif ($timediff{'oldroles'} == 86400) { |
} elsif ($timediff{'oldroles'} == 86400) { |
$headings{'oldroles'} = 'Roles for which access to '.$lctype.' has expired since yesterday'; |
$headings{'oldroles'} = &mt('Roles for which access to '.$lctype.' has expired since yesterday'); |
} |
} |
|
|
$timediff{'newroles'} = $display_settings{$cid.':newroleinterval'}; |
$timediff{'newroles'} = $display_settings{$cid.':newroleinterval'}; |
Line 430 sub display_actions_box {
|
Line 430 sub display_actions_box {
|
$interval{'newroles'} = $interval_titles->{'newroles'}->{$timediff{'newroles'}}; |
$interval{'newroles'} = $interval_titles->{'newroles'}->{$timediff{'newroles'}}; |
|
|
if ($timediff{'newroles'} == -1) { |
if ($timediff{'newroles'} == -1) { |
$headings{'newroles'} = 'Roles for which access to '.$lctype.' has become available since start of '.$lctype; |
$headings{'newroles'} = &mt('Roles for which access to '.$lctype.' has become available since start of '.$lctype); |
} elsif ($timediff{'newroles'} == 2592000) { |
} elsif ($timediff{'newroles'} == 2592000) { |
$headings{'newroles'} = 'Roles for which access to '.$lctype.' has become available since last month'; |
$headings{'newroles'} = &mt('Roles for which access to '.$lctype.' has become available since last month'); |
} elsif ($timediff{'newroles'} == 604800) { |
} elsif ($timediff{'newroles'} == 604800) { |
$headings{'newroles'} = 'Roles for which access to '.$lctype.' has become available since last week'; |
$headings{'newroles'} = &mt('Roles for which access to '.$lctype.' has become available since last week'); |
} elsif ($timediff{'newroles'} == 86400) { |
} elsif ($timediff{'newroles'} == 86400) { |
$headings{'newroles'} = 'Roles for which access to '.$lctype.' has become available since yesterday'; |
$headings{'newroles'} = &mt('Roles for which access to '.$lctype.' has become available since yesterday'); |
} |
} |
|
|
my $now = time; |
my $now = time; |
Line 464 sub display_actions_box {
|
Line 464 sub display_actions_box {
|
} |
} |
|
|
$headings{'abovethreshold'} = |
$headings{'abovethreshold'} = |
&mt('Problems with av. attempts ≥ [_1] or deg. difficulty ≥ [_2] <br /> and total number of '.$stulabel{$crstype}.' with submissions ≥ [_3]', |
&mt('(Problems with av. attempts ≥ [_1] or deg. difficulty ≥ [_2]) [_3] and total number of '.$stulabel{$crstype}.' with submissions ≥ [_4]', |
$threshold{'av_attempts'},$threshold{'degdiff'}, |
$threshold{'av_attempts'},$threshold{'degdiff'}, |
$threshold{'numstudents'}); |
'<br />',$threshold{'numstudents'}); |
|
|
my @actionorder = ('handgrading','haserrors','abovethreshold','versionchanges','coursediscussion','coursenormalmail','coursecritmail','newroles','oldroles'); |
my @actionorder = ('handgrading','haserrors','abovethreshold','versionchanges','coursediscussion','coursenormalmail','coursecritmail','newroles','oldroles'); |
|
|
Line 637 sub display_interval_config {
|
Line 637 sub display_interval_config {
|
<input type="hidden" name="refpage" value="'.$refpage.'" />'. |
<input type="hidden" name="refpage" value="'.$refpage.'" />'. |
&mt('Display:').' |
&mt('Display:').' |
<select name="interval"> |
<select name="interval"> |
<option value="" selected="selected">Select</option> |
<option value="" selected="selected">'.&mt('Select').'</option> |
'); |
'); |
if (ref($interval_titles) eq 'HASH') { |
if (ref($interval_titles) eq 'HASH') { |
if (ref($interval_titles->{$context}) eq 'HASH') { |
if (ref($interval_titles->{$context}) eq 'HASH') { |
foreach my $key (reverse sort ({$a cmp $b} (keys(%{$interval_titles->{$context}})))) { |
foreach my $key (reverse sort ({$a cmp $b} (keys(%{$interval_titles->{$context}})))) { |
$r->print('<option value="'.$key.'">'.$interval_titles->{$context}->{$key}. |
$r->print('<option value="'.$key.'">'.&mt($interval_titles->{$context}->{$key}). |
'</option>'."\n"); |
'</option>'."\n"); |
} |
} |
} |
} |
Line 679 function toggle_countunread(choice) {
|
Line 679 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 '<i>What's New?</i>' page by a few seconds.").' '.&mt("Currently set to <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 [_1].','<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 689 function toggle_countunread(choice) {
|
Line 695 function toggle_countunread(choice) {
|
$r->print('<br/> |
$r->print('<br/> |
<input type="button" name="display" value="'. |
<input type="button" name="display" value="'. |
&mt('Change to [_1]',&mt($opposite{$current})).'" |
&mt('Change to [_1]',&mt($opposite{$current})).'" |
onclick="javascript:toggle_countunread('."'change'".')" /> |
onclick="javascript:toggle_countunread('."'change'".')" />'. |
  |
(' ' x7). |
<input type="button" name="nochange" value="'. |
'<input type="button" name="nochange" value="'. |
&mt("No change").'" |
&mt("No change").'" |
onclick="javascript:toggle_countunread('."'unchanged'".')" /> |
onclick="javascript:toggle_countunread('."'unchanged'".')" /> |
</form>'); |
</form>'); |
Line 1222 sub getactivated {
|
Line 1228 sub getactivated {
|
if (ref($changes{$chg}) eq 'HASH') { |
if (ref($changes{$chg}) eq 'HASH') { |
my $timestamp = $changes{$chg}{'exe_time'}; |
my $timestamp = $changes{$chg}{'exe_time'}; |
if ($timestamp) { |
if ($timestamp) { |
if ($rolechgtime > -1) { |
if ($rolechgtime > 0) { |
if ($now - $rolechgtime < $timestamp) { |
if ($timestamp < $rolechgtime) { |
last; |
last; |
} |
} |
} |
} |
Line 1563 sub display_versionchanges {
|
Line 1569 sub display_versionchanges {
|
'revd' => 'Last revised', |
'revd' => 'Last revised', |
'newv' => 'New version', |
'newv' => 'New version', |
'veru' => 'Version used', |
'veru' => 'Version used', |
'noup' => 'No', |
|
); |
); |
if (keys(%{$changed}) > 0) { |
if (keys(%{$changed}) > 0) { |
$r->print('<tr class="LC_info_row"><td class="LC_left_item">'. |
$r->print('<tr class="LC_info_row"><td class="LC_left_item">'. |
Line 1586 sub display_versionchanges {
|
Line 1591 sub display_versionchanges {
|
$$changed{$item}{'version'}.'</td></tr>'); |
$$changed{$item}{'version'}.'</td></tr>'); |
} |
} |
} else { |
} else { |
$r->print('<tr class="LC_empty_row"><td>'.$lt{'noup'}. |
$r->print('<tr class="LC_empty_row"><td>' |
' '.$interval.'</td></tr>'); |
.&mt('No '.$interval).'</td></tr>'); |
} |
} |
return; |
return; |
} |
} |
Line 1601 sub display_rolechanges {
|
Line 1606 sub display_rolechanges {
|
'role' => 'Role', |
'role' => 'Role', |
'sec' => 'Section', |
'sec' => 'Section', |
'status' => 'Status', |
'status' => 'Status', |
'norc' => 'There are no ', |
|
); |
); |
if ($chgcount) { |
if ($chgcount) { |
$r->print('<tr class="LC_info_row">'. |
$r->print('<tr class="LC_info_row">'. |
Line 1644 sub display_rolechanges {
|
Line 1648 sub display_rolechanges {
|
} |
} |
} |
} |
} else { |
} else { |
$r->print('<tr class="LC_empty_row"><td>'.$lt{'norc'}. |
$r->print('<tr class="LC_empty_row"><td>' |
' '.$interval.'</td></tr>'); |
.&mt('There are no '.$interval).'</td></tr>'); |
} |
} |
return; |
return; |
} |
} |
Line 1877 sub store_courseinit_setting {
|
Line 1881 sub store_courseinit_setting {
|
\%courseinit_settings,$udom,$uname); |
\%courseinit_settings,$udom,$uname); |
if ($outcome eq 'ok') { |
if ($outcome eq 'ok') { |
if ($page_control eq 'global preferences') { |
if ($page_control eq 'global preferences') { |
$result = &mt("Page displayed after role selection in $lctype now set by <b>user's global preferences</b>."); |
$result = &mt("Page displayed after role selection in $lctype now set by [_1]user's global preferences[_2].",'<b>','</b>'); |
} else { |
} else { |
$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 [_1].' |
|
,'<b>'.$$initpage{$env{'form.courseinit_page'}}.'</b>'); |
} |
} |
} else { |
} else { |
&Apache::lonnet::logthis('Error saving whatsnew courseinit '. |
&Apache::lonnet::logthis('Error saving whatsnew courseinit '. |
Line 1891 sub store_courseinit_setting {
|
Line 1896 sub store_courseinit_setting {
|
'<b>'.$page_control.'</b>', |
'<b>'.$page_control.'</b>', |
'<tt>'.$outcome.'</tt>.<br />'); |
'<tt>'.$outcome.'</tt>.<br />'); |
} else { |
} else { |
$result = &mt('Unable to set page display, after role selection, for this '.$lctype.' to <b>[_2]</b> due to <tt>[_3]</tt>.<br />', |
$result = &mt('Unable to set page display, after role selection, for this '.$lctype.' to [_1] due to [_2].' |
$$initpage{$env{'form.courseinit_page'}},$outcome); |
,'<b>'.$$initpage{$env{'form.courseinit_page'}}.'</b>' |
|
,'<tt>'.$outcome.'</tt>') |
|
.'<br />'; |
} |
} |
} |
} |
} |
} |