--- loncom/interface/statistics/lonstudentassessment.pm 2005/04/19 01:28:25 1.124
+++ loncom/interface/statistics/lonstudentassessment.pm 2006/05/01 19:29:13 1.138
@@ -1,6 +1,6 @@
# The LearningOnline Network with CAPA
#
-# $Id: lonstudentassessment.pm,v 1.124 2005/04/19 01:28:25 matthew Exp $
+# $Id: lonstudentassessment.pm,v 1.138 2006/05/01 19:29:13 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -50,12 +50,14 @@ Presents assessment data about a student
package Apache::lonstudentassessment;
use strict;
-use Apache::lonstatistics;
-use Apache::lonhtmlcommon;
+use Apache::lonstatistics();
+use Apache::lonhtmlcommon();
use Apache::loncommon();
use Apache::loncoursedata;
use Apache::lonnet; # for logging porpoises
use Apache::lonlocal;
+use Apache::grades();
+use Apache::lonmsgdisplay();
use Time::HiRes;
use Spreadsheet::WriteExcel;
use Spreadsheet::WriteExcel::Utility();
@@ -312,7 +314,7 @@ the chart page.
#######################################################
sub CreateInterface {
my $Str = '';
- $Str .= &Apache::lonhtmlcommon::breadcrumbs(undef,'Chart');
+ $Str .= &Apache::lonhtmlcommon::breadcrumbs('Chart');
# $Str .= &CreateLegend();
$Str .= '
'."\n";
$Str .= '
';
@@ -472,6 +474,7 @@ my @OutputDataOptions =
grand_maximum => 1,
summary_table => 1,
maximum_row => 1,
+ ignore_weight => 0,
shortdesc => 'Total Score and Maximum Possible for each '.
'Sequence or Folder',
longdesc => 'The score of each student as well as the '.
@@ -490,6 +493,7 @@ my @OutputDataOptions =
grand_maximum => 1,
summary_table => 1,
maximum_row => 1,
+ ignore_weight => 0,
shortdesc => 'Score on each Problem Part',
longdesc =>'The students score on each problem part, computed as'.
'the part weight * part awarded',
@@ -507,6 +511,7 @@ my @OutputDataOptions =
grand_maximum => 0,
summary_table => 0,
maximum_row => 0,
+ ignore_weight => 0,
shortdesc => 'Number of Tries before success on each Problem Part',
longdesc =>'The number of tries before success on each problem part.',
non_html_notes => 'negative values indicate an incorrect problem',
@@ -524,6 +529,7 @@ my @OutputDataOptions =
grand_maximum => 1,
summary_table => 1,
maximum_row => 0,
+ ignore_weight => 1,
shortdesc => 'Number of Problem Parts completed successfully.',
longdesc => 'The Number of Problem Parts completed successfully and '.
'the maximum possible for each student',
@@ -622,17 +628,21 @@ Return a line of the chart for a student
my @sequences;
my $navmap; # Have to keep this around since weakref is a bit zealous
+sub html_cleanup {
+ undef(%prog_state);
+ undef(%width);
+ #
+ undef($navmap);
+ undef(@sequences);
+}
+
sub html_initialize {
my ($r) = @_;
#
$padding = ' 'x3;
$count = 0;
$nodata_count = 0;
- undef(%prog_state);
- undef(%width);
- #
- undef($navmap);
- undef(@sequences);
+ &html_cleanup();
($navmap,@sequences) =
&Apache::lonstatistics::selected_sequences_with_assessments();
if (! ref($navmap)) {
@@ -641,6 +651,18 @@ sub html_initialize {
&mt('Unable to retrieve course information.').
'');
}
+
+ # If we're showing links, show a checkbox to open in new
+ # windows.
+ if ($show_links ne 'no') {
+ $r->print(<new_window = true;
+
+NEW_WINDOW_CHECKBOX
+ }
+
#
$r->print("