--- loncom/interface/lonstatistics.pm 2012/05/03 11:21:27 1.156
+++ loncom/interface/lonstatistics.pm 2016/08/14 16:38:05 1.156.2.7
@@ -1,6 +1,6 @@
# The LearningOnline Network with CAPA
#
-# $Id: lonstatistics.pm,v 1.156 2012/05/03 11:21:27 goltermann Exp $
+# $Id: lonstatistics.pm,v 1.156.2.7 2016/08/14 16:38:05 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -366,7 +366,7 @@ sub section_or_group_text {
sub get_students {
if (! @Students) {
- &PrepareClasslist()
+ &PrepareClasslist();
}
return @Students;
}
@@ -511,7 +511,7 @@ sub map_select {
if ($selected_maps[0] eq 'all') {
$form .= ' selected="selected"';
}
- $form .= ">all\n";
+ $form .= '>'.&mt('all').''."\n";
#
# Loop through the sequences
my @sequences = &selected_sequences_with_assessments('all');
@@ -547,6 +547,11 @@ sub SectionSelect {
&PrepareClasslist()
}
#
+ # Make sure course's student table is up to date
+ if (@Sections) {
+ &Apache::loncoursedata::ensure_current_sections();
+ }
+ #
# Build the form element
my $Str = "\n";
$Str .= '
';
+ $Str .= '';
$Str .= '';
$r->print($Str);
@@ -691,13 +704,13 @@ sub DisplayClasslist {
}
$Str .= ''.&mt('Select One Student').'
'
- .''.&mt("Click on a student's name or username to view their chart").'
'
+ .''.&mt("Click on a student's name or username to view their chart.").'
'
.&Apache::loncommon::start_data_table()
.&Apache::loncommon::start_data_table_header_row();
foreach my $field (@Fields) {
$Str .= ''.&mt($field).
' | ';
}
@@ -712,15 +725,19 @@ sub DisplayClasslist {
if ($field eq 'fullname' || $field eq 'username') {
$Str .= '';
- $Str .= $student->{$field}.' ';
+ $Str .= $student->{$field};
$Str .= '';
} elsif ($field eq 'status') {
$Str .= &mt($student->{$field});
} else {
- $Str .= $student->{$field};
+ if ($student->{$field} eq 'none') {
+ $Str .= &mt('none')
+ } else {
+ $Str .= $student->{$field};
+ }
}
$Str .= '';
}
@@ -839,9 +856,8 @@ ENDSTYLE
bug=>'Statistics and Charts'});
if (! exists($env{'form.reportSelected'}) ||
$env{'form.reportSelected'} eq '') {
- $r->print(&Apache::lonhtmlcommon::breadcrumbs('Statistics Main Page'));
- &Apache::lonquickgrades::startGradeScreen($r,'statistics');
- $r->print(&CreateMainMenu());
+ $r->print(&Apache::lonhtmlcommon::breadcrumbs('Statistics Main Page').
+ &CreateMainMenu());
} else {
#
if (! &Apache::lonmysql::verify_sql_connection()) {
@@ -864,7 +880,7 @@ ENDSTYLE
#
# Clean out the caches
if (exists($env{'form.ClearCache'})) {
- &Apache::loncoursedata::delete_caches($env{'requres.course.id'});
+ &Apache::loncoursedata::delete_caches($env{'request.course.id'});
}
#
my $GoToPage = $env{'form.reportSelected'};
@@ -928,7 +944,6 @@ ENDSTYLE
#
$r->print("\n");
}
- &Apache::lonquickgrades::endGradeScreen($r);
$r->print(&Apache::loncommon::end_page());
$r->rflush();
#