22
33import io .quarkus .panache .common .Page ;
44import fr .istic .domain .Answer2HybridGradedComment ;
5- import fr .istic .domain .Exam ;
65import fr .istic .domain .ExamSheet ;
76import fr .istic .domain .GradedComment ;
87import fr .istic .domain .HybridGradedComment ;
98import fr .istic .domain .Question ;
109import fr .istic .domain .StudentResponse ;
1110import fr .istic .domain .TextComment ;
12- import fr .istic .domain .Zone ;
1311import fr .istic .domain .enumeration .GradeType ;
1412import fr .istic .service .customdto .exportcomments .Answer ;
1513import fr .istic .service .customdto .exportcomments .AnswersWithPredictionDto ;
1614import fr .istic .service .customdto .exportcomments .Comment ;
1715import fr .istic .service .customdto .exportcomments .Prediction ;
18- import fr .istic .service .dto .ExamDTO ;
1916import fr .istic .service .dto .QuestionDTO ;
2017import fr .istic .service .mapper .ExamMapper ;
2118import fr .istic .service .mapper .QuestionMapper ;
@@ -225,8 +222,6 @@ public Paged<QuestionDTO> findQuestionbyZoneId(Page page, long zoneId) {
225222 }
226223
227224 public AnswersWithPredictionDto getallcommentsandprediction4qId (long qId ) {
228- log .error ("ok" );
229- try {
230225 AnswersWithPredictionDto awp = new AnswersWithPredictionDto ();
231226 Question q = Question .findById (qId );
232227 awp .setQid (qId );
@@ -266,7 +261,6 @@ public AnswersWithPredictionDto getallcommentsandprediction4qId(long qId) {
266261 Comment comment = new Comment ();
267262 comment .setText (t .text );
268263 comment .setDescription (t .description );
269- log .error ("" +q .step );
270264 if (!"QCM" .equals (q .type .algoName ) && q .step > 0 ) {
271265 if (q .gradeType == GradeType .POSITIVE ) {
272266 comment .setNoteComments (t .gradequarter / 4.0 / q .step );
@@ -286,11 +280,6 @@ public AnswersWithPredictionDto getallcommentsandprediction4qId(long qId) {
286280 }
287281 }
288282 return awp ;
289- }catch (Exception e ){
290- e .printStackTrace ();
291- log .error ("error in getallcommentsandprediction4qId" , e );
292- return null ;
293- }
294283
295284 }
296285
@@ -373,7 +362,6 @@ private double computeNote4Hybrid(StudentResponse resp) {
373362 if (resp .question != null && resp .question .defaultpoint != null ) {
374363 pourcentage = resp .question .defaultpoint .doubleValue () *4 ;
375364 }
376- // log.error("default point for question " + resp.question.numero + " " + pourcentage);
377365
378366 for (Answer2HybridGradedComment an2 : resp .hybridcommentsValues ) {
379367 var stepValue = an2 .stepValue !=null ? an2 .stepValue .doubleValue (): 0.0 ;
@@ -392,12 +380,10 @@ private double computeNote4Hybrid(StudentResponse resp) {
392380 }
393381 }
394382 var point = resp .question .quarterpoint != null ? resp .question .quarterpoint .doubleValue () : 0.0 ;
395- // log.error("point for question " + resp.question.numero + " " + absoluteNote2Add + " " + point + " " + pourcentage);
396383
397384 currentNote = ((point * pourcentage ) / 400.0 ) + absoluteNote2Add ;
398385
399386 if (currentNote > point && !resp .question .canExceedTheMax ) {
400- // log.error("currentNote " + currentNote + " " + point + " " + resp.question.numero);
401387 currentNote = point ;
402388 } else if (currentNote < 0 && !resp .question .canBeNegative ) {
403389 currentNote = 0 ;
@@ -414,7 +400,6 @@ private double computeNote4HybridComment(StudentResponse resp, Answer2HybridGrad
414400 if (resp .question != null && resp .question .defaultpoint != null ) {
415401 pourcentage = resp .question .defaultpoint .doubleValue () *4 ;
416402 }
417- // log.error("default point for question " + resp.question.numero + " " + pourcentage);
418403
419404 var stepValue = an2 .stepValue !=null ? an2 .stepValue .doubleValue (): 0.0 ;
420405 if (stepValue > 0 ) {
0 commit comments