version 1.156.2.8.2.1, 2023/09/07 23:58:32
|
version 1.161, 2015/03/10 00:47:18
|
Line 366 sub section_or_group_text {
|
Line 366 sub section_or_group_text {
|
|
|
sub get_students { |
sub get_students { |
if (! @Students) { |
if (! @Students) { |
&PrepareClasslist(); |
&PrepareClasslist() |
} |
} |
return @Students; |
return @Students; |
} |
} |
Line 466 sub selected_sequences_with_assessments
|
Line 466 sub selected_sequences_with_assessments
|
|
|
my @sequences_with_assessments; |
my @sequences_with_assessments; |
foreach my $sequence (@sequences) { |
foreach my $sequence (@sequences) { |
if ($navmap->hasResource($sequence,sub { shift->is_gradable(); },0,1)){ |
if ($navmap->hasResource($sequence,sub { shift->is_problem(); },0,1)){ |
push(@sequences_with_assessments,$sequence); |
push(@sequences_with_assessments,$sequence); |
} |
} |
} |
} |
Line 547 sub SectionSelect {
|
Line 547 sub SectionSelect {
|
&PrepareClasslist() |
&PrepareClasslist() |
} |
} |
# |
# |
# Make sure course's student table is up to date |
|
if (@Sections) { |
|
&Apache::loncoursedata::ensure_current_sections(); |
|
} |
|
# |
|
# Build the form element |
# Build the form element |
my $Str = "\n"; |
my $Str = "\n"; |
$Str .= '<select name="'.$elementname.'" '; |
$Str .= '<select name="'.$elementname.'" '; |
Line 587 sub GroupSelect {
|
Line 582 sub GroupSelect {
|
&PrepareClasslist(); |
&PrepareClasslist(); |
} |
} |
# |
# |
# Make sure course's groupnames and studentgroups tables |
|
# are up to date. |
|
# |
|
if (@Groups) { |
|
&Apache::loncoursedata::ensure_current_groups(); |
|
&Apache::loncoursedata::ensure_current_students_groups(); |
|
} |
|
# |
|
# Build the form element |
# Build the form element |
my $Str = "\n"; |
my $Str = "\n"; |
$Str .= '<select name="'.$elementname.'" '; |
$Str .= '<select name="'.$elementname.'" '; |
Line 832 sub handler {
|
Line 819 sub handler {
|
&Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'}, |
&Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'}, |
['sort','reportSelected', |
['sort','reportSelected', |
'SelectedStudent']); |
'SelectedStudent']); |
my $GoToPage = $env{'form.reportSelected'}; |
|
|
|
# |
# |
# Give the LON-CAPA page header |
# Give the LON-CAPA page header |
my $style = <<ENDSTYLE; |
my $style = <<ENDSTYLE; |
Line 844 sub handler {
|
Line 829 sub handler {
|
td.essay { border: 1px solid gray; } |
td.essay { border: 1px solid gray; } |
</style> |
</style> |
ENDSTYLE |
ENDSTYLE |
|
|
my $head_extra = $style; |
|
if (($env{'form.reportSelected'} eq 'student_submission_reports') && |
|
($env{'form.renderprob'})) { |
|
my @Symbs = &Apache::lonstathelpers::get_selected_symbs('problemchoice'); |
|
if (scalar(@Symbs) == 1) { |
|
$head_extra .= &Apache::loncommon::css_links($Symbs[0]); |
|
} |
|
} elsif ($env{'form.reportSelected'} eq 'submissiontime_analysis') { |
|
my ($navmap,$current_problem) = |
|
&Apache::lonsubmissiontimeanalysis::get_current_problem(); |
|
if (ref($current_problem) eq 'HASH') { |
|
my $symb = $current_problem->{'symb'}; |
|
if ($symb) { |
|
$head_extra .= &Apache::loncommon::css_links($symb); |
|
} |
|
} |
|
} elsif (($env{'form.reportSelected'} eq 'problem_analysis') && |
|
($env{'form.show_prob'})) { |
|
my $problem_types = &Apache::lonproblemanalysis::analyzable_types(); |
|
my ($navmap,$current_problem) = |
|
&Apache::lonproblemanalysis::get_current_problem($problem_types); |
|
if (ref($current_problem) eq 'HASH') { |
|
my $symb = $current_problem->{'symb'}; |
|
my $res = $current_problem->{'resource'}; |
|
if ($symb) { |
|
$head_extra .= &Apache::loncommon::css_links($symb); |
|
} |
|
} |
|
} |
|
|
|
$r->print(&Apache::loncommon::start_page('Course Statistics and Charts', |
$r->print(&Apache::loncommon::start_page('Course Statistics and Charts', |
$head_extra)); |
$style)); |
$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 886 ENDSTYLE
|
Line 841 ENDSTYLE
|
text =>'Statistics', |
text =>'Statistics', |
faq=>139, |
faq=>139, |
bug=>'Statistics and Charts'}); |
bug=>'Statistics and Charts'}); |
if ($GoToPage eq '') { |
if (! exists($env{'form.reportSelected'}) || |
$r->print(&Apache::lonhtmlcommon::breadcrumbs('Statistics Main Page'). |
$env{'form.reportSelected'} eq '') { |
&CreateMainMenu()); |
$r->print(&Apache::lonhtmlcommon::breadcrumbs('Statistics Main Page')); |
|
&Apache::lonquickgrades::startGradeScreen($r,'statistics'); |
|
$r->print(&CreateMainMenu()); |
} else { |
} else { |
# |
# |
if (! &Apache::lonmysql::verify_sql_connection()) { |
if (! &Apache::lonmysql::verify_sql_connection()) { |
Line 914 ENDSTYLE
|
Line 871 ENDSTYLE
|
&Apache::loncoursedata::delete_caches($env{'request.course.id'}); |
&Apache::loncoursedata::delete_caches($env{'request.course.id'}); |
} |
} |
# |
# |
|
my $GoToPage = $env{'form.reportSelected'}; |
|
# |
# Begin form output |
# Begin form output |
$r->print('<form name="Statistics" '); |
$r->print('<form name="Statistics" '); |
if ($GoToPage eq 'student_submission_reports') { |
if ($GoToPage eq 'student_submission_reports') { |
Line 973 ENDSTYLE
|
Line 932 ENDSTYLE
|
# |
# |
$r->print("</form>\n"); |
$r->print("</form>\n"); |
} |
} |
|
&Apache::lonquickgrades::endGradeScreen($r); |
$r->print(&Apache::loncommon::end_page()); |
$r->print(&Apache::loncommon::end_page()); |
$r->rflush(); |
$r->rflush(); |
# |
# |