Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-30579

Data Model Elements are being initialized with an empty string

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.2, 2.3
    • Fix Version/s: 2.2.1
    • Component/s: SCORM
    • Testing Instructions:
      Hide

      It can be tested by running the SCORM Test Harness for DMI package - Data Model Implementation Test 1.
      1. Download the DMI Test package.
      2. Run the SCORM Test Harness for DMI as specified here - SCORM Test Harness
      3. Check the Log to make sure this error doesn't show:
      Evaluating GetValue("cmi.scaled_passing_score") - Expected: "" - LMS Returned: ""
      ERROR: Evaluating GetLastError("") - Expected: "403" - LMS Returned: "0"

      NOTE: Many other errors are reported by this test package - this patch only addresses the issues mentioned.

      Show
      It can be tested by running the SCORM Test Harness for DMI package - Data Model Implementation Test 1. 1. Download the DMI Test package . 2. Run the SCORM Test Harness for DMI as specified here - SCORM Test Harness 3. Check the Log to make sure this error doesn't show: Evaluating GetValue("cmi.scaled_passing_score") - Expected: "" - LMS Returned: "" ERROR: Evaluating GetLastError("") - Expected: "403" - LMS Returned: "0" NOTE: Many other errors are reported by this test package - this patch only addresses the issues mentioned.
    • Affected Branches:
      MOODLE_22_STABLE, MOODLE_23_STABLE
    • Fixed Branches:
      MOODLE_22_STABLE
    • Pull Master Branch:
      master_MDL-30579

      Description

      Data Model Elements are being initialized with an empty string. Thus, a 403 errorCode is not thrown (where it should be thrown).
      The following illustrates the above -

      Evaluating GetValue("cmi.scaled_passing_score") - Expected: "" - LMS Returned: ""
      ERROR: Evaluating GetLastError("") - Expected: "403" - LMS Returned: "0"

      403 error should have been thrown since, cmi.scaled_passing_score has not been initialized (Activity 1 - DMI Test package).

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

              Hide
              mayank_gupta2005 Mayank Gupta added a comment -

              This patch fixes the empty string initialization of Data Model Elements -

              https://github.com/mayankgupta/moodle/commit/75638e0ab002c69f68659675dc859b43e5e36f01

              After applying patch -

              Evaluating GetValue("cmi.scaled_passing_score") - Expected: "" - LMS Returned: ""
              Evaluating GetLastError("") - Expected: "403" - LMS Returned: "403"

              Thanks,
              Mayank Gupta

              Show
              mayank_gupta2005 Mayank Gupta added a comment - This patch fixes the empty string initialization of Data Model Elements - https://github.com/mayankgupta/moodle/commit/75638e0ab002c69f68659675dc859b43e5e36f01 After applying patch - Evaluating GetValue("cmi.scaled_passing_score") - Expected: "" - LMS Returned: "" Evaluating GetLastError("") - Expected: "403" - LMS Returned: "403" Thanks, Mayank Gupta
              Hide
              danmarsden Dan Marsden added a comment -

              NOTE TO INTEGRATOR: This patch is for Master only - relates to SCORM 2004 which we don't "officially" support...yet...

              We have plans to set up an easy way for people to see the results of the Test harness against qa.moodle.net without having to set it up themselves - the start of this is in MDLSITE-1595

              Show
              danmarsden Dan Marsden added a comment - NOTE TO INTEGRATOR: This patch is for Master only - relates to SCORM 2004 which we don't "officially" support...yet... We have plans to set up an easy way for people to see the results of the Test harness against qa.moodle.net without having to set it up themselves - the start of this is in MDLSITE-1595
              Hide
              nebgor Aparup Banerjee added a comment -

              Hello Dan

              we're aiming to keep master and MOODLE_22_STABLE the same for now , atleast until 2.2.1 is released this month.
              I'm guessing (comment in MDL-30645 was after 2.2 release) in 'Master only' probably means its fine for 2.2 as well, yes ?

              Show
              nebgor Aparup Banerjee added a comment - Hello Dan we're aiming to keep master and MOODLE_22_STABLE the same for now , atleast until 2.2.1 is released this month. I'm guessing (comment in MDL-30645 was after 2.2 release) in 'Master only' probably means its fine for 2.2 as well, yes ?
              Hide
              danmarsden Dan Marsden added a comment -

              Thanks Aparup - I'm happy for both - main point is that we don't support SCORM 2004 yet so this is classed as improvement/new feature work - thanks

              Show
              danmarsden Dan Marsden added a comment - Thanks Aparup - I'm happy for both - main point is that we don't support SCORM 2004 yet so this is classed as improvement/new feature work - thanks
              Hide
              nebgor Aparup Banerjee added a comment -

              Thank you(s) , integrated into master and 2.2.x

              Show
              nebgor Aparup Banerjee added a comment - Thank you(s) , integrated into master and 2.2.x
              Hide
              rajeshtaneja Rajesh Taneja added a comment -

              Works Great
              Thanks for fixing this, Mayank and Dan.

              Show
              rajeshtaneja Rajesh Taneja added a comment - Works Great Thanks for fixing this, Mayank and Dan.
              Hide
              stronk7 Eloy Lafuente (stronk7) added a comment -

              Yes, you did it!

              Now your code is part of the best weeklies released ever, many thanks!

              Closing, ciao

              Show
              stronk7 Eloy Lafuente (stronk7) added a comment - Yes, you did it! Now your code is part of the best weeklies released ever, many thanks! Closing, ciao
              Hide
              mayank_gupta2005 Mayank Gupta added a comment -

              Thanks Dan, Aparup, Rajesh, Eloy for reviewing, integrating, testing, closing this issue.

              -Mayank.

              Show
              mayank_gupta2005 Mayank Gupta added a comment - Thanks Dan, Aparup, Rajesh, Eloy for reviewing, integrating, testing, closing this issue. -Mayank.

                People

                • Votes:
                  0 Vote for this issue
                  Watchers:
                  3 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    9/Jan/12