Uploaded image for project: 'Sakai'
  1. Sakai
  2. SAK-7449

Only submitted test scores should be sent to gradebook.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: CLOSED
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 2.3.0, 2.3.1
    • Fix Version/s: 2.3.x, 2.4.0
    • Labels:
      None

      Description

      This bug applies to 'send to gradebook' setting in the Published Assessment Settings page. It came to attention when Nuno sent the following email:

      Hi,
      When exporting to GB from an assessment in T&Q, only 20 of 139 are being exported. The operation stops with the following log message:

      WARN: oh well, must have been added already:null (2006-12-19 09:23:29,555 TP-Processor41_org.sakaiproject.tool.assessment.ui.listener.author.SavePublishedSettingsListener)
      This occurs in following try/block in SavePublishedSettingsListener:

      --<CODE>------------------------------
      try{
      log.debug("before gbsHelper.addToGradebook()");
      gbsHelper.addToGradebook((PublishedAssessmentData)assessment.getData(), g);
      log.debug("before gbsHelper.updateGradebook()");
      gbsHelper.updateGradebook((PublishedAssessmentData)assessment.getData(), g);
      // any score to copy over? get all the assessmentGradingData and copy over
      GradingService gradingService = new GradingService();

      // need to decide what to tell gradebook
      ArrayList list = null;

      if ((scoringType).equals(EvaluationModelIfc.HIGHEST_SCORE)){
      list = gradingService.getHighestAssessmentGradingList(assessment.getPublishedAssessmentId());
      }
      else {
      list = gradingService.getLastAssessmentGradingList(assessment.getPublishedAssessmentId());
      }

      //ArrayList list = gradingService.getAllSubmissions(assessment.getPublishedAssessmentId().toString());
      log.debug("list size =" + list.size() );
      for (int i=0; i<list.size();i++){
      AssessmentGradingData ag = (AssessmentGradingData)list.get;
      log.debug("ag.scores " + ag.getTotalAutoScore());
      gbsHelper.updateExternalAssessmentScore(ag, g);
      }
      }
      catch(Exception e){
      log.warn("oh well, must have been added already:"+e.getMessage());
      }
      --<CODE>------------------------------
      .........
      ........

      After looking at his AssessmentGrading table and the code, we discovered that in the following 2 statements:
      list = gradingService.getHighestAssessmentGradingList(assessment.getPublishedAssessmentId());
      and
      list = gradingService.getLastAssessmentGradingList(assessment.getPublishedAssessmentId());

      Both lists contained all AssessentGrading records, not just the ones that have been submitted (forGrade=1. ) , In Nuno's case, many of the assessementGrading records have finalScore = null. This could be a result of a student clicking on Begin Assessement and left the 'Tests and Quizzes' tool without answering any questions or exiting the tool by clicking on 'save and exit','next'..etc. FinalScore=null caused exception to throw when calling GradebookService, and breaks out of for loop.

      This was not discoved before in QA probably because our QA always exited Samigo 'properly' so finalScore =0, thus it never caused any exceptions. And QA probably didn't examine the gradebook entries carefully to make sure they are submitted scores.

      Resolution:

      1. Modify the list result to contain only submitted records.
      2. Add try..catch block for gbsHelper.updateExternalAssessmentScore(ag, g) method so that if an exception is thrown, we log the error for the particular record and continue the loop.

        Gliffy Diagrams

          Zeplin

            Attachments

              Issue Links

                Activity

                  People

                  Assignee:
                  hquinn Huong Nguyen (Inactive)
                  Reporter:
                  lydial@stanford.edu Lydia Li
                  Votes:
                  0 Vote for this issue
                  Watchers:
                  1 Start watching this issue

                    Dates

                    Created:
                    Updated:
                    Resolved:

                      Git Integration