version 1.137, 2006/08/18 15:15:38
|
version 1.140, 2008/09/16 12:32:18
|
Line 76 use Apache::lonpercentage;
|
Line 76 use Apache::lonpercentage;
|
use Apache::lonstudentsubmissions(); |
use Apache::lonstudentsubmissions(); |
use Apache::lonsurveyreports(); |
use Apache::lonsurveyreports(); |
use Apache::longradinganalysis(); |
use Apache::longradinganalysis(); |
use lib '/home/httpd/lib/perl/'; |
|
use LONCAPA; |
use LONCAPA; |
|
|
####################################################### |
####################################################### |
Line 313 sub PrepareClasslist {
|
Line 312 sub PrepareClasslist {
|
if ($env{'request.course.sec'} !~ /^\s*$/) { |
if ($env{'request.course.sec'} !~ /^\s*$/) { |
@Sections = ($env{'request.course.sec'}); |
@Sections = ($env{'request.course.sec'}); |
} else { |
} else { |
@Sections = sort {$a cmp $b} keys(%Sections); |
@Sections = sort { |
|
if ($a == $a && $b == $b ) { return $a <=> $b; } |
|
return $a cmp $b; |
|
} keys(%Sections); |
|
|
unshift(@Sections,'all'); # Put 'all' at the front of the list |
unshift(@Sections,'all'); # Put 'all' at the front of the list |
} |
} |
# Sort the groups |
# Sort the groups |
Line 704 sub selected_sequences_with_assessments
|
Line 707 sub selected_sequences_with_assessments
|
# |
# |
my @sequences = $navmap->retrieveResources(undef, |
my @sequences = $navmap->retrieveResources(undef, |
sub { shift->is_map(); },1,0,1); |
sub { shift->is_map(); },1,0,1); |
|
my $toplevelseq = $navmap->getById('0.0'); |
|
if (!grep(/^\Q$toplevelseq\E$/,@sequences)) { |
|
unshift(@sequences,$toplevelseq); |
|
} |
|
|
my @sequences_with_assessments; |
my @sequences_with_assessments; |
for my $sequence ($navmap->getById('0.0'), @sequences) { |
foreach my $sequence (@sequences) { |
if ($navmap->hasResource($sequence,sub { shift->is_problem(); },0,1)){ |
if ($navmap->hasResource($sequence,sub { shift->is_problem(); },0,1)){ |
push(@sequences_with_assessments,$sequence); |
push(@sequences_with_assessments,$sequence); |
} |
} |
Line 1173 ENDSTYLE
|
Line 1181 ENDSTYLE
|
# |
# |
if (! &Apache::lonmysql::verify_sql_connection()) { |
if (! &Apache::lonmysql::verify_sql_connection()) { |
my $serveradmin = $r->dir_config('lonAdmEMail'); |
my $serveradmin = $r->dir_config('lonAdmEMail'); |
$r->print('<h2><font color="Red">'. |
$r->print('<h2 class="LC_error">'. |
&mt('Unable to connect to database!'). |
&mt('Unable to connect to database!'). |
'</font></h2>'); |
'</h2>'); |
$r->print('<p>'. |
$r->print('<p>' |
&mt('Please notify the server administrator '). |
.&mt('Please notify the server administrator [_1]', |
'<b>'.$serveradmin.'</b></p>'); |
,'<b>'.$serveradmin.'</b>') |
|
.'</p>'); |
$r->print('<p>'. |
$r->print('<p>'. |
&mt('Course Statistics and Charts cannot be '. |
&mt('Course Statistics and Charts cannot be '. |
'retrieved until the database is restarted. '. |
'retrieved until the database is restarted. '. |