version 1.127, 2020/03/30 16:26:46
|
version 1.130, 2024/09/11 05:20:52
|
Line 1
|
Line 1
|
|
# The LearningOnline Network |
|
# What's New in a course |
# |
# |
# $Id$ |
# $Id$ |
# |
# |
Line 767 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 827 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 1121 sub check_discussions {
|
Line 1128 sub check_discussions {
|
sub check_handgraded { |
sub check_handgraded { |
my ($resource,$symb,$title,$cdom,$cnum,$ungraded,$tograde) = @_; |
my ($resource,$symb,$title,$cdom,$cnum,$ungraded,$tograde) = @_; |
if ($resource->is_problem()) { |
if ($resource->is_problem()) { |
my ($map,$ind,$url)=&Apache::lonnet::decode_symb($symb); |
my ($handgradeable,$is_task); |
my $partlist=$resource->parts(); |
my $partlist=$resource->parts(); |
my $handgradeable; |
if ($resource->is_task()) { |
foreach my $part (@$partlist) { |
$is_task = 1; |
if ($resource->handgrade($part) eq 'yes') { |
foreach my $part (@$partlist) { |
$handgradeable=1; last; |
if ($resource->handgrade($part) eq 'yes') { |
|
$handgradeable=1; |
|
last; |
|
} |
|
} |
|
} else { |
|
foreach my $part (@$partlist) { |
|
my @types = $resource->responseType($part); |
|
if (grep(/^essay$/,@types)) { |
|
$handgradeable=1; |
|
last; |
|
} elsif (grep(/^custom$/,@types)) { |
|
if ($resource->handgrade($part) eq 'yes') { |
|
$handgradeable=1; |
|
last; |
|
} |
|
} |
} |
} |
} |
} |
if ($handgradeable) { |
if ($handgradeable) { |
Line 1135 sub check_handgraded {
|
Line 1158 sub check_handgraded {
|
if (@ungraded > 0) { |
if (@ungraded > 0) { |
$$ungraded{$symb}{count} = scalar(@ungraded); |
$$ungraded{$symb}{count} = scalar(@ungraded); |
$$ungraded{$symb}{title} = $title; |
$$ungraded{$symb}{title} = $title; |
|
$$ungraded{$symb}{is_task} = $is_task; |
if ($resource->encrypted()) { |
if ($resource->encrypted()) { |
$$ungraded{$symb}{'enclink'} = $resource->link(); |
$$ungraded{$symb}{'enclink'} = $resource->link(); |
$$ungraded{$symb}{'encsymb'} = $resource->shown_symb(); |
$$ungraded{$symb}{'encsymb'} = $resource->shown_symb(); |
Line 1231 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 1800 sub display_handgrade {
|
Line 1826 sub display_handgrade {
|
foreach my $res (@{$tograde}) { |
foreach my $res (@{$tograde}) { |
$rowNum ++; |
$rowNum ++; |
my $css_class = $rowNum%2?' class="LC_odd_row"':''; |
my $css_class = $rowNum%2?' class="LC_odd_row"':''; |
my $linkurl='/adm/grades'; |
my $linkurl; |
if ($$ungraded{$res}{'enclink'}) { |
if ($$ungraded{$res}{'is_task'}) { |
$linkurl.='?symb='.$$ungraded{$res}{'encsymb'}; |
my ($map,$id,$url)=&Apache::lonnet::decode_symb($res); |
|
$linkurl=&Apache::lonnet::clutter($url); |
|
$linkurl .= '?symb='.&escape($res); |
|
if ($$ungraded{$res}{'enclink'}) { |
|
$linkurl = |
|
$$ungraded{$res}{'enclink'}.'?symb='.$$ungraded{$res}{'encsymb'}; |
|
} |
} else { |
} else { |
$linkurl.='?symb='.&escape($res); |
$linkurl='/adm/grades'; |
|
if ($$ungraded{$res}{'enclink'}) { |
|
$linkurl.='?symb='.$$ungraded{$res}{'encsymb'}; |
|
} else { |
|
$linkurl.='?symb='.&escape($res); |
|
} |
|
$linkurl.='&command=ungraded'; |
} |
} |
$linkurl.='&command=ungraded'; |
|
$r->print('<tr'.$css_class.'><td><a href="'.$linkurl.'">'.$$ungraded{$res}{title}.'</a></td><td class="LC_right_item">'.$$ungraded{$res}{count}.'</td></tr>'); |
$r->print('<tr'.$css_class.'><td><a href="'.$linkurl.'">'.$$ungraded{$res}{title}.'</a></td><td class="LC_right_item">'.$$ungraded{$res}{count}.'</td></tr>'); |
} |
} |
} elsif ($itemserror) { |
} elsif ($itemserror) { |