version 1.77, 2008/04/30 23:52:00
|
version 1.80, 2008/08/26 01:12:16
|
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('or for all <a href="/adm/preferences?action=changecourseinit&refpage=[_1]">your courses</a>.',$refpage).'</span><br /><hr />'); |
|
.&mt('<b>Change</b> for just [_1]this course[_2]' |
.&mt('<b>Change</b> for just [_1]this course[_2]' |
.' or for all [_3]your courses[_2].' |
.' or for all [_3]your courses[_2].' |
,'<a href="/adm/whatsnew?command=courseinit&refpage='.$refpage.'">' |
,'<a href="/adm/whatsnew?command=courseinit&refpage='.$refpage.'">' |
Line 402 sub display_actions_box {
|
Line 400 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 414 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 428 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 462 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 635 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 1222 sub getactivated {
|
Line 1220 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 1561 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 1583 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 1598 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 1640 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; |
} |
} |