version 1.105.2.18, 2020/09/01 22:30:58
|
version 1.130, 2024/09/11 05:20:52
|
Line 82 sub handler {
|
Line 82 sub handler {
|
} |
} |
unless ($isadhoc) { |
unless ($isadhoc) { |
%checkallowed = ( coursenormalmail => 1, |
%checkallowed = ( coursenormalmail => 1, |
coursecritmail => 1,); |
coursecritmail => 1,); |
} |
} |
foreach my $perm_check (['whn','whatsnew',1], |
foreach my $perm_check (['whn','whatsnew',1], |
['pch','coursediscussion',1], |
['pch','coursediscussion',1], |
Line 769 sub display_threshold_config {
|
Line 769 sub display_threshold_config {
|
my $onchange = 'onfocus="javascript:window.document.forms'. |
my $onchange = 'onfocus="javascript:window.document.forms'. |
"['thresholdform'].elements['".$parameter."_setparmval']". |
"['thresholdform'].elements['".$parameter."_setparmval']". |
'.checked=true;"'; |
'.checked=true;"'; |
|
my $aria_textbox = ' aria-label="'.&mt('Threshold value for [_1]', |
|
$threshold_titles{$type}).'"'; |
|
my $aria_checkbox = ' aria-label="'.&mt('Change threshold value for [_1]', |
|
$threshold_titles{$type}).'"'; |
$r->print(&Apache::loncommon::start_data_table_row()."\n". |
$r->print(&Apache::loncommon::start_data_table_row()."\n". |
'<td>'.$threshold_titles{$type}.'</td>'."\n". |
'<td>'.$threshold_titles{$type}.'</td>'."\n". |
'<td>'.&Apache::lonhtmlcommon::textbox($parameter.'_value', |
'<td>'.&Apache::lonhtmlcommon::textbox($parameter.'_value', |
$threshold{$type}, |
$threshold{$type}, |
10,$onchange).'</td>'."\n". |
10,$onchange.$aria_textbox).'</td>'."\n". |
'<td>'. |
'<td>'. |
&Apache::lonhtmlcommon::checkbox($parameter.'_setparmval'). |
&Apache::lonhtmlcommon::checkbox($parameter.'_setparmval', |
|
'','',$aria_checkbox). |
'</td>'."\n". |
'</td>'."\n". |
&Apache::loncommon::end_data_table_row()); |
&Apache::loncommon::end_data_table_row()); |
} |
} |
Line 829 sub display_interval_config {
|
Line 834 sub display_interval_config {
|
<input type="hidden" name="intervaltype" value="'.$context.'" /> |
<input type="hidden" name="intervaltype" value="'.$context.'" /> |
<input type="hidden" name="refpage" value="'.$refpage.'" />'. |
<input type="hidden" name="refpage" value="'.$refpage.'" />'. |
&mt('Display:').' |
&mt('Display:').' |
<select name="interval"> |
<select name="interval" aria-label="'.&mt('Choose time window').'"> |
<option value="" selected="selected">'.&mt('Select').'</option> |
<option value="" selected="selected">'.&mt('Select').'</option> |
'); |
'); |
if (ref($interval_titles) eq 'HASH') { |
if (ref($interval_titles) eq 'HASH') { |
Line 1139 sub check_handgraded {
|
Line 1144 sub check_handgraded {
|
if (grep(/^essay$/,@types)) { |
if (grep(/^essay$/,@types)) { |
$handgradeable=1; |
$handgradeable=1; |
last; |
last; |
|
} elsif (grep(/^custom$/,@types)) { |
|
if ($resource->handgrade($part) eq 'yes') { |
|
$handgradeable=1; |
|
last; |
|
} |
} |
} |
} |
} |
} |
} |
Line 1245 sub check_thresholds {
|
Line 1255 sub check_thresholds {
|
<td>'.$stats{$part}{degdiff}.'</td> |
<td>'.$stats{$part}{degdiff}.'</td> |
<td>'.$lastreset{$part}.'</td>'; |
<td>'.$lastreset{$part}.'</td>'; |
if ($checkallowed->{'resetcounters'}) { |
if ($checkallowed->{'resetcounters'}) { |
|
my $aria = ' aria-label="'.&mt('Reset counter for [_1] (part [_2])', |
|
$$triggered{$symb}{title},$part).'"'; |
$$triggered{$symb}{text}[$partcount] .= |
$$triggered{$symb}{text}[$partcount] .= |
'<td><input type="checkbox" name="'.$resetname.'" />'. |
'<td><input type="checkbox" name="'.$resetname.'"'.$aria.' />'. |
'<input type="hidden" name="'.$resettitle.'" value="'.&escape($$triggered{$symb}{title}).'" /></td>'; |
'<input type="hidden" name="'.$resettitle.'" value="'.&escape($$triggered{$symb}{title}).'" /></td>'; |
} |
} |
$partcount ++; |
$partcount ++; |
Line 1404 sub getnormalmail {
|
Line 1416 sub getnormalmail {
|
if (defined($sendtime) && $sendtime!~/error/) { |
if (defined($sendtime) && $sendtime!~/error/) { |
if (($emailstatus{$msgid} eq 'new') || ($status eq 'new')) { |
if (($emailstatus{$msgid} eq 'new') || ($status eq 'new')) { |
$sendtime = &Apache::lonlocal::locallocaltime($sendtime); |
$sendtime = &Apache::lonlocal::locallocaltime($sendtime); |
$msgcount ++; |
$msgcount ++; |
if ($shortsubj eq '') { |
if ($shortsubj eq '') { |
$shortsubj = &mt('No subject'); |
$shortsubj = &mt('No subject'); |
} |
} |
Line 2140 sub display_activity {
|
Line 2152 sub display_activity {
|
} |
} |
return; |
return; |
} |
} |
|
|
sub display_coursediscussion { |
sub display_coursediscussion { |
my ($r,$newdiscussions,$unread,$countunread,$res_title,$itemserror) = @_; |
my ($r,$newdiscussions,$unread,$countunread,$res_title,$itemserror) = @_; |
my $lctype = lc(&Apache::loncommon::course_type()); |
my $lctype = lc(&Apache::loncommon::course_type()); |
Line 2170 sub display_coursediscussion {
|
Line 2182 sub display_coursediscussion {
|
my $forum_title = $$unread{$ressymb}{'title'}; |
my $forum_title = $$unread{$ressymb}{'title'}; |
my $type = 'Resource'; |
my $type = 'Resource'; |
my $feedurl=&Apache::lonfeedback::get_feedurl($ressymb); |
my $feedurl=&Apache::lonfeedback::get_feedurl($ressymb); |
my $disclink = $feedurl.'?symb='.&escape($$unread{$ressymb}{symb}); |
my $disclink = $feedurl.'?symb='. &escape($$unread{$ressymb}{symb}); |
if ($feedurl =~ /bulletinboard/) { |
if ($feedurl =~ /bulletinboard/) { |
$type = 'Discussion Board'; |
$type = 'Discussion Board'; |
} |
} |