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

xml file exported from gradebook should import back into the gradebook with no errors.

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.6
    • Fix Version/s: 2.5.6, 2.6.3
    • Component/s: Gradebook
    • Labels:
    • Testing Instructions:
      Hide
      1. Export the gradebook as an xml file.
        1. Choose or create a course.
        2. Make sure that all students enrolled have the ID number field filled out.
        3. Create or edit an activity (one that will produce grades) and make sure that the ID number (Under "Common module settings") is filled out.
        4. Go to a course and then [Administration ► Grade administration ► Export ► XML file].
        5. Make sure that the activity that you edited is show as selected under "Grade items to be included". Click submit.
        6. If you see no preview rows with student names then double check your settings. Click the download button.
      2. Edit the file.
        1. Open up the xml file in an editor.
        2. Change some grades around. Make sure that at least one grade is just a dash "-".
      3. Upload the xml file.
        1. Go to a course and then to [Administration ► Grade administration ► Import ► XML file].
        2. Upload the edited xml file.
        3. Ensure that there are no errors.
      Show
      Export the gradebook as an xml file. Choose or create a course. Make sure that all students enrolled have the ID number field filled out. Create or edit an activity (one that will produce grades) and make sure that the ID number (Under "Common module settings") is filled out. Go to a course and then [Administration ► Grade administration ► Export ► XML file] . Make sure that the activity that you edited is show as selected under "Grade items to be included". Click submit. If you see no preview rows with student names then double check your settings. Click the download button. Edit the file. Open up the xml file in an editor. Change some grades around. Make sure that at least one grade is just a dash "-". Upload the xml file. Go to a course and then to [Administration ► Grade administration ► Import ► XML file] . Upload the edited xml file. Ensure that there are no errors.
    • Affected Branches:
      MOODLE_26_STABLE
    • Fixed Branches:
      MOODLE_25_STABLE, MOODLE_26_STABLE
    • Pull from Repository:
    • Pull 2.6 Branch:
      wip-MDL-45037-26
    • Pull Master Branch:
      wip-MDL-45037-master

      Description

      When exporting the gradebook in an xml format, it will mark unmarked items with a dash "-". When trying to import this back in, it will produce a "Supplied grade is invalid" error.

      I think it is fair that exported files should be able to be imported again with no problems.

        Gliffy Diagrams

          Activity

          Hide
          cibot CiBoT added a comment -

          Results for MDL-45037

          • Remote repository: git://github.com/abgreeve/moodle.git
          Show
          cibot CiBoT added a comment - Results for MDL-45037 Remote repository: git://github.com/abgreeve/moodle.git Remote branch wip- MDL-45037 -25 to be integrated into upstream MOODLE_25_STABLE Executed job http://integration.moodle.org/job/Precheck%20remote%20branch/2894 Details: http://integration.moodle.org/job/Precheck%20remote%20branch/2894/artifact/work/smurf.html Remote branch wip- MDL-45037 -26 to be integrated into upstream MOODLE_26_STABLE Executed job http://integration.moodle.org/job/Precheck%20remote%20branch/2895 Details: http://integration.moodle.org/job/Precheck%20remote%20branch/2895/artifact/work/smurf.html Remote branch wip- MDL-45037 -master to be integrated into upstream master Executed job http://integration.moodle.org/job/Precheck%20remote%20branch/2896 Details: http://integration.moodle.org/job/Precheck%20remote%20branch/2896/artifact/work/smurf.html
          Hide
          skodak Petr Skoda added a comment -

          makes sense to me, I suppose it would be better to use "!==" for string comparison there to make it easier to understand

          +1 for integration if you make the comparison strict, thanks!

          Show
          skodak Petr Skoda added a comment - makes sense to me, I suppose it would be better to use "!==" for string comparison there to make it easier to understand +1 for integration if you make the comparison strict, thanks!
          Hide
          abgreeve Adrian Greeve added a comment -

          Thanks for the review Petr.

          I've updated the strictness of the comparison as advised. Submitting for integration.

          Show
          abgreeve Adrian Greeve added a comment - Thanks for the review Petr. I've updated the strictness of the comparison as advised. Submitting for integration.
          Hide
          samhemelryk Sam Hemelryk added a comment -

          Thanks Adrian - this has been integrated now.

          Show
          samhemelryk Sam Hemelryk added a comment - Thanks Adrian - this has been integrated now.
          Hide
          fred Frédéric Massart added a comment -

          Passing thanks.

          Show
          fred Frédéric Massart added a comment - Passing thanks.
          Hide
          stronk7 Eloy Lafuente (stronk7) added a comment -

          Your code is now part of Moodle upstream, many thanks!

          It's a constant, continuous,
          spectacular world we live in,
          and every day you see things that
          just knock you out, if you pay attention.

          Robert Irwin

          Show
          stronk7 Eloy Lafuente (stronk7) added a comment - Your code is now part of Moodle upstream, many thanks! It's a constant, continuous, spectacular world we live in, and every day you see things that just knock you out, if you pay attention. Robert Irwin

            People

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

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                12/May/14