'."\n";
$Str .= '';
$Str .= ''.&mt('Sections').' | ';
- $Str .= ''.&mt('Enrollment Status').' | ';
+ $Str .= ''.&mt('Groups').' | ';
+ $Str .= ''.&mt('Access Status').' | ';
$Str .= '
'.$/;
$Str .= '';
$Str .= ''.
&Apache::lonstatistics::SectionSelect('Section','multiple',5).
' | ';
+ $Str .= ''.
+ &Apache::lonstatistics::GroupSelect('Group','multiple',5).
+ ' | ';
$Str .= ''.
&Apache::lonhtmlcommon::StatusOptions(undef,undef,5).
' | ';
@@ -964,42 +954,43 @@ sub DisplayClasslist {
$r->print($Str);
$r->rflush();
#
- my @Fields = ('fullname','username','domain','id','section','status');
+ my @Fields = ('fullname','username','domain','id','section','status','groups');
#
$Str = '';
+ my @selected_sections = &get_selected_sections();
if (! @Students) {
- if ($SelectedSections[0] eq 'all') {
- if (lc($ENV{'form.Status'}) eq 'any') {
- $Str .= 'There are no students in the course.
';
- } elsif (lc($ENV{'form.Status'}) eq 'active') {
- $Str .= 'There are no currently enrolled students in '.
- 'the course.
';
- } elsif (lc($ENV{'form.Status'}) eq 'expired') {
- $Str .= 'There are no previously enrolled '.
- 'students in the course.
';
+ if ($selected_sections[0] eq 'all') {
+ if (lc($env{'form.Status'}) eq 'any') {
+ $Str .= ''.
+ &mt('There are no students in the course.').
+ '
';
+ } elsif (lc($env{'form.Status'}) eq 'active') {
+ $Str .= ''.
+ &mt('There are no currently enrolled students in the course.').
+ '
';
+ } elsif (lc($env{'form.Status'}) eq 'expired') {
+ $Str .= ''.
+ &mt('There are no previously enrolled students in the course.').
+ '
';
}
} else {
my $sections;
- if (@SelectedSections == 1) {
- $sections = 'section '.$SelectedSections[0];
- } elsif (@SelectedSections > 2) {
- $sections = 'sections '.join(', ',@SelectedSections);
- $sections =~ s/, ([^,])*$/, and $1/;
- } else {
- $sections = 'sections '.join(' and ',@SelectedSections);
- }
- if (lc($ENV{'form.Status'}) eq 'any') {
- $Str .= 'There are no students in '.$sections.'.
';
- } elsif (lc($ENV{'form.Status'}) eq 'active') {
- $Str .= 'There are no currently enrolled students '.
- 'in '.$sections.'.
';
- } elsif (lc($ENV{'form.Status'}) eq 'expired') {
- $Str .= 'There are no previously enrolled students '.
- 'in '.$sections.'.
';
+ if (lc($env{'form.Status'}) eq 'any') {
+ $Str .= ''.
+ &mt('There are no students in the selected sections.').
+ '
';
+ } elsif (lc($env{'form.Status'}) eq 'active') {
+ $Str .= ''.
+ &mt('There are no currently enrolled students in the selected sections.').
+ '
';
+ } elsif (lc($env{'form.Status'}) eq 'expired') {
+ $Str .= ''.
+ &mt('There are no previously enrolled students in the selected sections.').
+ '
';
}
}
$Str.= ''.
- 'Return to the chart.';
+ &mt('Click here to return to the chart').'';
$r->print($Str);
$r->rflush();
return;
@@ -1013,7 +1004,7 @@ sub DisplayClasslist {
$Str .= ''.$field.
+ 'sort='.$field.'">'.&mt($field).
' | ';
}
$Str .= '
'."\n";
@@ -1032,12 +1023,14 @@ sub DisplayClasslist {
$Str .= '';
if ($field eq 'fullname' || $field eq 'username') {
$Str .= '';
+ $Str .= &escape($sname).'">';
$Str .= $student->{$field}.' ';
$Str .= '';
+ } elsif ($field eq 'status') {
+ $Str .= &mt($student->{$field});
} else {
$Str .= $student->{$field};
}
@@ -1076,7 +1069,7 @@ sub CreateMainMenu {
{ internal_name => 'student_submission_reports',
name => &mt('Student Submission Reports'),
short_description =>
- &mt('Prepare Excel spreadsheets of student submissions.'),
+ &mt('Prepare reports of student submissions.'),
},
{ internal_name => 'survey_reports',
name => &mt('Survey Reports'),
@@ -1088,6 +1081,11 @@ sub CreateMainMenu {
short_description =>
&mt('Display a histogram of student performance in the course.'),
},
+# { internal_name => 'grading_analysis',
+# name => &mt('Detailed Grading Analysis'),
+# short_description =>
+# &mt('Display statistics about who graded who.'),
+# },
# { internal_name => 'student_assessment',
# name => &mt('Problem Status Chart'),
# short_description =>
@@ -1123,16 +1121,16 @@ sub handler {
if ($loaderror) { return $loaderror; }
$loaderror=
&Apache::lonnet::overloaderror($r,
- $ENV{'course.'.$ENV{'request.course.id'}.'.home'});
+ $env{'course.'.$env{'request.course.id'}.'.home'});
if ($loaderror) { return $loaderror; }
#
# Check for access
- if (! &Apache::lonnet::allowed('vgr',$ENV{'request.course.id'})) {
- $ENV{'user.error.msg'}=
+ if (! &Apache::lonnet::allowed('vgr',$env{'request.course.id'})) {
+ $env{'user.error.msg'}=
$r->uri.":vgr:0:0:Cannot view grades for complete course";
if (! &Apache::lonnet::allowed('vgr',
- $ENV{'request.course.id'}.'/'.$ENV{'request.course.sec'})) {
- $ENV{'user.error.msg'}=
+ $env{'request.course.id'}.'/'.$env{'request.course.sec'})) {
+ $env{'user.error.msg'}=
$r->uri.":vgr:0:0:Cannot view grades with given role";
return HTTP_NOT_ACCEPTABLE;
}
@@ -1150,10 +1148,17 @@ sub handler {
'SelectedStudent']);
#
# Give the LON-CAPA page header
- $r->print(''.
- &mt('Course Statistics and Charts').
- "\n".
- &Apache::loncommon::bodytag('Course Statistics and Charts'));
+ my $style = <
+ ul.sub_studentans { list-style-type: none }
+ ul.sub_correctans { list-style-type: none }
+ tr.even { background-color: \#CCCCCC }
+ td.essay { border: 1px solid gray; }
+
+ENDSTYLE
+
+ $r->print(&Apache::loncommon::start_page('Course Statistics and Charts',
+ $style));
$r->rflush();
#
# Either print out a menu for them or send them to a report
@@ -1163,10 +1168,9 @@ sub handler {
text =>'Statistics',
faq=>139,
bug=>'Statistics and Charts'});
- if (! exists($ENV{'form.reportSelected'}) ||
- $ENV{'form.reportSelected'} eq '') {
- $r->print(&Apache::lonhtmlcommon::breadcrumbs
- (undef,&mt('Statistics Main Page')).
+ if (! exists($env{'form.reportSelected'}) ||
+ $env{'form.reportSelected'} eq '') {
+ $r->print(&Apache::lonhtmlcommon::breadcrumbs('Statistics Main Page').
&CreateMainMenu());
} else {
#
@@ -1183,13 +1187,13 @@ sub handler {
'retrieved until the database is restarted. '.
'Your data is intact but cannot be displayed '.
'at this time.').'');
- $r->print(' |