version 1.123, 2005/04/07 06:56:23
|
version 1.129, 2006/03/15 19:41:26
|
Line 73 use Apache::lonstudentassessment();
|
Line 73 use Apache::lonstudentassessment();
|
use Apache::lonpercentage; |
use Apache::lonpercentage; |
use Apache::lonstudentsubmissions(); |
use Apache::lonstudentsubmissions(); |
use Apache::lonsurveyreports(); |
use Apache::lonsurveyreports(); |
|
use Apache::longradinganalysis(); |
|
|
####################################################### |
####################################################### |
####################################################### |
####################################################### |
Line 197 sub PrepareClasslist {
|
Line 198 sub PrepareClasslist {
|
my $cid = $env{'request.course.id'}; |
my $cid = $env{'request.course.id'}; |
my $cdom = $env{'course.'.$cid.'.domain'}; |
my $cdom = $env{'course.'.$cid.'.domain'}; |
my $cnum = $env{'course.'.$cid.'.num'}; |
my $cnum = $env{'course.'.$cid.'.num'}; |
my ($classlist,$field_names) = &Apache::loncoursedata::get_classlist($cid, |
my ($classlist,$field_names) = &Apache::loncoursedata::get_classlist($cdom, |
$cdom,$cnum); |
$cnum); |
my @selected_sections = &get_selected_sections(); |
my @selected_sections = &get_selected_sections(); |
# |
# |
# Deal with instructors with restricted section access |
# Deal with instructors with restricted section access |
Line 267 sub PrepareClasslist {
|
Line 268 sub PrepareClasslist {
|
# Sort the Students |
# Sort the Students |
my $sortby = 'fullname'; |
my $sortby = 'fullname'; |
$sortby = $env{'form.sort'} if (exists($env{'form.sort'})); |
$sortby = $env{'form.sort'} if (exists($env{'form.sort'})); |
my @TmpStudents = sort { $a->{$sortby} cmp $b->{$sortby} || |
my @TmpStudents = sort { lc($a->{$sortby}) cmp lc($b->{$sortby}) || |
$a->{'fullname'} cmp $b->{'fullname'} } @Students; |
lc($a->{'fullname'}) cmp lc($b->{'fullname'}) || |
|
lc($a->{'username'}) cmp lc($b->{'username'}) } @Students; |
@Students = @TmpStudents; |
@Students = @TmpStudents; |
# |
# |
# Now deal with that current student thing.... |
# Now deal with that current student thing.... |
Line 298 sub PrepareClasslist {
|
Line 300 sub PrepareClasslist {
|
} |
} |
# |
# |
if (exists($env{'form.StudentData'})) { |
if (exists($env{'form.StudentData'})) { |
if (ref($env{'form.StudentData'}) eq 'ARRAY') { |
@SelectedStudentData = |
@SelectedStudentData = @{$env{'form.StudentData'}}; |
&Apache::loncommon::get_env_multiple('form.StudentData'); |
} else { |
|
@SelectedStudentData = ($env{'form.StudentData'}); |
|
} |
|
} else { |
} else { |
@SelectedStudentData = ('username'); |
@SelectedStudentData = ('username'); |
} |
} |
Line 330 Returns an array of the selected section
|
Line 329 Returns an array of the selected section
|
####################################################### |
####################################################### |
####################################################### |
####################################################### |
sub get_selected_sections { |
sub get_selected_sections { |
my @selected_sections; |
my @selected_sections = |
if (exists($env{'form.Section'})) { |
&Apache::loncommon::get_env_multiple('form.Section'); |
if (ref($env{'form.Section'})) { |
|
@selected_sections = @{$env{'form.Section'}}; |
|
} elsif ($env{'form.Section'} !~ /^\s*$/) { |
|
@selected_sections = ($env{'form.Section'}); |
|
} |
|
} |
|
@selected_sections = ('all') if (! @selected_sections); |
@selected_sections = ('all') if (! @selected_sections); |
foreach (@selected_sections) { |
foreach (@selected_sections) { |
if ($_ eq 'all') { |
if ($_ eq 'all') { |
Line 569 Returns: Array of symbs of selected maps
|
Line 562 Returns: Array of symbs of selected maps
|
####################################################### |
####################################################### |
sub get_selected_maps { |
sub get_selected_maps { |
my ($elementname) = @_; |
my ($elementname) = @_; |
my @selected_maps; |
my @selected_maps = |
if (exists($env{'form.'.$elementname})) { |
&Apache::loncommon::get_env_multiple('form.'.$elementname); |
if (ref($env{'form.'.$elementname})) { |
@selected_maps = ('all') if (! @selected_maps); |
@selected_maps = @{$env{'form.'.$elementname}}; |
|
} else { |
|
@selected_maps = ($env{'form.'.$elementname}); |
|
} |
|
} else { |
|
@selected_maps = ('all'); |
|
} |
|
foreach my $map (@selected_maps) { |
foreach my $map (@selected_maps) { |
if ($map eq 'all') { |
if ($map eq 'all') { |
@selected_maps = ('all'); |
@selected_maps = ('all'); |
Line 929 sub CreateMainMenu {
|
Line 915 sub CreateMainMenu {
|
short_description => |
short_description => |
&mt('Display a histogram of student performance in the course.'), |
&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', |
# { internal_name => 'student_assessment', |
# name => &mt('Problem Status Chart'), |
# name => &mt('Problem Status Chart'), |
# short_description => |
# short_description => |
Line 999 sub handler {
|
Line 990 sub handler {
|
td.essay { border: 1px solid gray; } |
td.essay { border: 1px solid gray; } |
</style> |
</style> |
ENDSTYLE |
ENDSTYLE |
my $html=&Apache::lonxml::xmlbegin(); |
|
$r->print($html.'<head><title>'. |
$r->print(&Apache::loncommon::start_page('Course Statistics and Charts', |
&mt('Course Statistics and Charts'). |
$style)); |
'</title>'.$style. |
|
"</head>\n". |
|
&Apache::loncommon::bodytag('Course Statistics and Charts')); |
|
$r->rflush(); |
$r->rflush(); |
# |
# |
# Either print out a menu for them or send them to a report |
# Either print out a menu for them or send them to a report |
Line 1034 ENDSTYLE
|
Line 1022 ENDSTYLE
|
'retrieved until the database is restarted. '. |
'retrieved until the database is restarted. '. |
'Your data is intact but cannot be displayed '. |
'Your data is intact but cannot be displayed '. |
'at this time.').'</p>'); |
'at this time.').'</p>'); |
$r->print('</body></html>'); |
$r->print(&Apache::loncommon::end_page()); |
return; |
return; |
} |
} |
# |
# |
Line 1093 ENDSTYLE
|
Line 1081 ENDSTYLE
|
({href=>'/adm/statistics?reportselected=student_assessment', |
({href=>'/adm/statistics?reportselected=student_assessment', |
text=>'Chart'}); |
text=>'Chart'}); |
&Apache::lonstudentassessment::BuildStudentAssessmentPage($r,$c); |
&Apache::lonstudentassessment::BuildStudentAssessmentPage($r,$c); |
} |
} elsif($GoToPage eq 'grading_analysis') { |
|
&Apache::lonhtmlcommon::add_breadcrumb |
|
({href=>'/adm/statistics?reportselected=grading_anaylsis', |
|
text=>'Grading Analysis'}); |
|
&Apache::longradinganalysis::build_grading_analysis_page($r,$c); |
|
} |
# |
# |
$r->print("</form>\n"); |
$r->print("</form>\n"); |
} |
} |
$r->print("</body>\n</html>\n"); |
$r->print(&Apache::loncommon::end_page()); |
$r->rflush(); |
$r->rflush(); |
# |
# |
return OK; |
return OK; |