--- loncom/interface/statistics/lonstudentassessment.pm 2006/08/18 15:15:38 1.143 +++ loncom/interface/statistics/lonstudentassessment.pm 2008/09/16 08:49:08 1.149 @@ -1,6 +1,6 @@ # The LearningOnline Network with CAPA # -# $Id: lonstudentassessment.pm,v 1.143 2006/08/18 15:15:38 raeburn Exp $ +# $Id: lonstudentassessment.pm,v 1.149 2008/09/16 08:49:08 bisitz Exp $ # # Copyright Michigan State University Board of Trustees # @@ -372,7 +372,7 @@ sub CreateInterface { $Str .= ' 'x5; $Str .= &mt('Status [_1]', - '<input type="text" name="stats_status" size="60" value="" />'); + '<input type="text" name="stats_status" size="60" value="" readonly="readonly" />'); $Str .= '<br />'; return $Str; } @@ -671,9 +671,10 @@ sub html_initialize { # If we're showing links, show a checkbox to open in new # windows. if ($show_links ne 'no') { + my $labeltext = &mt('Show links in new window:'); $r->print(<<NEW_WINDOW_CHECKBOX); <script type="text/javascript">new_window = true;</script> -<p><label>Show links in new window: +<p><label>$labeltext <input type="checkbox" checked="1" onclick="new_window=this.checked" /> </label></p> NEW_WINDOW_CHECKBOX @@ -684,7 +685,7 @@ NEW_WINDOW_CHECKBOX " ".localtime(time)."</h3>"); # if ($chosen_output->{'base'} !~ /^final table/) { - $r->print("<h3>".$chosen_output->{'shortdesc'}."</h3>"); + $r->print("<h3>".&mt($chosen_output->{'shortdesc'})."</h3>"); } my $Str = "<pre>\n"; # First, the @StudentData fields need to be listed @@ -843,12 +844,20 @@ sub html_outputstudent { my @tmp = &Apache::loncoursedata::get_current_state ($student->{'username'},$student->{'domain'},undef, $env{'request.course.id'}); - if ((scalar @tmp > 0) && ($tmp[0] !~ /^error:/)) { + if ((scalar @tmp > 0) && ($tmp[0] !~ /^error:(.*)/)) { %StudentsData = @tmp; - } - if (scalar(@tmp) < 1) { + } else { + my $error = $1; + if (scalar(@tmp) < 1) { + $Str .= '<span class="LC_warning">' + .&mt('No Course Data') + .'</span>'."\n"; + } else { + $Str .= '<span class="LC_error">' + .&mt('Error getting student data ([_1])',$error) + .'</span>'."\n"; + } $nodata_count++; - $Str .= '<font color="blue">No Course Data</font>'."\n"; $r->print($Str); $r->rflush(); return; @@ -1820,7 +1829,7 @@ sub csv_finish { # # Tell the user where to get their csv file $r->print('<br />'. - '<a href="'.$filename.'">'.&mt('Your csv file.').'</a>'."\n"); + '<a href="'.$filename.'">'.&mt('Your CSV file.').'</a>'."\n"); $r->rflush(); &csv_cleanup(); return; @@ -1951,11 +1960,8 @@ sub student_tries_on_sequence { # if ( ($links eq 'yes' && $symbol ne ' ') || ($links eq 'all')) { - if (length($symbol) > 1) { - &Apache::lonnet::logthis('length of symbol "'.$symbol.'" > 1'); - } my $link = '/adm/grades'. - '?symb='.&escape($resource->symb). + '?symb='.&escape($resource->shown_symb). '&student='.$student->{'username'}. '&userdom='.$student->{'domain'}. '&command=submission'; @@ -2110,7 +2116,7 @@ sub student_performance_on_sequence { # if ( ($links eq 'yes' && $symbol ne ' ') || ($links eq 'all')) { my $link = '/adm/grades' . - '?symb='.&escape($symb). + '?symb='.&escape($resource->shown_symb). '&student='.$student->{'username'}. '&userdom='.$student->{'domain'}. '&command=submission';