--- loncom/interface/lonwhatsnew.pm 2020/09/01 22:30:58 1.105.2.18 +++ loncom/interface/lonwhatsnew.pm 2024/09/11 05:20:52 1.130 @@ -1,7 +1,7 @@ # The LearningOnline Network # What's New in a course # -# $Id: lonwhatsnew.pm,v 1.105.2.18 2020/09/01 22:30:58 raeburn Exp $ +# $Id: lonwhatsnew.pm,v 1.130 2024/09/11 05:20:52 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -82,7 +82,7 @@ sub handler { } unless ($isadhoc) { %checkallowed = ( coursenormalmail => 1, - coursecritmail => 1,); + coursecritmail => 1,); } foreach my $perm_check (['whn','whatsnew',1], ['pch','coursediscussion',1], @@ -769,13 +769,18 @@ sub display_threshold_config { my $onchange = 'onfocus="javascript:window.document.forms'. "['thresholdform'].elements['".$parameter."_setparmval']". '.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". ''.$threshold_titles{$type}.''."\n". ''.&Apache::lonhtmlcommon::textbox($parameter.'_value', $threshold{$type}, - 10,$onchange).''."\n". + 10,$onchange.$aria_textbox).''."\n". ''. - &Apache::lonhtmlcommon::checkbox($parameter.'_setparmval'). + &Apache::lonhtmlcommon::checkbox($parameter.'_setparmval', + '','',$aria_checkbox). ''."\n". &Apache::loncommon::end_data_table_row()); } @@ -829,7 +834,7 @@ sub display_interval_config { '. &mt('Display:').' - '); if (ref($interval_titles) eq 'HASH') { @@ -1139,6 +1144,11 @@ sub check_handgraded { if (grep(/^essay$/,@types)) { $handgradeable=1; last; + } elsif (grep(/^custom$/,@types)) { + if ($resource->handgrade($part) eq 'yes') { + $handgradeable=1; + last; + } } } } @@ -1245,8 +1255,10 @@ sub check_thresholds { '.$stats{$part}{degdiff}.' '.$lastreset{$part}.''; if ($checkallowed->{'resetcounters'}) { + my $aria = ' aria-label="'.&mt('Reset counter for [_1] (part [_2])', + $$triggered{$symb}{title},$part).'"'; $$triggered{$symb}{text}[$partcount] .= - ''. + ''. ''; } $partcount ++; @@ -1404,7 +1416,7 @@ sub getnormalmail { if (defined($sendtime) && $sendtime!~/error/) { if (($emailstatus{$msgid} eq 'new') || ($status eq 'new')) { $sendtime = &Apache::lonlocal::locallocaltime($sendtime); - $msgcount ++; + $msgcount ++; if ($shortsubj eq '') { $shortsubj = &mt('No subject'); } @@ -2140,7 +2152,7 @@ sub display_activity { } return; } - + sub display_coursediscussion { my ($r,$newdiscussions,$unread,$countunread,$res_title,$itemserror) = @_; my $lctype = lc(&Apache::loncommon::course_type()); @@ -2170,7 +2182,7 @@ sub display_coursediscussion { my $forum_title = $$unread{$ressymb}{'title'}; my $type = 'Resource'; 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/) { $type = 'Discussion Board'; }