version 1.144.2.2, 2010/02/13 00:30:53
|
version 1.152, 2010/05/03 16:41:51
|
Line 405 sub StudentDataSelect {
|
Line 405 sub StudentDataSelect {
|
$Str .= 'size="'.$numvisible.'" >'."\n"; |
$Str .= 'size="'.$numvisible.'" >'."\n"; |
# |
# |
# Deal with 'all' |
# Deal with 'all' |
$Str .= ' <option value="all" '; |
$Str .= ' <option value="all"'; |
foreach (@SelectedStudentData) { |
foreach (@SelectedStudentData) { |
if ($_ eq 'all') { |
if ($_ eq 'all') { |
$Str .= 'selected '; |
$Str .= ' selected="selected"'; |
last; |
last; |
} |
} |
} |
} |
Line 416 sub StudentDataSelect {
|
Line 416 sub StudentDataSelect {
|
# |
# |
# Loop through the student data fields |
# Loop through the student data fields |
foreach my $item (@StudentDataOrder) { |
foreach my $item (@StudentDataOrder) { |
$Str .= ' <option value="'.$item.'" '; |
$Str .= ' <option value="'.$item.'"'; |
foreach (@SelectedStudentData) { |
foreach (@SelectedStudentData) { |
if ($item eq $_ ) { |
if ($item eq $_ ) { |
$Str .= 'selected '; |
$Str .= ' selected="selected"'; |
last; |
last; |
} |
} |
} |
} |
Line 506 sub map_select {
|
Line 506 sub map_select {
|
$form .= 'size="'.$numvisible.'" >'."\n"; |
$form .= 'size="'.$numvisible.'" >'."\n"; |
# |
# |
# Put in option for 'all' |
# Put in option for 'all' |
$form .= ' <option value="all" '; |
$form .= ' <option value="all"'; |
if ($selected_maps[0] eq 'all') { |
if ($selected_maps[0] eq 'all') { |
$form .= 'selected '; |
$form .= ' selected="selected"'; |
} |
} |
$form .= ">all</option>\n"; |
$form .= ">all</option>\n"; |
# |
# |
Line 521 sub map_select {
|
Line 521 sub map_select {
|
$navmap = shift(@sequences); |
$navmap = shift(@sequences); |
} |
} |
foreach my $seq (@sequences){ |
foreach my $seq (@sequences){ |
$form .= ' <option value="'.$seq->symb.'" '; |
$form .= ' <option value="'.$seq->symb.'"'; |
foreach (@selected_maps) { |
foreach (@selected_maps) { |
if ($seq->symb eq $_) { |
if ($seq->symb eq $_) { |
$form .= 'selected '; |
$form .= ' selected="selected"'; |
last; |
last; |
} |
} |
} |
} |
Line 556 sub SectionSelect {
|
Line 556 sub SectionSelect {
|
# |
# |
# Loop through the sequences |
# Loop through the sequences |
foreach my $s (@Sections) { |
foreach my $s (@Sections) { |
$Str .= ' <option value="'.$s.'" '; |
$Str .= ' <option value="'.$s.'"'; |
foreach (&get_selected_sections()) { |
foreach (&get_selected_sections()) { |
if ($s eq $_) { |
if ($s eq $_) { |
$Str .= 'selected '; |
$Str .= ' selected="selected"'; |
last; |
last; |
} |
} |
} |
} |
Line 591 sub GroupSelect {
|
Line 591 sub GroupSelect {
|
# |
# |
# Loop through the groups |
# Loop through the groups |
foreach my $s (@Groups) { |
foreach my $s (@Groups) { |
$Str .= ' <option value="'.$s.'" '; |
$Str .= ' <option value="'.$s.'"'; |
foreach my $group (&get_selected_groups()) { |
foreach my $group (&get_selected_groups()) { |
if ($s eq $group) { |
if ($s eq $group) { |
$Str .= 'selected '; |
$Str .= ' selected="selected"'; |
last; |
last; |
} |
} |
} |
} |
Line 738 sub DisplayClasslist {
|
Line 738 sub DisplayClasslist {
|
sub CreateMainMenu { |
sub CreateMainMenu { |
# |
# |
# Define menu data |
# Define menu data |
my @reports = ({ internal_name => 'problem_statistics', |
my @reports = ( |
name => &mt('Overall Problem Statistics'), |
{categorytitle => 'Statistics and Analyses', |
short_description => |
items => [ |
&mt('Student performance statistics on all problems.'), |
{url => '/adm/statistics?reportSelected=problem_statistics', |
}, |
permission => 'F', |
{ internal_name => 'problem_analysis', |
icon => 'document-open.png', |
name => &mt('Detailed Problem Analysis'), |
linktext => ('Overall Problem Statistics'), |
short_description => |
linktitle => ('Student performance statistics on all problems.')}, |
&mt('Detailed statistics and graphs of student performance on problems.'), |
|
}, |
{url => '/adm/statistics?reportSelected=problem_analysis', |
{ internal_name => 'submissiontime_analysis', |
permission => 'F', |
name => &mt('Submission Time Plots'), |
icon => 'prob_ana.png', |
short_description => |
linktext => ('Detailed Problem Analysis'), |
&mt('Display and analysis of submission times on assessments.'), |
linktitle => ('Detailed statistics and graphs of student performance on problems.')}, |
}, |
]}, |
{ internal_name => 'student_submission_reports', |
{categorytitle => 'Plots', |
name => &mt('Student Submission Reports'), |
items => [ |
short_description => |
{url => '/adm/statistics?reportSelected=submissiontime_analysis', |
&mt('Prepare reports of student submissions.'), |
permission => 'F', |
}, |
icon => 'subtimpl.png', |
{ internal_name => 'survey_reports', |
linktext => ('Submission Time Plots'), |
name => &mt('Survey Reports'), |
linktitle => ('Display and analysis of submission times on assessments.')}, |
short_description => |
|
&mt('Prepare reports on survey results.'), |
{url => '/adm/statistics?reportSelected=correct_problems_plot', |
}, |
permission => 'F', |
{ internal_name => 'correct_problems_plot', |
icon => 'coprplot.png', |
name => &mt('Correct Problems Plot'), |
linktext => ('Correct Problems Plot'), |
short_description => |
linktitle => ('Display a histogram of student performance in the course.')}, |
&mt('Display a histogram of student performance in the course.'), |
]}, |
}, |
{categorytitle => 'Reports', |
# { internal_name => 'grading_analysis', |
items => [ |
# name => &mt('Detailed Grading Analysis'), |
{url => '/adm/statistics?reportSelected=student_submission_reports', |
# short_description => |
permission => 'F', |
# &mt('Display statistics about who graded who.'), |
icon => 'edit-copy.png', |
# }, |
linktext => ('Student Submission Reports'), |
# { internal_name => 'student_assessment', |
linktitle => ('Prepare reports of student submissions.')}, |
# name => &mt('Problem Status Chart'), |
|
# short_description => |
{url => '/adm/statistics?reportSelected=survey_reports', |
# &mt('Brief view of each students performance in course.'), |
permission => 'F', |
# }, |
icon => 'survey_rep.png', |
# 'percentage' => 'Correct-problems Plot', |
linktext => ('Survey Reports'), |
# 'activitylog' => 'Activity Log', |
linktitle => ('Prepare reports on survey results.')}, |
); |
]}); |
# |
|
# Create the menu |
return &Apache::lonhtmlcommon::generate_menu(@reports); |
my $Str; |
|
$Str .= '<h2>'.&mt('Please select a report to generate').'</h2>'; |
|
foreach my $reportdata (@reports) { |
|
$Str .=' <h3><a href="/adm/statistics?reportSelected='. |
|
$reportdata->{'internal_name'}.'" >'. |
|
$reportdata->{'name'}."</a></h3>\n"; |
|
$Str .= ' '.(' 'x8).$reportdata->{'short_description'}. |
|
"\n"; |
|
} |
|
$Str .="</dl>\n"; |
|
# |
|
return $Str; |
|
} |
} |
|
|
|
|
Line 803 sub handler {
|
Line 792 sub handler {
|
my $r=shift; |
my $r=shift; |
my $c = $r->connection(); |
my $c = $r->connection(); |
# |
# |
# Check for overloading |
|
my $loaderror=&Apache::lonnet::overloaderror($r); |
|
if ($loaderror) { return $loaderror; } |
|
$loaderror= |
|
&Apache::lonnet::overloaderror($r, |
|
$env{'course.'.$env{'request.course.id'}.'.home'}); |
|
if ($loaderror) { return $loaderror; } |
|
# |
|
# Check for access |
# Check for access |
if (! &Apache::lonnet::allowed('vgr',$env{'request.course.id'})) { |
if (! &Apache::lonnet::allowed('vgr',$env{'request.course.id'})) { |
$env{'user.error.msg'}= |
$env{'user.error.msg'}= |
Line 892 ENDSTYLE
|
Line 873 ENDSTYLE
|
my $GoToPage = $env{'form.reportSelected'}; |
my $GoToPage = $env{'form.reportSelected'}; |
# |
# |
$r->print('<input type="hidden" name="reportSelected" value="'. |
$r->print('<input type="hidden" name="reportSelected" value="'. |
$GoToPage.'">'); |
$GoToPage.'" />'); |
if($GoToPage eq 'activitylog') { |
if($GoToPage eq 'activitylog') { |
# &Apache::lonproblemstatistics::Activity(); |
# &Apache::lonproblemstatistics::Activity(); |
} elsif($GoToPage eq 'problem_statistics') { |
} elsif($GoToPage eq 'problem_statistics') { |