version 1.131, 2025/03/22 20:34:49
|
version 1.132, 2025/03/22 21:18:30
|
Line 216 sub display_main_box {
|
Line 216 sub display_main_box {
|
my $domain=&Apache::loncommon::determinedomain(); |
my $domain=&Apache::loncommon::determinedomain(); |
my $function = &Apache::loncommon::get_users_function(); |
my $function = &Apache::loncommon::get_users_function(); |
my $lctype = lc(&Apache::loncommon::course_type()); |
my $lctype = lc(&Apache::loncommon::course_type()); |
$r->print('<table width="100%" border="0" cellpadding="5" cellspacing="0"><tr><td width="100%">'); |
|
|
|
my %threshold_titles = &Apache::lonlocal::texthash ( |
my %threshold_titles = &Apache::lonlocal::texthash ( |
av_attempts => 'Average number of attempts', |
av_attempts => 'Average number of attempts', |
Line 267 sub display_main_box {
|
Line 266 sub display_main_box {
|
userpref => 'your general user preferences', |
userpref => 'your general user preferences', |
coursespecific => "specific setting for this $lctype", |
coursespecific => "specific setting for this $lctype", |
); |
); |
|
$r->print('<div class="LC_landmark" role="main">'); |
|
|
if (($command eq 'chgthreshold') |
if (($command eq 'chgthreshold') |
&& $checkallowed->{'abovethreshold'}) { |
&& $checkallowed->{'abovethreshold'}) { |
Line 297 sub display_main_box {
|
Line 297 sub display_main_box {
|
$checkallowed,$store_error); |
$checkallowed,$store_error); |
} |
} |
my $end_page = &Apache::loncommon::end_page(); |
my $end_page = &Apache::loncommon::end_page(); |
$r->print(<<END_OF_BLOCK); |
$r->print('<br /></div>'.$end_page); |
</td> |
|
</tr> |
|
</table><br /> |
|
$end_page |
|
END_OF_BLOCK |
|
} |
} |
|
|
#------------------------------- |
#------------------------------- |
Line 759 END
|
Line 754 END
|
} |
} |
} |
} |
|
|
$r->print('<input type="hidden" name="refpage" value="'.$refpage.'" /><table class="LC_double_column"><tr><td class="LC_left_col">'); |
$r->print('<input type="hidden" name="refpage" value="'.$refpage.'" />'."\n". |
|
'<div class=" LC_landmark" style="clear: both; width: 100%">'."\n". |
|
'<div class="LC_floatleft LC_landmark" style="width: 48%">'); |
|
|
my $displayed = 0; |
my $displayed = 0; |
my $totalboxes = 0; |
my $totalboxes = 0; |
Line 775 END
|
Line 772 END
|
foreach my $actionitem (@actionorder) { |
foreach my $actionitem (@actionorder) { |
if ($checkallowed->{$actionitem}) { |
if ($checkallowed->{$actionitem}) { |
if (($actioncolumn{$actionitem} eq 'right') && ($currcolumn eq 'left')) { |
if (($actioncolumn{$actionitem} eq 'right') && ($currcolumn eq 'left')) { |
$r->print('</td><td> </td><td class="LC_right_col" >'); |
$r->print('</div><div class="LC_floatright LC_landmark" style="width: 48%">'); |
$currcolumn = 'right'; |
$currcolumn = 'right'; |
} |
} |
&display_launcher($r,$actionitem,$refpage,$checkallowed,\%show,\%headings,\%res_title,\@tograde,\%ungraded,\@bombs,\%bombed,\%changed,\@warnings,\%triggered,\@newdiscussions,\%unread,$msgcount,\@newmsgs,$critmsgcount,\@critmsgs,\%interval,$countunread,\%expired,$expirecount,\%activated,$activecount,$crstype,$itemserror,\%loggedin,$logincount,\%sessions,$sessioncount,$classlist); |
&display_launcher($r,$actionitem,$refpage,$checkallowed,\%show,\%headings,\%res_title,\@tograde,\%ungraded,\@bombs,\%bombed,\%changed,\@warnings,\%triggered,\@newdiscussions,\%unread,$msgcount,\@newmsgs,$critmsgcount,\@critmsgs,\%interval,$countunread,\%expired,$expirecount,\%activated,$activecount,$crstype,$itemserror,\%loggedin,$logincount,\%sessions,$sessioncount,$classlist); |
$displayed ++; |
$displayed ++; |
} |
} |
} |
} |
$r->print(' |
$r->print('</div></div><div style="padding:0;clear:both;margin:0;border:0"></div> |
</td> |
|
</tr> |
|
</table> |
|
</form> |
</form> |
'); |
'); |
} |
} |
Line 1881 sub display_handgrade {
|
Line 1875 sub display_handgrade {
|
'nopr' => 'No problems require handgrading', |
'nopr' => 'No problems require handgrading', |
); |
); |
if (@{$tograde} > 0) { |
if (@{$tograde} > 0) { |
$r->print('<tr class="LC_info_row"><td class="LC_left_item">'. |
$r->print('<tr class="LC_info_row"><th class="LC_left_item">'. |
$lt{'prna'}.'</td><td class="LC_right_item">'. |
$lt{'prna'}.'</th><th class="LC_right_item">'. |
$lt{'nmun'}.'</td></tr>'); |
$lt{'nmun'}.'</th></tr>'); |
my $rowNum = 0; |
my $rowNum = 0; |
|
my $usediv; |
|
if (@{$tograde} > 1) { |
|
$usediv = 1; |
|
} |
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"':''; |
Line 1906 sub display_handgrade {
|
Line 1904 sub display_handgrade {
|
} |
} |
$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>'); |
|
if ($usediv) { |
|
$r->print('<div class="LC_minheight">'); |
|
} |
|
$r->print('<a href="'.$linkurl.'">'.$$ungraded{$res}{title}.'</a>'); |
|
if ($usediv) { |
|
$r->print('</div>'); |
|
} |
|
$r->print('</td>'. |
|
'<td class="LC_right_item">'.$$ungraded{$res}{count}.'</td></tr>'); |
} |
} |
} elsif ($itemserror) { |
} elsif ($itemserror) { |
$r->print('<tr class="LC_empty_row"><td>'.$itemserror.'</td></tr>'); |
$r->print('<tr class="LC_empty_row"><th>'.$itemserror.'</th></tr>'); |
} else { |
} else { |
$r->print('<tr class="LC_empty_row"><td>'.$lt{'nopr'}.'</td></tr>'); |
$r->print('<tr class="LC_empty_row"><th>'.$lt{'nopr'}.'</th></tr>'); |
} |
} |
} |
} |
|
|
Line 1924 sub display_haserrors {
|
Line 1931 sub display_haserrors {
|
noer => 'No problems with errors', |
noer => 'No problems with errors', |
); |
); |
if (@{$bombs} > 0) { |
if (@{$bombs} > 0) { |
$r->print('<tr class="LC_info_row"><td class="LC_left_item">'. |
$r->print('<tr class="LC_info_row"><th class="LC_left_item">'. |
$lt{'reso'}.'</td><td class="LC_right_item">'. |
$lt{'reso'}.'</th><th class="LC_right_item">'. |
$lt{'nmer'}.'</td></tr>'); |
$lt{'nmer'}.'</th></tr>'); |
@{$bombs} = sort { &cmp_title($a,$b,$res_title) } @{$bombs}; |
@{$bombs} = sort { &cmp_title($a,$b,$res_title) } @{$bombs}; |
|
my $usediv; |
|
if (@{$bombs} > 1) { |
|
$usediv = 1; |
|
} |
foreach my $bomb (@{$bombs}) { |
foreach my $bomb (@{$bombs}) { |
$bombnum ++; |
$bombnum ++; |
my $css_class = $bombnum%2?' class="LC_odd_row"':''; |
my $css_class = $bombnum%2?' class="LC_odd_row"':''; |
$r->print('<tr'.$css_class.'><td>'.$$bombed{$bomb}{errorlink}. |
$r->print('<tr'.$css_class.'><td style="vertical-align:middle;">'); |
'</td><td class="LC_right_item">'. |
if ($usediv) { |
|
$r->print('<div class="LC_minheight">'); |
|
} |
|
$r->print($$bombed{$bomb}{errorlink}); |
|
if ($usediv) { |
|
$r->print('</div>'); |
|
} |
|
$r->print('</td><td class="LC_right_item" style="vertical-align:middle;">'. |
$$bombed{$bomb}{errorcount}.'</td></tr>'); |
$$bombed{$bomb}{errorcount}.'</td></tr>'); |
} |
} |
} elsif ($itemserror) { |
} elsif ($itemserror) { |
$r->print('<tr class="LC_empty_row"><td>'.$itemserror.'</td></tr>'); |
$r->print('<tr class="LC_empty_row"><th>'.$itemserror.'</th></tr>'); |
} else { |
} else { |
$r->print('<tr class="LC_empty_row"><td>'.$lt{'noer'}.'</td></tr>'); |
$r->print('<tr class="LC_empty_row"><th>'.$lt{'noer'}.'</th></tr>'); |
} |
} |
return; |
return; |
} |
} |
Line 1959 sub display_abovethreshold {
|
Line 1977 sub display_abovethreshold {
|
if (@{$warnings} > 0) { |
if (@{$warnings} > 0) { |
@{$warnings} = sort { &cmp_title($a,$b,$res_title) } @{$warnings}; |
@{$warnings} = sort { &cmp_title($a,$b,$res_title) } @{$warnings}; |
$r->print('<tr class="LC_info_row">'. |
$r->print('<tr class="LC_info_row">'. |
'<td class="LC_left_item">'.$lt{'reso'}. |
'<th class="LC_left_item">'.$lt{'reso'}. |
'<input type="hidden" name="command" value="" /></td>'. |
'<input type="hidden" name="command" value="" /></th>'. |
'<td>'.$lt{'part'}.'</td><td>'.$lt{'nust'}.'</td>'. |
'<th>'.$lt{'part'}.'</th><th>'.$lt{'nust'}.'</th>'. |
'<td>'.$lt{'avat'}.'</td><td>'.$lt{'dedi'}.'</td>'. |
'<th>'.$lt{'avat'}.'</th><th>'.$lt{'dedi'}.'</th>'. |
'<td>'.$lt{'lare'}.'</td>'); |
'<th>'.$lt{'lare'}.'</th>'); |
if ($checkallowed->{'resetcounters'}) { |
if ($checkallowed->{'resetcounters'}) { |
$r->print('<td class="LC_right_item">'.$lt{'reco'}.'</td>'); |
$r->print('<th class="LC_right_item">'.$lt{'reco'}.'</th>'); |
} |
} |
$r->print('</tr>'); |
$r->print('</tr>'); |
my $row; |
my ($usediv,$row); |
|
if (@{$warnings} > 1) { |
|
$usediv = 1; |
|
} |
foreach my $res (@{$warnings}) { |
foreach my $res (@{$warnings}) { |
$row++; |
$row++; |
my ($map,$id,$url)=&Apache::lonnet::decode_symb($res); |
my ($map,$id,$url)=&Apache::lonnet::decode_symb($res); |
Line 1984 sub display_abovethreshold {
|
Line 2005 sub display_abovethreshold {
|
} |
} |
my $css_class = $row%2?' class="LC_odd_row"':''; |
my $css_class = $row%2?' class="LC_odd_row"':''; |
$r->print('<tr'.$css_class.'>'. |
$r->print('<tr'.$css_class.'>'. |
'<td class="LC_first_item" '.$rowspan.'><a href="'.$linkurl.'">'. |
'<td class="LC_first_item" '.$rowspan.'>'); |
$$triggered{$res}{title}.'</a></td>'); |
if ($usediv) { |
|
$r->print('<div class="LC_minheight">'); |
|
} |
|
$r->print('<a href="'.$linkurl.'">'. |
|
$$triggered{$res}{title}.'</a>'); |
|
if ($usediv) { |
|
$r->print('</div>'); |
|
} |
|
$r->print('</td>'); |
if (ref($$triggered{$res}{text}) eq 'ARRAY') { |
if (ref($$triggered{$res}{text}) eq 'ARRAY') { |
$r->print($$triggered{$res}{text}[0]); |
$r->print($$triggered{$res}{text}[0]); |
} |
} |
$r->print('</tr>'); |
$r->print('</tr>'); |
if (ref($$triggered{$res}{text}) eq 'ARRAY') { |
if (ref($$triggered{$res}{text}) eq 'ARRAY') { |
Line 2003 sub display_abovethreshold {
|
Line 2032 sub display_abovethreshold {
|
$r->print('<tr class="LC_info_row"><td colspan="7" class="LC_right_item"><br /><input type="button" name="counters" value="'.$lt{'rese'}.'" onclick="javascript:thresholdreset();" /></td></tr>'); |
$r->print('<tr class="LC_info_row"><td colspan="7" class="LC_right_item"><br /><input type="button" name="counters" value="'.$lt{'rese'}.'" onclick="javascript:thresholdreset();" /></td></tr>'); |
} |
} |
} elsif ($itemserror) { |
} elsif ($itemserror) { |
$r->print('<tr class="LC_empty_row"><td>'.$itemserror.'</td></tr>'); |
$r->print('<tr class="LC_empty_row"><th>'.$itemserror.'</th></tr>'); |
} else { |
} else { |
$r->print('<tr class="LC_empty_row"><td>'.$lt{'nopr'}.'</td></tr>'); |
$r->print('<tr class="LC_empty_row"><th>'.$lt{'nopr'}.'</th></tr>'); |
} |
} |
} |
} |
|
|
Line 2018 sub display_versionchanges {
|
Line 2047 sub display_versionchanges {
|
'veru' => 'Version used', |
'veru' => 'Version used', |
); |
); |
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">'. |
$lt{'reso'}.'</td><td>'.$lt{'revd'}.'</td><td>'. |
'<th class="LC_left_item LC_nobreak">'.$lt{'reso'}.'</th>'. |
$lt{'newv'}.'</td><td class="LC_right_item">'. |
'<th class="LC_left_item LC_nobreak">'.$lt{'revd'}.'</th>'. |
$lt{'veru'}.'</td></tr>'); |
'<th class="LC_left_item LC_nobreak">'.$lt{'newv'}.'</th>'. |
|
'<th class="LC_left_item LC_nobreak">'.$lt{'veru'}.'</th>'. |
|
'</tr>'); |
my @changes = sort { &cmp_title($a,$b,$res_title) } keys(%{$changed}); |
my @changes = sort { &cmp_title($a,$b,$res_title) } keys(%{$changed}); |
my $changenum = 0; |
my $changenum = 0; |
|
my $usediv; |
|
if (@changes > 1) { |
|
$usediv = 1; |
|
} |
foreach my $item (@changes) { |
foreach my $item (@changes) { |
$changenum ++; |
$changenum ++; |
my $css_class = $changenum%2?' class="LC_odd_row"':''; |
my $css_class = $changenum%2?' class="LC_odd_row"':''; |
Line 2031 sub display_versionchanges {
|
Line 2066 sub display_versionchanges {
|
my $linkurl=&Apache::lonnet::clutter($url); |
my $linkurl=&Apache::lonnet::clutter($url); |
$linkurl .= '?symb='.&escape($item); |
$linkurl .= '?symb='.&escape($item); |
|
|
$r->print('<tr'.$css_class.'><td><a href="'.$linkurl.'">'. |
$r->print('<tr'.$css_class.'><td>'); |
$$res_title{$item}.'</a></td><td>'. |
if ($usediv) { |
|
$r->print('<div class="LC_minheight">'); |
|
} |
|
$r->print('<a href="'.$linkurl.'">'. |
|
$$res_title{$item}.'</a>'); |
|
if ($usediv) { |
|
$r->print('</div>'); |
|
} |
|
$r->print('</td><td>'. |
$$changed{$item}{'revdate'}.'</td><td>'. |
$$changed{$item}{'revdate'}.'</td><td>'. |
$$changed{$item}{'current'}.'</td><td>'. |
$$changed{$item}{'current'}.'</td><td>'. |
$$changed{$item}{'version'}.'</td></tr>'); |
$$changed{$item}{'version'}.'</td></tr>'); |
} |
} |
} elsif ($itemserror) { |
} elsif ($itemserror) { |
$r->print('<tr class="LC_empty_row"><td>'.$itemserror.'</td></tr>'); |
$r->print('<tr class="LC_empty_row"><th>'.$itemserror.'</th></tr>'); |
} else { |
} else { |
$r->print('<tr class="LC_empty_row"><td>' |
$r->print('<tr class="LC_empty_row"><th>' |
.&mt('No '.$interval).'</td></tr>'); |
.&mt('No '.$interval).'</th></tr>'); |
} |
} |
return; |
return; |
} |
} |
Line 2058 sub display_rolechanges {
|
Line 2101 sub display_rolechanges {
|
); |
); |
if ($chgcount) { |
if ($chgcount) { |
$r->print('<tr class="LC_info_row">'. |
$r->print('<tr class="LC_info_row">'. |
'<td class="LC_left_item">'.$lt{'tich'}.'</td>'. |
'<th class="LC_left_item">'.$lt{'tich'}.'</th>'. |
'<td class="LC_left_item">'.$lt{'user'}.'</td>'. |
'<th class="LC_left_item">'.$lt{'user'}.'</th>'. |
'<td class="LC_left_item">'.$lt{'role'}.'</td>'. |
'<th class="LC_left_item">'.$lt{'role'}.'</th>'. |
'<td class="LC_left_item">'.$lt{'sec'}.'</td>'. |
'<th class="LC_left_item">'.$lt{'sec'}.'</th>'. |
'<td class="LC_left_item">'.$lt{'status'}.'</td></tr>'); |
'<th class="LC_left_item">'.$lt{'status'}.'</th></tr>'); |
if (ref($changed) eq 'HASH') { |
if (ref($changed) eq 'HASH') { |
my @changes = sort { $b <=> $a } (keys(%{$changed})); |
my @changes = sort { $b <=> $a } (keys(%{$changed})); |
my $changenum = 0; |
my $changenum = 0; |
my $fullnameidx = &Apache::loncoursedata::CL_FULLNAME(); |
my $fullnameidx = &Apache::loncoursedata::CL_FULLNAME(); |
|
my $usediv; |
|
if ($chgcount > 1) { |
|
$usediv = 1; |
|
} |
foreach my $item (@changes) { |
foreach my $item (@changes) { |
if (ref($changed->{$item}) eq 'ARRAY') { |
if (ref($changed->{$item}) eq 'ARRAY') { |
foreach my $chg (@{$changed->{$item}}) { |
foreach my $chg (@{$changed->{$item}}) { |
Line 2094 sub display_rolechanges {
|
Line 2141 sub display_rolechanges {
|
&Apache::loncommon::aboutmewrapper($fullname,$uname,$udom); |
&Apache::loncommon::aboutmewrapper($fullname,$uname,$udom); |
$r->print('<tr'.$css_class.'>'. |
$r->print('<tr'.$css_class.'>'. |
'<td>'.&Apache::lonlocal::locallocaltime($item).'</td>'. |
'<td>'.&Apache::lonlocal::locallocaltime($item).'</td>'. |
'<td>'.$link.'</td>'. |
'<td>'); |
|
if ($usediv) { |
|
$r->print('<div class="LC_minheight">'); |
|
} |
|
$r->print($link); |
|
if ($usediv) { |
|
$r->print('</div>'); |
|
} |
|
$r->print('</td>'. |
'<td>'.$role.'</td>'. |
'<td>'.$role.'</td>'. |
'<td>'.$section.'</td>'. |
'<td>'.$section.'</td>'. |
'<td>'.$status.'</td></tr>'); |
'<td>'.$status.'</td></tr>'); |
Line 2104 sub display_rolechanges {
|
Line 2159 sub display_rolechanges {
|
} |
} |
} |
} |
} else { |
} else { |
$r->print('<tr class="LC_empty_row"><td>' |
$r->print('<tr class="LC_empty_row"><th>' |
.&mt('There are no '.$interval).'</td></tr>'); |
.&mt('There are no '.$interval).'</th></tr>'); |
} |
} |
return; |
return; |
} |
} |
Line 2128 sub display_activity {
|
Line 2183 sub display_activity {
|
if ($count) { |
if ($count) { |
|
|
my $hdr = '<tr class="LC_info_row" style="display:none" id="'.$prefix.'titledet">'. |
my $hdr = '<tr class="LC_info_row" style="display:none" id="'.$prefix.'titledet">'. |
'<td class="LC_left_item">'.$lt{'user'}.'</td>'. |
'<th class="LC_left_item">'.$lt{'user'}.'</th>'. |
'<td class="LC_left_item">'.$lt{'role'}.'</td>'. |
'<th class="LC_left_item">'.$lt{'role'}.'</th>'. |
'<td class="LC_left_item">'.$lt{'sec'}.'</td>'; |
'<th class="LC_left_item">'.$lt{'sec'}.'</th>'; |
if ($context eq 'sessions') { |
if ($context eq 'sessions') { |
$hdr .= '<td class="LC_left_item">'.$lt{'active'}.'</td>'; |
$hdr .= '<th class="LC_left_item">'.$lt{'active'}.'</th>'; |
} |
} |
$hdr .= '</tr>'."\n". |
$hdr .= '</tr>'."\n". |
'<tr class="LC_info_row" id="'.$prefix.'titlesum">'. |
'<tr class="LC_info_row" id="'.$prefix.'titlesum">'. |
'<td class="LC_left_item">'.$lt{'number'}.'</td>'. |
'<th class="LC_left_item">'.$lt{'number'}.'</th>'. |
'<td class="LC_left_item">'.$lt{'role'}.'</td>'. |
'<th class="LC_left_item">'.$lt{'role'}.'</th>'. |
'<td class="LC_left_item">'.$lt{'sec'}; |
'<th class="LC_left_item">'.$lt{'sec'}; |
my (%bylastname,%counts); |
my (%bylastname,%counts); |
if (ref($details) eq 'HASH') { |
if (ref($details) eq 'HASH') { |
my @items = sort { $b <=> $a } (keys(%{$details})); |
my @items = sort { $b <=> $a } (keys(%{$details})); |
my $num = 0; |
my $num = 0; |
my $fullnameidx = &Apache::loncoursedata::CL_FULLNAME(); |
my $fullnameidx = &Apache::loncoursedata::CL_FULLNAME(); |
|
my $usediv; |
|
if ($count > 1) { |
|
$usediv = 1; |
|
} |
foreach my $item (@items) { |
foreach my $item (@items) { |
if (ref($details->{$item}) eq 'ARRAY') { |
if (ref($details->{$item}) eq 'ARRAY') { |
foreach my $user (@{$details->{$item}}) { |
foreach my $user (@{$details->{$item}}) { |
Line 2167 sub display_activity {
|
Line 2226 sub display_activity {
|
} |
} |
my $link = |
my $link = |
&Apache::loncommon::aboutmewrapper($fullname,$uname,$udom); |
&Apache::loncommon::aboutmewrapper($fullname,$uname,$udom); |
my $entry = '<td>'.$link.'</td>'. |
my $entry = '<td>'; |
'<td>'.$role.'</td>'. |
if ($usediv) { |
'<td>'.$section.'</td>'; |
$entry .= '<div class="LC_minheight">'; |
|
} |
|
$entry .= $link; |
|
if ($usediv) { |
|
$entry .= '</div>'; |
|
} |
|
$entry .= '</td>'. |
|
'<td>'.$role.'</td>'. |
|
'<td>'.$section.'</td>'; |
if ($context eq 'sessions') { |
if ($context eq 'sessions') { |
$entry .= '<td>'.&Apache::lonlocal::locallocaltime($item).'</td>'; |
$entry .= '<td>'.&Apache::lonlocal::locallocaltime($item).'</td>'; |
} |
} |
Line 2204 sub display_activity {
|
Line 2271 sub display_activity {
|
} |
} |
$r->print($hdr.'<input type="hidden" name="'.$prefix.'count" value="'.$num. |
$r->print($hdr.'<input type="hidden" name="'.$prefix.'count" value="'.$num. |
'" /><input type="hidden" name="'.$prefix.'row" value="'.$numrow. |
'" /><input type="hidden" name="'.$prefix.'row" value="'.$numrow. |
'" /></td></tr>'.$table); |
'" /></th></tr>'.$table); |
} |
} |
} else { |
} else { |
$r->print('<tr class="LC_empty_row"><td>'. |
$r->print('<tr class="LC_empty_row"><th>'. |
&mt('There are no '.$interval). |
&mt('There are no '.$interval). |
'<input type="hidden" name="'.$prefix.'count" value="'.$count. |
'<input type="hidden" name="'.$prefix.'count" value="'.$count. |
'." /></td></tr>'); |
'." /></th></tr>'); |
} |
} |
return; |
return; |
} |
} |
Line 2221 sub display_coursediscussion {
|
Line 2288 sub display_coursediscussion {
|
my %lt = &Apache::lonlocal::texthash( |
my %lt = &Apache::lonlocal::texthash( |
'loca' => 'Location', |
'loca' => 'Location', |
'type' => 'Type', |
'type' => 'Type', |
'numn' => 'Number of new posts', |
'numn' => 'New posts', |
'noun' => 'No unread posts in '.$lctype.' discussions', |
'noun' => 'No unread posts in '.$lctype.' discussions', |
'tmlp' => 'Time of last post', |
'tmlp' => 'Time of last post', |
); |
); |
if (@{$newdiscussions} > 0) { |
if (@{$newdiscussions} > 0) { |
$r->print('<tr class="LC_info_row"><td class="LC_left_item">'. |
$r->print('<tr class="LC_info_row">'. |
$lt{'loca'}.'</td><td>'. |
'<th class="LC_left_item LC_nobreak">'.$lt{'loca'}.'</th>'. |
$lt{'type'}.'</td>'); |
'<th class="LC_left_item LC_nobreak">'.$lt{'type'}.'</th>'); |
if ($countunread eq 'on') { |
if ($countunread eq 'on') { |
$r->print('<td>'.$lt{'tmlp'}.'</td>'. |
$r->print('<th class="LC_left_item LC_nobreak">'.$lt{'tmlp'}.'</th>'. |
'<td class="LC_right_item">'.$lt{'numn'}.'</td>'); |
'<th class="LC_left_item LC_nobreak">'.$lt{'numn'}.'</th>'); |
} else { |
} else { |
$r->print('<td class="LC_right_item">'.$lt{'tmlp'}.'</td>'); |
$r->print('<th class="LC_left_item">'.$lt{'tmlp'}.'</th>'); |
} |
} |
$r->print("</tr>\n"); |
$r->print("</tr>\n"); |
@{$newdiscussions} = sort { &cmp_title($a,$b,$res_title) } |
@{$newdiscussions} = sort { &cmp_title($a,$b,$res_title) } |
@{$newdiscussions}; |
@{$newdiscussions}; |
my $rowNum = 0; |
my $rowNum = 0; |
|
my $usediv; |
|
if (@{$newdiscussions} > 1) { |
|
$usediv = 1; |
|
} |
foreach my $ressymb (@{$newdiscussions}) { |
foreach my $ressymb (@{$newdiscussions}) { |
$rowNum ++; |
$rowNum ++; |
my $forum_title = $$unread{$ressymb}{'title'}; |
my $forum_title = $$unread{$ressymb}{'title'}; |
Line 2254 sub display_coursediscussion {
|
Line 2325 sub display_coursediscussion {
|
my $css_class = $rowNum%2?' class="LC_odd_row"':''; |
my $css_class = $rowNum%2?' class="LC_odd_row"':''; |
my $lastpost = &Apache::lonnavmaps::timeToHumanString( |
my $lastpost = &Apache::lonnavmaps::timeToHumanString( |
$$unread{$ressymb}{'lastpost'}); |
$$unread{$ressymb}{'lastpost'}); |
$r->print('<tr'.$css_class.'><td><a href="'.$disclink.'">'.$forum_title.'</a> </td><td>'.&mt($type).' </td>'); |
$r->print('<tr'.$css_class.'><td>'); |
|
if ($usediv) { |
|
$r->print('<div class="LC_minheight">'); |
|
} |
|
$r->print('<a href="'.$disclink.'">'.$forum_title.'</a> '); |
|
if ($usediv) { |
|
$r->print('</div>'); |
|
} |
|
$r->print('</td>'. |
|
'<td>'.&mt($type).' </td>'); |
if ($countunread eq 'on') { |
if ($countunread eq 'on') { |
my $unreadnum = $$unread{$ressymb}{'unreadcount'}; |
my $unreadnum = $$unread{$ressymb}{'unreadcount'}; |
$r->print('<td>'.$lastpost.'</td><td class="LC_right_item">'. |
$r->print('<td>'.$lastpost.'</td><td class="LC_left_item">'. |
$unreadnum.' </td>'); |
$unreadnum.'</td>'); |
} else { |
} else { |
$r->print('<td class="LC_right_item">'.$lastpost.'</td>'); |
$r->print('<td class="LC_left_item">'.$lastpost.'</td>'); |
} |
} |
$r->print("</tr>\n"); |
$r->print("</tr>\n"); |
} |
} |
} elsif ($itemserror) { |
} elsif ($itemserror) { |
$r->print('<tr class="LC_empty_row"><td>'.$itemserror.'</td></tr>'); |
$r->print('<tr class="LC_empty_row"><th>'.$itemserror.'</th></tr>'); |
} else { |
} else { |
$r->print('<tr class="LC_empty_row"><td>'.$lt{'noun'}.'</td></tr>'); |
$r->print('<tr class="LC_empty_row"><th>'.$lt{'noun'}.'</th></tr>'); |
} |
} |
} |
} |
|
|
Line 2275 sub display_coursenormalmail {
|
Line 2355 sub display_coursenormalmail {
|
my ($r,$msgcount,$newmsgs) = @_; |
my ($r,$msgcount,$newmsgs) = @_; |
my $lctype = lc(&Apache::loncommon::course_type()); |
my $lctype = lc(&Apache::loncommon::course_type()); |
if ($msgcount > 0) { |
if ($msgcount > 0) { |
$r->print('<tr class="LC_info_row"><td class="LC_left_item">'. |
$r->print('<tr class="LC_info_row"><th class="LC_left_item">'. |
&mt('Number').'</td><td>'.&mt('Subject').'</td><td>'. |
&mt('Number').' </th><th class="LC_left_item">'. |
&mt('Sender').'</td><td class="LC_right_item">'. |
&mt('Subject').'</th><th class="LC_left_item">'. |
&mt('Date/Time').'</td></tr>'); |
&mt('Sender').'</th><th class="LC_left_item">'. |
|
&mt('Date/Time').'</th></tr>'); |
my $mailcount = 0; |
my $mailcount = 0; |
|
my $usediv; |
|
if (@{$newmsgs}) { |
|
$usediv = 1; |
|
} |
foreach my $msg (@{$newmsgs}) { |
foreach my $msg (@{$newmsgs}) { |
$mailcount ++; |
$mailcount ++; |
my $css_class = $mailcount%2?' class="LC_odd_row"':''; |
my $css_class = $mailcount%2?' class="LC_odd_row"':''; |
$r->print('<tr'.$css_class.'><td>'.$mailcount |
$r->print('<tr'.$css_class.'><td>'.$mailcount |
.'. </td><td><a href="/adm/email?display=' |
.'. </td><td>'); |
|
if ($usediv) { |
|
$r->print('<div class="LC_minheight">'); |
|
} |
|
$r->print('<a href="/adm/email?display=' |
.$msg->{'msgid'}.'">' |
.$msg->{'msgid'}.'">' |
.$msg->{'shortsub'}.'</a> </td><td> ' |
.$msg->{'shortsub'}.'</a> '); |
.$msg->{'from'}.':'.$msg->{'fromdom'}.' </td><td>' |
if ($usediv) { |
|
$r->print('</div>'); |
|
} |
|
$r->print('</td><td>' |
|
.$msg->{'from'}.':'.$msg->{'fromdom'}.' </td><td>' |
.$msg->{'sendtime'}.'</td></tr>'); |
.$msg->{'sendtime'}.'</td></tr>'); |
} |
} |
} else { |
} else { |
$r->print('<tr class="LC_empty_row"><td>'. |
$r->print('<tr class="LC_empty_row"><th>'. |
&mt('No new '.$lctype.' messages').'</td></tr>'); |
&mt('No new '.$lctype.' messages').'</th></tr>'); |
} |
} |
} |
} |
|
|
Line 2300 sub display_coursecritmail {
|
Line 2393 sub display_coursecritmail {
|
my ($r,$critmsgcount,$critmsgs) = @_; |
my ($r,$critmsgcount,$critmsgs) = @_; |
my $lctype = lc(&Apache::loncommon::course_type()); |
my $lctype = lc(&Apache::loncommon::course_type()); |
if ($critmsgcount > 0) { |
if ($critmsgcount > 0) { |
$r->print('<tr class="LC_info_row"><td class="LC_left_item">'. |
$r->print('<tr class="LC_info_row"><th class="LC_left_item">'. |
&mt('Number').'</td><td>'.&mt('Subject').'</td><td>'. |
&mt('Number').'</th><th>'.&mt('Subject').'</th><th>'. |
&mt('Sender').'</td><td class="LC_right_item">'. |
&mt('Sender').'</th><th class="LC_right_item">'. |
&mt('Date/Time').'</td></tr>'); |
&mt('Date/Time').'</th></tr>'); |
my $mailcount = 0; |
my $mailcount = 0; |
|
my $usediv; |
|
if (@{$critmsgs} > 1) { |
|
$usediv = 1; |
|
} |
foreach my $msg (@{$critmsgs}) { |
foreach my $msg (@{$critmsgs}) { |
$mailcount ++; |
$mailcount ++; |
my $css_class = $mailcount%2?' class="LC_odd_row"':''; |
my $css_class = $mailcount%2?' class="LC_odd_row"':''; |
$r->print('<tr'.$css_class.'><td>'.$mailcount. |
$r->print('<tr'.$css_class.'><td>'.$mailcount. |
'. </td><td><a href="/adm/email?folder=critical">'. |
'. </td>'. |
$msg->{'shortsub'}.'</a> </td><td> '. |
'<td>'); |
|
if ($usediv) { |
|
$r->print('<div class="LC_minheight">'); |
|
} |
|
$r->print('<a href="/adm/email?folder=critical">'. |
|
$msg->{'shortsub'}.'</a> '); |
|
if ($usediv) { |
|
$r->print('</div>'); |
|
} |
|
$r->print('</td><td> '. |
$msg->{'from'}.':'.$msg->{'fromdom'}.' </td><td>'. |
$msg->{'from'}.':'.$msg->{'fromdom'}.' </td><td>'. |
$msg->{'sendtime'}.'</td></tr>'); |
$msg->{'sendtime'}.'</td></tr>'); |
} |
} |
} else { |
} else { |
$r->print('<tr class="LC_empty_row"><td>'. |
$r->print('<tr class="LC_empty_row"><th>'. |
&mt('No unread critical messages in '.$lctype). |
&mt('No unread critical messages in '.$lctype). |
'</td></tr>'); |
'</th></tr>'); |
} |
} |
} |
} |
|
|
Line 2537 sub start_box {
|
Line 2643 sub start_box {
|
if ($$show{$caller}) { |
if ($$show{$caller}) { |
$r->print(' |
$r->print(' |
<tr> |
<tr> |
<td class="LC_subheader" align="left"><span class="LC_nobreak"><label><input type="radio" name="logindetails" value="0" checked="checked" onclick="javascript:toggledetails('."'login'".');" /> '.&mt('Summary').'</label><label><input type="radio" name="logindetails" value="1" onclick="javascript:toggledetails('."'login'".');" /> '.&mt('Details').'</label></span></td><td class="LC_subheader"><a href="/adm/whatsnew?command=chgcrslogininterval&refpage='.$refpage.'">'.$lt{'chin'}.'</a></td> |
<td class="LC_subheader" align="left"><fieldset class="LC_landmark"><legend><span class="LC_visually_hidden">'.&mt('Go').'</span></legend><span class="LC_nobreak"><label><input type="radio" name="logindetails" value="0" checked="checked" onclick="javascript:toggledetails('."'login'".');" /> '.&mt('Summary').'</label><label><input type="radio" name="logindetails" value="1" onclick="javascript:toggledetails('."'login'".');" /> '.&mt('Details').'</label></span></fieldset></td><td class="LC_subheader"><a href="/adm/whatsnew?command=chgcrslogininterval&refpage='.$refpage.'">'.$lt{'chin'}.'</a></td> |
</tr>'); |
</tr>'); |
} |
} |
} elsif (($caller eq 'sessions') && ($$show{$caller})) { |
} elsif (($caller eq 'sessions') && ($$show{$caller})) { |
if ($$show{$caller}) { |
if ($$show{$caller}) { |
$r->print(' |
$r->print(' |
<tr> |
<tr> |
<td class="LC_subheader" align="left"><span class="LC_nobreak"><label><input type="radio" name="sessiondetails" value="0" checked="checked" onclick="javascript:toggledetails('."'session'".');" /> '.&mt('Summary').'</label><label><input type="radio" name="sessiondetails" value="1" onclick="javascript:toggledetails('."'session'".');" /> '.&mt('Details').'</label></span></td><td class="LC_subheader"><a href="/adm/whatsnew?command=chgsessionlimit&refpage='.$refpage.'">'.$lt{'chin'}.'</a></td> |
<td class="LC_subheader" align="left"><fieldset class="LC_landmark"><legend><span class="LC_visually_hidden">'.&mt('Leave').'</span></legend><span class="LC_nobreak"><label><input type="radio" name="sessiondetails" value="0" checked="checked" onclick="javascript:toggledetails('."'session'".');" /> '.&mt('Summary').'</label><label><input type="radio" name="sessiondetails" value="1" onclick="javascript:toggledetails('."'session'".');" /> '.&mt('Details').'</label></span></td><td class="LC_subheader"><a href="/adm/whatsnew?command=chgsessionlimit&refpage='.$refpage.'">'.$lt{'chin'}.'</a></td> |
</tr>'); |
</tr>'); |
} |
} |
} |
} |