Changed students codes are not updated (Bug #700)


Added by Florent Bouchez Tichadou over 4 years ago. Updated over 3 years ago.


Status:Closed Start date:01/27/2020
Priority:Normal Due date:
Assignee:- % Done:

100%

Category:-
Target version:1.5.0

Description

Students often make a mistake when encoding their (anonymous) number for the exam.
When I try to manually correct the codes, AMC still "remembers" the old version and just concatenates (and mixes) numbers.
For instance a wrong number was :
11246049
which I corrected into :
19001801

However, AMC now thinks the number is :
119080112460649

(I even tried modifying it in the scoring_code database but with no luck :-().


History

Updated by Florent Bouchez Tichadou over 4 years ago

Found the problem : the sql statement checks for manual OR filled box, so does not check if box has been un-checked.

Here is a patch:

--- capture.pm.orig 2020-01-27 14:18:43.788834212 0100
+
+ capture.pm.fix 2020-01-27 14:28:08.780817693 0100
@ -587,7 +587,8 @
." ORDER BY id_b"},
'tickedChars'=>{sql=>"SELECT char FROM (SELECT id_b FROM $t_zone"
." WHERE student=? AND copy=? AND id_a=? AND type=?"
- ." AND (manual=1 OR (black >= ? * total AND black <= ? * total))"
." AND (manual = 1"
+ ." OR manual < 0 AND (black >= ? * total AND black <= ? * total))"
." ),( SELECT answer,char FROM ".$self->table("box","layout")
." WHERE student=? AND question=? AND role=?)"
." ON id_b=answer ORDER BY id_b"

Updated by Florent Bouchez Tichadou over 4 years ago

(Update with "pre" format)

--- capture.pm.orig    2020-01-27 14:18:43.788834212 +0100
+++ capture.pm.fix    2020-01-27 14:28:08.780817693 +0100
@@ -587,7 +587,8 @@
            ." ORDER BY id_b"},
      'tickedChars'=>{sql=>"SELECT char FROM (SELECT id_b FROM $t_zone" 
                      ."       WHERE student=? AND copy=? AND id_a=? AND type=?" 
-                     ."       AND (manual=1 OR (black >= ? * total AND black <= ? * total))" 
+                     ."       AND (manual = 1" 
+                     ."            OR manual < 0 AND (black >= ? * total AND black <= ? * total))" 
                      ." ),( SELECT answer,char FROM ".$self->table("box","layout")
                      ."       WHERE student=? AND question=? AND role=?)" 
                      ." ON id_b=answer ORDER BY id_b" 

Updated by Alexis Bienvenüe over 3 years ago

Thanks very much for this bug report and investigation, and sorry for being so late. git:f871f1a6ccc70

  • Status changed from New to Closed
  • Target version set to 1.5.0
  • % Done changed from 0 to 100

Also available in: Atom PDF