[LON-CAPA-cvs] cvs: loncom(version_2_9_X) /interface/statistics lonstudentassessment.pm

raeburn raeburn@source.lon-capa.org
Thu, 13 Aug 2009 18:45:04 -0000


raeburn		Thu Aug 13 18:45:04 2009 EDT

  Modified files:              (Branch: version_2_9_X)
    /loncom/interface/statistics	lonstudentassessment.pm 
  Log:
  - Backport 1.153, 1.154, 1.155, 1.156.
  
  
Index: loncom/interface/statistics/lonstudentassessment.pm
diff -u loncom/interface/statistics/lonstudentassessment.pm:1.150.2.1 loncom/interface/statistics/lonstudentassessment.pm:1.150.2.2
--- loncom/interface/statistics/lonstudentassessment.pm:1.150.2.1	Thu May 14 19:01:28 2009
+++ loncom/interface/statistics/lonstudentassessment.pm	Thu Aug 13 18:45:04 2009
@@ -1,6 +1,6 @@
 # The LearningOnline Network with CAPA
 #
-# $Id: lonstudentassessment.pm,v 1.150.2.1 2009/05/14 19:01:28 raeburn Exp $
+# $Id: lonstudentassessment.pm,v 1.150.2.2 2009/08/13 18:45:04 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -248,14 +248,14 @@
     if (defined($previous)) {
         my $sname = $previous->{'username'}.':'.$previous->{'domain'};
         $previousbutton .= '<input type="button" value="'.
-            'Previous Student ('.
-            $previous->{'username'}.'@'.$previous->{'domain'}.')'.
+            &mt('Previous Student ([_1])',
+            $previous->{'username'}.':'.$previous->{'domain'}).
             '" onclick="document.Statistics.SelectedStudent.value='.
             "'".$sname."'".';'.
             'document.Statistics.submit();" />';
     } else {
         $previousbutton .= '<input type="button" value="'.
-            'Previous student (none)'.'" />';
+            &mt('Previous student').'" disabled="disabled" />';
     }
     #
     # Build the next student link
@@ -264,19 +264,19 @@
     if (defined($next)) {
         my $sname = $next->{'username'}.':'.$next->{'domain'};
         $nextbutton .= '<input type="button" value="'.
-            'Next Student ('.
-            $next->{'username'}.'@'.$next->{'domain'}.')'.
+            &mt('Next Student ([_1])',
+            $next->{'username'}.':'.$next->{'domain'}).
             '" onclick="document.Statistics.SelectedStudent.value='.
-            "'".$sname."'".';'.
+            "'$sname'".';'.
             'document.Statistics.submit();" />';
     } else {
         $nextbutton .= '<input type="button" value="'.
-            'Next student (none)'.'" />';
+            &mt('Next student').'" disabled="disabled" />';
     }
     #
     # Build the 'all students' button
     my $all = '';
-    $all .= '<input type="button" value="All Students" '.
+    $all .= '<input type="button" value="'.&mt('All Students').'" '.
             '" onclick="document.Statistics.SelectedStudent.value='.
             "''".';'.'document.Statistics.submit();" />';
     $Str .= $previousbutton.('&nbsp;'x5).$all.('&nbsp;'x5).$nextbutton;
@@ -361,19 +361,20 @@
     $Str .= &CreateAndParseOutputDataSelector();
     $Str .= '</td></tr>'."\n";
     $Str .= '</table>'."\n";
-    $Str .= '<input type="submit" name="Generate Chart" value="'.
-        &mt('Generate Chart').'" />';
-    $Str .= '&nbsp;'x5;
+    $Str .= '<p>'.
+            &mt('Status:').' '.
+            '<input type="text" name="stats_status" size="60" value="" readonly="readonly" />'.
+            '</p>';
     $Str .= '<input type="submit" name="selectstudent" value="'.
         &mt('Select One Student').'" />';
     $Str .= '&nbsp;'x5;
     $Str .= '<input type="submit" name="ClearCache" value="'.
         &mt('Clear Caches').'" />';
-    $Str .= '&nbsp;'x5;
-    $Str .= 
-        &mt('Status [_1]',
-            '<input type="text" name="stats_status" size="60" value="" readonly="readonly" />');
-    $Str .= '<br />';
+    $Str .= '<p>'.
+            '<input type="submit" name="Generate Chart"'.
+            ' value="'.&mt('Generate Chart').'" />'.
+            '</p>';
+
     return $Str;
 }
 
@@ -663,9 +664,9 @@
         &Apache::lonstatistics::selected_sequences_with_assessments();
     if (! ref($navmap)) {
         # Unable to get data, so bail out
-        $r->print("<h3>".
+        $r->print("<p class="LC_error">".
                   &mt('Unable to retrieve course information.').
-                  '</h3>');
+                  '</p>');
     }
 
     # If we're showing links, show a checkbox to open in new
@@ -682,7 +683,7 @@
 
     #
     $r->print("<h3>".$env{'course.'.$env{'request.course.id'}.'.description'}.
-              "&nbsp;&nbsp;".localtime(time)."</h3>");
+              "&nbsp;&nbsp;".&Apache::lonlocal::locallocaltime(time)."</h3>");
     #
     if ($chosen_output->{'base'} !~ /^final table/) {
         $r->print("<h3>".&mt($chosen_output->{'shortdesc'})."</h3>");        
@@ -1438,14 +1439,10 @@
     if ($env{'form.SelectedStudent'}) {
         $studentcount = '1';
     }
-    if ($studentcount > 1) {
-        $r->print('<h1>'.&mt('Compiling Excel spreadsheet for [_1] students',
-                             $studentcount)."</h1>\n");
-    } else {
-        $r->print('<h1>'.
-                  &mt('Compiling Excel spreadsheet for 1 student').
-                  "</h1>\n");
-    }
+    $r->print('<p>'
+             .&mt('Compiling Excel spreadsheet for [quant,_1,student]...',$studentcount)
+            ."</p>\n"
+    );
     $r->rflush();
     #
     # Initialize progress window
@@ -1593,7 +1590,7 @@
     #
     # Tell the user where to get their excel file
     $r->print('<br />'.
-              '<a href="'.$filename.'">Your Excel spreadsheet.</a>'."\n");
+              '<a href="'.$filename.'">'.&mt('Your Excel spreadsheet').'</a>'."\n");
     $r->rflush();
     &excel_cleanup();
     return;