[LON-CAPA-cvs] cvs: loncom /homework grades.pm

raeburn raeburn at source.lon-capa.org
Thu Dec 21 18:05:04 EST 2017


raeburn		Thu Dec 21 23:05:04 2017 EDT

  Modified files:              
    /loncom/homework	grades.pm 
  Log:
  - Call regex in scalar context when setting value for $is_tool.
  
  
Index: loncom/homework/grades.pm
diff -u loncom/homework/grades.pm:1.745 loncom/homework/grades.pm:1.746
--- loncom/homework/grades.pm:1.745	Mon Dec 18 23:51:24 2017
+++ loncom/homework/grades.pm	Thu Dec 21 23:05:04 2017
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # The LON-CAPA Grading handler
 #
-# $Id: grades.pm,v 1.745 2017/12/18 23:51:24 raeburn Exp $
+# $Id: grades.pm,v 1.746 2017/12/21 23:05:04 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -856,7 +856,7 @@
 sub listStudents {
     my ($request,$symb,$submitonly) = @_;
 
-    my ($is_tool) = ($symb =~ /ext\.tool$/);
+    my $is_tool = ($symb =~ /ext\.tool$/);
     my $cdom      = $env{"course.$env{'request.course.id'}.domain"};
     my $cnum      = $env{"course.$env{'request.course.id'}.num"};
     my $getsec    = $env{'form.section'} eq '' ? 'all' : $env{'form.section'};
@@ -2021,7 +2021,7 @@
 
     my $probtitle=&Apache::lonnet::gettitle($symb); 
     if ($symb eq '') { $request->print("Unable to handle ambiguous references:."); return ''; }
-    my ($is_tool) = ($symb =~ /ext\.tool$/);
+    my $is_tool = ($symb =~ /ext\.tool$/);
 
     if (!&canview($usec)) {
         $request->print(
@@ -5021,7 +5021,7 @@
 	    my $parts = $curRes->parts();
             my $title = $curRes->compTitle();
 	    my $symbx = $curRes->symb();
-            my ($is_tool) = ($symbx =~ /ext\.tool$/);
+            my $is_tool = ($symbx =~ /ext\.tool$/);
 	    $studentTable.=
 		&Apache::loncommon::start_data_table_row().
 		'<td align="center" valign="top" >'.$prob.
@@ -9760,7 +9760,7 @@
     my ($request,$symb) = @_;
     if (!$symb) {return '';}
     &commonJSfunctions($request);
-    my ($is_tool) = ($symb =~ /ext\.tool$/);
+    my $is_tool = ($symb =~ /ext\.tool$/);
     my $result;
 
     $result.='<form action="/adm/grades" method="post" name="gradingMenu">'."\n".
@@ -9780,7 +9780,7 @@
     my ($request,$symb) = @_;
     if (!$symb) {return '';}
 
-    my ($is_tool) = ($symb =~ /ext\.tool$/);
+    my $is_tool = ($symb =~ /ext\.tool$/);
     &commonJSfunctions($request);
 
     my $result='<form action="/adm/grades" method="post" name="gradingMenu">'."\n".
@@ -9804,7 +9804,7 @@
     my ($request,$symb) = @_;
     if (!$symb) {return '';}
 
-    my ($is_tool) = ($symb =~ /ext\.tool$/);
+    my $is_tool = ($symb =~ /ext\.tool$/);
     &commonJSfunctions($request);
     my $result;
 




More information about the LON-CAPA-cvs mailing list