[LON-CAPA-cvs] cvs: loncom(version_2_11_X) /interface loncoursedata.pm

raeburn raeburn at source.lon-capa.org
Thu Mar 4 18:55:05 EST 2021


raeburn		Thu Mar  4 23:55:05 2021 EDT

  Modified files:              (Branch: version_2_11_X)
    /loncom/interface	loncoursedata.pm 
  Log:
  - For 2.11
    Backport 1.206
  
  
Index: loncom/interface/loncoursedata.pm
diff -u loncom/interface/loncoursedata.pm:1.201.2.3 loncom/interface/loncoursedata.pm:1.201.2.4
--- loncom/interface/loncoursedata.pm:1.201.2.3	Tue Mar  2 20:00:50 2021
+++ loncom/interface/loncoursedata.pm	Thu Mar  4 23:55:05 2021
@@ -1,6 +1,6 @@
 # The LearningOnline Network with CAPA
 #
-# $Id: loncoursedata.pm,v 1.201.2.3 2021/03/02 20:00:50 raeburn Exp $
+# $Id: loncoursedata.pm,v 1.201.2.4 2021/03/04 23:55:05 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1150,18 +1150,28 @@
                         if ($length > $max_param) {
                             &Apache::lonnet::logthis("SQL parameter insert for student: $sname for parameter: $parameter would exceed max_allowed_packet size");
                             &Apache::lonnet::logthis("symb_id: $symb_id");
-                            &Apache::lonnet::logthis("Skipping this item.  You may want to increase the max_allowed_packet size from the current: $max_allowed_packet");
-                            next;
-                        } else {
-                            if ($length + $curr_params_length > $max_param) {
-                                push(@store_parameters_values,$curr_params_values);
-                                $curr_params_values = $sql_parameter;
-                                $curr_params_length = $length;
+                            &Apache::lonnet::logthis("You may want to increase the max_allowed_packet size from the current: $max_allowed_packet");
+                            if ($parameter =~ /\.submission$/) {
+                                $sql_parameter = "('".join("','",
+                                              $symb_id,$student_id,
+                                              $parameter)."',".
+                                                  $dbh->quote('WARNING: Submission too large -- see grading interface for actual submission')."),\n";
+                                $length = length($sql_parameter);
+                                &Apache::lonnet::logthis("Placeholder inserted instead of value of actual submission");
+                                &Apache::lonnet::logthis("See grading interface for the actual submission");
                             } else {
-                                $curr_params_values .= $sql_parameter;
-                                $curr_params_length += $length;
+                                &Apache::lonnet::logthis("Skipping this item");
+                                next;
                             }
                         }
+                        if ($length + $curr_params_length > $max_param) {
+                            push(@store_parameters_values,$curr_params_values);
+                            $curr_params_values = $sql_parameter;
+                            $curr_params_length = $length;
+                        } else {
+                            $curr_params_values .= $sql_parameter;
+                            $curr_params_length += $length;
+                        }
                     } else {
                         $curr_params_values .= $sql_parameter;
                     }




More information about the LON-CAPA-cvs mailing list