'); - if (($currenturl=~/^\/res/) && - ($currenturl!~/^\/res\/adm/)) { - $r->print('Current Location
'); - } - - # Handle a network error - - if ($networkFailedFlag) - { - $r->print('
LON-CAPA's network is having difficulties, some problem" .
- " information, such as due dates, will not be available.");
- }
-# ----------------------------------------------------- The little content list
- for ($i=0;$i<=$#rows;$i++) {
- if ($rows[$i]) {
- my @colcont=split(/\&/,$rows[$i]);
- my $avespan=$lcm/($#colcont+1);
- for ($j=0;$j<=$#colcont;$j++) {
- my $rid=$colcont[$j];
- if ($rid=~/^h(.+)/) {
- $rid=$1;
- $r->print(' '.$hash{'title_'.$rid}.
- '
');
- }
- }
- }
- }
-# ----------------------------------------------------------------- Start table
- $r->print('
'; - my $adde=' | '; - my $hwk=''; - my $hwke=''; - if ($rid=~/^l(\d+\.\d+),(.+)/) { $linkid=$1; $rid=$2; } - if ($rid=~/^i(\d+),(.+)/) { $indent=$1; $rid=$2; } - if ($rid=~/^h(.+)/) { - $rid=$1; - $add=''; - $adde=' | '; - if (($ENV{'user.adv'}) && - ($parmhash{$symb.'.0.parameter_randompick'})) { - $adde=' (randomly select '. - $parmhash{$symb.'.0.parameter_randompick'}. - ')'; - } - } - if ($rid=~/^j(.+)/) { $rid=$1; } - if ($rid=~/^p(\d)(\d)\"([\w\: \(\)\/\,]*)\"(.+)/) { - # sub astatus describes what code/tcode mean - my $code=$1; - my $tcode=$2; - my $ctext=$3; - $rid=$4; - - # will open later - if ($tcode eq '1') { - $add=''; - } - - # solved/correct - if ($code eq '3') { - $add=' | '; - } elsif ($code eq '4') { # partially correct - $add=' | '; - } else { - # not attempted - - # we end up here on network failure, so pick a neutral - # color if the network failed instead of bright red. - if ( $networkFailedFlag ) - { - $add = ' | '; - } - else - { - $add=' | '; - } - - if ($tcode eq '2') { # open, not past due - $add=' | '; - } - - if ($tcode eq '4') { # due in next 24 hours - $add=' | '; - $adde=' | '; - } - } - $hwk=''; - $hwke=''; - if ($code eq '1') { - $hwke=' ('.$ctext.')'; - } - if ($code eq '2' || $code eq '4') { - $hwk=''; - $hwke=' ('.$ctext.')'; - } - if ($code eq '3') { - $hwk=''; - $hwke=' ('.$ctext.')'; - } - if ($networkFailedFlag) - { - $hwke=' (status unavailable)'; - } - } - if ($rid && $hash{'src_'.$rid} eq $currenturl) { - $add=$add.''. - '> '; - $adde= - ' <'.$adde; - } - if ($discussiontimes{$symb}>$lastcheck) { - $adde= - ''. - $adde; - } - if ($error{$src}) { - foreach (split(/\,/,$error{$src})) { - if ($_) { - $adde= - ' ' - .$adde; - } - } - } - if ($feedback{$src}) { - foreach (split(/\,/,$feedback{$src})) { - if ($_) { - $adde= - ' ' - .$adde; - } - } - } - if ($indent) { - my $is=" "; - for(my $i=-1;$i<$indent;$i++) { $indentstr.=$is; } - } - if (!$linkid) { $linkid=$rid; } - if ($hash{'randomout_'.$rid}) { - $adde=' (hidden)'.$adde; - } - $r->print($add.$indentstr); - if ($rid) { - $r->print(''. - $hwk.$hash{'title_'.$rid}.$hwke.''); - } - $r->print($adde); - } - $r->print('
---|