--- loncom/interface/statistics/lonstudentsubmissions.pm	2006/04/29 18:01:17	1.42
+++ loncom/interface/statistics/lonstudentsubmissions.pm	2008/09/11 14:47:23	1.47
@@ -1,6 +1,6 @@
 # The LearningOnline Network with CAPA
 #
-# $Id: lonstudentsubmissions.pm,v 1.42 2006/04/29 18:01:17 albertel Exp $
+# $Id: lonstudentsubmissions.pm,v 1.47 2008/09/11 14:47:23 bisitz Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -37,6 +37,9 @@ use Apache::lonstathelpers;
 use HTML::Entities();
 use Time::Local();
 use Spreadsheet::WriteExcel();
+use lib '/home/httpd/lib/perl/';
+use LONCAPA;
+  
 
 my @SubmitButtons = ({ name => 'SelectAnother',
                        text => 'Choose a different Problem' },
@@ -555,7 +558,7 @@ sub html_non_essay_results {
         return '';
     }
     # 
-    my $submission = &HTML::Entities::decode(&Apache::lonnet::unescape($response->{'Submission'})); 
+    my $submission = &HTML::Entities::decode(&unescape($response->{'Submission'})); 
     return '' if (! defined($submission) || $submission eq '');
     $submission =~ s/\\\"/\"/g;
     $submission =~ s/\\\'/\'/g;
@@ -570,14 +573,14 @@ sub html_non_essay_results {
     if ($resptype =~ /^(option|match|rank)$/) {
         my %submission = 
             map { 
-                my ($foil,$value) = split('=',&Apache::lonnet::unescape($_));
+                my ($foil,$value) = split('=',&unescape($_));
                 ($foil,$value);
             } split('&',$response->{'Submission'});
         my %correct;
         if (exists($response->{'Correct'})) {
             %correct = 
                 map { 
-                    my ($foil,$value)=split('=',&Apache::lonnet::unescape($_));
+                    my ($foil,$value)=split('=',&unescape($_));
                     ($foil,$value);
                 } split('&',$response->{'Correct'});
         }
@@ -828,7 +831,7 @@ sub compile_response_data {
     #
     my $submission = 
         &HTML::Entities::decode
-        (&Apache::lonnet::unescape($response->{'Submission'}));
+        (&unescape($response->{'Submission'}));
     if (!$prob->is_task()) {
 	return () if (! defined($submission) || $submission eq '');
     }
@@ -843,14 +846,14 @@ sub compile_response_data {
     if ($resptype =~ /^(option|match|rank)$/) {
         my %submission = 
             map { 
-                my ($foil,$value) = split('=',&Apache::lonnet::unescape($_));
+                my ($foil,$value) = split('=',&unescape($_));
                 ($foil,$value);
             } split('&',$response->{'Submission'});
         my %correct;
         if (exists($response->{'Correct'})) {
             %correct = 
                 map { 
-                    my ($foil,$value)=split('=',&Apache::lonnet::unescape($_));
+                    my ($foil,$value)=split('=',&unescape($_));
                     ($foil,$value);
                 } split('&',$response->{'Correct'});
         }
@@ -925,9 +928,9 @@ sub prepare_csv_output {
             time.'_'.rand(1000000000).'.csv';
     unless ($outputfile = Apache::File->new('>/home/httpd'.$filename)) {
         $r->log_error("Couldn't open $filename for output $!");
-        $r->print("Problems occured in writing the csv file.  ".
-                  "This error has been logged.  ".
-                  "Please alert your LON-CAPA administrator.");
+        $r->print(&mt('Problems occurred in writing the csv file. '
+                     .'This error has been logged. '
+                     .'Please alert your LON-CAPA administrator.'));
         $outputfile = undef;
     }
     #
@@ -1081,13 +1084,13 @@ sub CreateInterface {
     ##
     ## Environment variable initialization
     my $Str = '';
-    $Str .= &Apache::lonhtmlcommon::breadcrumbs
-        (undef,'Student Submission Reports');
+    $Str .= &Apache::lonhtmlcommon::breadcrumbs('Student Submission Reports');
     $Str .= '<p>';
     $Str .= '<table cellspacing="5">'."\n";
     $Str .= '<tr>';
     $Str .= '<th>'.&mt('Sections').'</th>';
-    $Str .= '<th>'.&mt('Enrollment Status').'</th>';
+    $Str .= '<th>'.&mt('Groups').'</th>';
+    $Str .= '<th>'.&mt('Access Status').'</th>';
     $Str .= '<th>'.&mt('Output as [_1]',$output_selector).'</th>';
     $Str .= '</tr>'."\n";
     #
@@ -1095,6 +1098,10 @@ sub CreateInterface {
     $Str .= &Apache::lonstatistics::SectionSelect('Section','multiple',5);
     $Str .= '</td>';
     #
+    $Str .= '<td align="center">'."\n";
+    $Str .= &Apache::lonstatistics::GroupSelect('Group','multiple',5);
+    $Str .= '</td>';
+    #
     $Str .= '<td align="center">';
     $Str .= &Apache::lonhtmlcommon::StatusOptions(undef,undef,5);
     $Str .= '</td>';