version 1.130, 2006/05/01 05:39:44
|
version 1.137, 2006/08/18 15:15:38
|
Line 63 use Apache::loncoursedata;
|
Line 63 use Apache::loncoursedata;
|
use Apache::lonhtmlcommon; |
use Apache::lonhtmlcommon; |
use Apache::lonmysql; |
use Apache::lonmysql; |
use Apache::lonlocal; |
use Apache::lonlocal; |
|
use Apache::longroup; |
use Time::HiRes; |
use Time::HiRes; |
# |
# |
# Statistics Packages |
# Statistics Packages |
Line 75 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; |
|
|
####################################################### |
####################################################### |
####################################################### |
####################################################### |
Line 230 sub PrepareClasslist {
|
Line 233 sub PrepareClasslist {
|
$enrollment_status = $env{'form.Status'} if (exists($env{'form.Status'})); |
$enrollment_status = $env{'form.Status'} if (exists($env{'form.Status'})); |
# |
# |
# Get groupmembership |
# Get groupmembership |
my (%curr_groups,$classgroups,$studentgroups); |
my ($classgroups,$studentgroups); |
my $numgroups = &Apache::loncommon::coursegroups(\%curr_groups,$cdom,$cnum); |
my %curr_groups = &Apache::longroup::coursegroups($cdom,$cnum); |
if ($numgroups) { |
if (%curr_groups) { |
($classgroups,$studentgroups) = |
($classgroups,$studentgroups) = |
&Apache::loncoursedata::get_group_memberships($classlist, |
&Apache::loncoursedata::get_group_memberships($classlist, |
$cdom,$cnum); |
$field_names, |
|
$cdom,$cnum); |
} |
} |
my $now = time; |
my $now = time; |
|
|
Line 281 sub PrepareClasslist {
|
Line 285 sub PrepareClasslist {
|
($enrollment_status eq 'Any')) |
($enrollment_status eq 'Any')) |
){ |
){ |
my $groupcheck = 0; |
my $groupcheck = 0; |
if (grep/^all$/,@selected_groups) { |
if (grep(/^all$/,@selected_groups)) { |
push (@Students,$studenthash); |
push(@Students,$studenthash); |
last; |
last; |
} elsif (grep/^none$/,@selected_groups) { |
} elsif (grep(/^none$/,@selected_groups)) { |
if ($studenthash->{'groups'} eq 'none') { |
if ($studenthash->{'groups'} eq 'none') { |
push (@Students,$studenthash); |
push(@Students,$studenthash); |
last; |
last; |
} |
} |
} else { |
} else { |
foreach my $group (@selected_groups) { |
foreach my $group (@selected_groups) { |
if (grep/^$group$/,@studentsgroups) { |
if (grep(/^$group$/,@studentsgroups)) { |
push (@Students,$studenthash); |
push(@Students,$studenthash); |
$groupcheck = 1; |
$groupcheck = 1; |
last; |
last; |
} |
} |
Line 428 sub get_selected_groups {
|
Line 432 sub get_selected_groups {
|
=item §ion_and_enrollment_description |
=item §ion_and_enrollment_description |
|
|
Returns a string describing the currently selected section(s), group(s) and |
Returns a string describing the currently selected section(s), group(s) and |
enrollment status. |
access status. |
|
|
Inputs: mode = 'plaintext' or 'localized' (defaults to 'localized') |
Inputs: mode = 'plaintext' or 'localized' (defaults to 'localized') |
'plaintext' is used for example in Excel spreadsheets. |
'plaintext' is used for example in Excel spreadsheets. |
Line 445 sub section_and_enrollment_description {
|
Line 449 sub section_and_enrollment_description {
|
my @groups = &Apache::lonstatistics::get_selected_groups(); |
my @groups = &Apache::lonstatistics::get_selected_groups(); |
my $description; |
my $description; |
if ($mode eq 'localized') { |
if ($mode eq 'localized') { |
$description = &mt('Unable to determine section, groups and enrollment'); |
$description = &mt('Unable to determine section, groups and access status'); |
} elsif ($mode eq 'plaintext') { |
} elsif ($mode eq 'plaintext') { |
$description = 'Unable to determine section, groups and enrollment'; |
$description = 'Unable to determine section, groups and access status'; |
} else { |
} else { |
$description = 'Bad parameter passed to lonstatistics::section_and_enrollment_description'; |
$description = 'Bad parameter passed to lonstatistics::section_and_enrollment_description'; |
&Apache::lonnet::logthis($description); |
&Apache::lonnet::logthis($description); |
} |
} |
$description = §ion_or_group_text($mode,'section',@sections). |
$description = §ion_or_group_text($mode,'section',@sections). |
' '.§ion_or_group_text($mode,'group',@groups); |
' '.§ion_or_group_text($mode,'group',@groups); |
if ($mode eq 'localized') { |
if ($mode eq 'localized') { |
$description .= &mt(' [_1] enrollment status.',$env{'form.Status'}); |
$description .= &mt(' [_1] access status.',$env{'form.Status'}); |
} elsif ($mode eq 'plaintext') { |
} elsif ($mode eq 'plaintext') { |
$description .= ' '.$env{'form.Status'}.' enrollment status.'; |
$description .= ' '.$env{'form.Status'}.' access status.'; |
} |
} |
return $description; |
return $description; |
} |
} |
Line 922 sub DisplayClasslist {
|
Line 926 sub DisplayClasslist {
|
# |
# |
# Output some of the standard interface components |
# Output some of the standard interface components |
my $Str; |
my $Str; |
$Str .= &Apache::lonhtmlcommon::breadcrumbs(undef,'Select One Student'); |
$Str .= &Apache::lonhtmlcommon::breadcrumbs('Select One Student'); |
$Str .= '<p><table cellspacing="5">'."\n"; |
$Str .= '<p><table cellspacing="5">'."\n"; |
$Str .= '<tr>'; |
$Str .= '<tr>'; |
$Str .= '<th align="center"><b>'.&mt('Sections').'</b></th>'; |
$Str .= '<th align="center"><b>'.&mt('Sections').'</b></th>'; |
$Str .= '<th align="center"><b>'.&mt('Groups').'</b></th>'; |
$Str .= '<th align="center"><b>'.&mt('Groups').'</b></th>'; |
$Str .= '<th align="center"><b>'.&mt('Enrollment Status').'</b></th>'; |
$Str .= '<th align="center"><b>'.&mt('Access Status').'</b></th>'; |
$Str .= '</tr>'.$/; |
$Str .= '</tr>'.$/; |
$Str .= '<tr>'; |
$Str .= '<tr>'; |
$Str .= '<td>'. |
$Str .= '<td>'. |
Line 1016 sub DisplayClasslist {
|
Line 1020 sub DisplayClasslist {
|
$Str .= '<td>'; |
$Str .= '<td>'; |
if ($field eq 'fullname' || $field eq 'username') { |
if ($field eq 'fullname' || $field eq 'username') { |
$Str .= '<a href="/adm/statistics?reportSelected='; |
$Str .= '<a href="/adm/statistics?reportSelected='; |
$Str .= &Apache::lonnet::escape('student_assessment'); |
$Str .= &escape('student_assessment'); |
$Str .= '&sort='.&Apache::lonnet::escape($env{'form.sort'}); |
$Str .= '&sort='.&escape($env{'form.sort'}); |
$Str .= '&SelectedStudent='; |
$Str .= '&SelectedStudent='; |
$Str .= &Apache::lonnet::escape($sname).'">'; |
$Str .= &escape($sname).'">'; |
$Str .= $student->{$field}.' '; |
$Str .= $student->{$field}.' '; |
$Str .= '</a>'; |
$Str .= '</a>'; |
} elsif ($field eq 'status') { |
} elsif ($field eq 'status') { |
Line 1163 ENDSTYLE
|
Line 1167 ENDSTYLE
|
bug=>'Statistics and Charts'}); |
bug=>'Statistics and Charts'}); |
if (! exists($env{'form.reportSelected'}) || |
if (! exists($env{'form.reportSelected'}) || |
$env{'form.reportSelected'} eq '') { |
$env{'form.reportSelected'} eq '') { |
$r->print(&Apache::lonhtmlcommon::breadcrumbs |
$r->print(&Apache::lonhtmlcommon::breadcrumbs('Statistics Main Page'). |
(undef,&mt('Statistics Main Page')). |
|
&CreateMainMenu()); |
&CreateMainMenu()); |
} else { |
} else { |
# |
# |