Diff for /loncom/interface/statistics/lonstudentassessment.pm between versions 1.133 and 1.134

version 1.133, 2006/03/05 19:43:12 version 1.134, 2006/03/11 19:51:38
Line 650  sub html_initialize { Line 650  sub html_initialize {
                   &mt('Unable to retrieve course information.').                    &mt('Unable to retrieve course information.').
                   '</h3>');                    '</h3>');
     }      }
   
       # If we're showing links, show a checkbox to open in new
       # windows.
       if ($show_links ne 'no') {
           $r->print(<<NEW_WINDOW_CHECKBOX);
   <script>new_window = true;</script>
   <p>Show links in new window: 
   <input type="checkbox" checked="1" onclick="new_window=this.checked" /></p>
   NEW_WINDOW_CHECKBOX
       }
   
     #      #
     $r->print("<h3>".$env{'course.'.$env{'request.course.id'}.'.description'}.      $r->print("<h3>".$env{'course.'.$env{'request.course.id'}.'.description'}.
               "&nbsp;&nbsp;".localtime(time)."</h3>");                "&nbsp;&nbsp;".localtime(time)."</h3>");
Line 1928  sub student_tries_on_sequence { Line 1939  sub student_tries_on_sequence {
                 if (length($symbol) > 1) {                  if (length($symbol) > 1) {
                     &Apache::lonnet::logthis('length of symbol "'.$symbol.'" > 1');                      &Apache::lonnet::logthis('length of symbol "'.$symbol.'" > 1');
                 }                  }
                 $symbol = '<a href="/adm/grades'.                  my $link = '/adm/grades'.
                     '?symb='.&Apache::lonnet::escape($resource->symb).                      '?symb='.&Apache::lonnet::escape($resource->symb).
                         '&student='.$student->{'username'}.                          '&student='.$student->{'username'}.
                             '&userdom='.$student->{'domain'}.                              '&userdom='.$student->{'domain'}.
                                 '&command=submission">'.$symbol.'</a>';                                  '&command=submission';
                   $symbol = &link($symbol, $link);
             }              }
             $value .= $symbol;              $value .= $symbol;
         }          }
Line 1947  sub student_tries_on_sequence { Line 1959  sub student_tries_on_sequence {
     return ($Str,$performance_length,$sum,$max,\@TriesData);      return ($Str,$performance_length,$sum,$max,\@TriesData);
 }  }
   
   =pod
   
   =item &link
   
   Inputs:
   
   =over 4
   
   =item $text
   
   =item $target
   
   =back
   
   Takes the text and creates a link to the $text that honors
   the value of 'new window' if clicked on, but uses a real 
   'href' so middle and right clicks still work.
   
   $target and $text are assumed to be already correctly escaped; i.e., it
   can be dumped out directly into the output stream as-is.
   
   =cut
   
   sub link {
       my ($text,$target) = @_;
       return 
           "<a href='$target' onclick=\"t=this.href;if(new_window)"
           ."{window.open(t)}else{return void(window."
           ."location=t)};return false;\">$text</a>";
   }
   
 #######################################################  #######################################################
 #######################################################  #######################################################
   
Line 2051  sub student_performance_on_sequence { Line 2094  sub student_performance_on_sequence {
             push (@ScoreData,$partscore);              push (@ScoreData,$partscore);
             #              #
             if ( ($links eq 'yes' && $symbol ne ' ') || ($links eq 'all')) {              if ( ($links eq 'yes' && $symbol ne ' ') || ($links eq 'all')) {
                 $symbol = '<a href="/adm/grades'.                  my $link = '/adm/grades' .
                     '?symb='.&Apache::lonnet::escape($symb).                      '?symb='.&Apache::lonnet::escape($symb).
                     '&student='.$student->{'username'}.                      '&student='.$student->{'username'}.
                     '&userdom='.$student->{'domain'}.                      '&userdom='.$student->{'domain'}.
                     '&command=submission">'.$symbol.'</a>';                      '&command=submission';
                   $symbol = &link($symbol, $link);
             }              }
             $Str .= $symbol;              $Str .= $symbol;
         }          }

Removed from v.1.133  
changed lines
  Added in v.1.134


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>