[LON-CAPA-cvs] cvs: loncom /interface/statistics lonstathelpers.pm

matthew lon-capa-cvs@mail.lon-capa.org
Thu, 30 Sep 2004 13:44:07 -0000


matthew		Thu Sep 30 09:44:07 2004 EDT

  Modified files:              
    /loncom/interface/statistics	lonstathelpers.pm 
  Log:
  &ProblemSelector: Now have 'view' link like MultipleProblemSelector.
  
  
Index: loncom/interface/statistics/lonstathelpers.pm
diff -u loncom/interface/statistics/lonstathelpers.pm:1.26 loncom/interface/statistics/lonstathelpers.pm:1.27
--- loncom/interface/statistics/lonstathelpers.pm:1.26	Wed Sep 29 10:56:59 2004
+++ loncom/interface/statistics/lonstathelpers.pm	Thu Sep 30 09:44:07 2004
@@ -1,6 +1,6 @@
 # The LearningOnline Network with CAPA
 #
-# $Id: lonstathelpers.pm,v 1.26 2004/09/29 14:56:59 matthew Exp $
+# $Id: lonstathelpers.pm,v 1.27 2004/09/30 13:44:07 matthew Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -118,6 +118,7 @@
     my ($AcceptedResponseTypes) = @_;
     my $Str;
     $Str = "\n<table>\n";
+    my $rb_count =0;
     foreach my $seq (&Apache::lonstatistics::Sequences_with_Assess('all')) {
         next if ($seq->{'num_assess'}<1);
         my $seq_str = '';
@@ -141,16 +142,17 @@
                         if (! defined($title) || $title eq '') {
                             ($title) = ($res->{'src'} =~ m:/([^/]*)$:);
                         }
-                        $seq_str .= '<tr><td>'.
-  '<input type="radio" name="problemchoice" value="'.$value.'" '.$checked.'/>'.
-  '</td><td>'.          
-  $resptype.'</td><td>'.
-  '<a href="'.$res->{'src'}.'">'.$title.'</a> ';
-#  '<a href="'.$res->{'src'}.'">'.$resptype.' '.$res->{'title'}.'</a> ';
+                        $seq_str .= '<tr>'.
+                            qq{<td><input type="radio" id="$rb_count" name="problemchoice" value="$value" $checked /></td>}.
+                            '<td><label for="'.$rb_count.'">'.$resptype.'</label></td>'.
+                            '<td><label for="'.$rb_count.'">'.$title.'</label>';
                         if (scalar(@{$partdata->{'ResponseIds'}}) > 1) {
                             $seq_str .= &mt('response').' '.$respid;
                         }
+                        $seq_str .= ('&nbsp;'x2).
+                            qq{<a target="preview" href="$res->{'src'}">view</a>};
                         $seq_str .= "</td></tr>\n";
+                        $rb_count++;
                     }
                 }
             }