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

Allow IMS Enterprise to independently set Course Full name, Short Name and ID

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.1.3, 2.2, 2.3
    • Fix Version/s: 2.2.1
    • Component/s: Course
    • Labels:
    • Database:
      Any
    • Testing Instructions:
      Hide

      Use the attached file moodle_IMS_long_create.xml to load courses to Moodle. You will note that only one course will be created, and that has only the <short> tag completed. The other two fail as they are determined to be incomplete. No <short> tags.
      Delete courses. (note you may need to change the IMS test file, as there is a hash to see if it has been previously loaded)
      Apply the patch IMS_long.patch and repeat the process.
      3 new courses are created using the logic above.

      Show
      Use the attached file moodle_IMS_long_create.xml to load courses to Moodle. You will note that only one course will be created, and that has only the <short> tag completed. The other two fail as they are determined to be incomplete. No <short> tags. Delete courses. (note you may need to change the IMS test file, as there is a hash to see if it has been previously loaded) Apply the patch IMS_long.patch and repeat the process. 3 new courses are created using the logic above.
    • Workaround:
      Hide

      Rename Course full name and short name by hand.

      Show
      Rename Course full name and short name by hand.
    • Affected Branches:
      MOODLE_21_STABLE, MOODLE_22_STABLE, MOODLE_23_STABLE
    • Fixed Branches:
      MOODLE_22_STABLE
    • Pull Master Branch:
      master_MDL-29325

      Description

      The IMS Enterprise currently only supports the use of the <short> tag which is mapped to the Course Full name field of a new course. The ID is mapped to the short name and the ID fields. To allow for flexible naming, this patch checks for the <long> tag and assigns that to the course full name when present. To further assist with compatibility the changes check for the following conditions.

      If <long> && <short> are present, map them to Course full name and short name respectively
      If <long>, but no <short>, map <long> to Course full name, and Map <id> to short name and ID
      If <short>, but no <long>, map <short> to Course full name and Map <id> to short name and ID
      If neither <short> or <long> are specified, the course creation will fail.

        Gliffy Diagrams

        1. IMS_Enterprise_tags_2_1.patch
          2 kB
          Adam Barbary
        2. IMS_long.patch
          2 kB
          Adam Barbary
        3. moodle_IMS_long_create.xml
          1.0 kB
          Adam Barbary
        1. all courses loaded.jpg
          76 kB
        2. individual fields.jpg
          32 kB
        3. long not supported.jpg
          68 kB
        4. shortname and id same.jpg
          76 kB

          Activity

          Hide
          abarbary Adam Barbary added a comment -

          Because Moodle only recognises the <short> tag, Description takes <short> and short name and id take the <id> tag

          Show
          abarbary Adam Barbary added a comment - Because Moodle only recognises the <short> tag, Description takes <short> and short name and id take the <id> tag
          Hide
          abarbary Adam Barbary added a comment -

          The <long> tag is not supported, without <short> nothing is added.

          Show
          abarbary Adam Barbary added a comment - The <long> tag is not supported, without <short> nothing is added.
          Hide
          abarbary Adam Barbary added a comment -

          After patching, all courses are created, support for <long> and <short>

          Show
          abarbary Adam Barbary added a comment - After patching, all courses are created, support for <long> and <short>
          Hide
          abarbary Adam Barbary added a comment -

          IMS can now assign different values to Full name, short name and ID

          Show
          abarbary Adam Barbary added a comment - IMS can now assign different values to Full name, short name and ID
          Hide
          salvetore Michael de Raadt added a comment -

          Thanks for suggesting this and providing a patch.

          Show
          salvetore Michael de Raadt added a comment - Thanks for suggesting this and providing a patch.
          Hide
          abarbary Adam Barbary added a comment -

          Patch again for 2.1 this time.

          Show
          abarbary Adam Barbary added a comment - Patch again for 2.1 this time.
          Hide
          danmarsden Dan Marsden added a comment -

          NOTE TO INTEGRATOR: Master only.

          Show
          danmarsden Dan Marsden added a comment - NOTE TO INTEGRATOR: Master only.
          Hide
          stronk7 Eloy Lafuente (stronk7) added a comment -

          The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week.

          TIA and ciao

          Show
          stronk7 Eloy Lafuente (stronk7) added a comment - The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week. TIA and ciao
          Hide
          danmarsden Dan Marsden added a comment -

          rebased - NOTE TO INTEGRATOR:
          comment about master only was before we branched 22Stable - if possible can we please have this in 22Stable as well? (it cherry-picks fine)

          Show
          danmarsden Dan Marsden added a comment - rebased - NOTE TO INTEGRATOR: comment about master only was before we branched 22Stable - if possible can we please have this in 22Stable as well? (it cherry-picks fine)
          Hide
          nebgor Aparup Banerjee added a comment - - edited

          Thanks everyone, i've integrated this into 2.2.x and master.

          I've also tweaked the conditions very slightly to save 2 isset calls and help readability. (fixed a typo - thanks Rosie for the catch)

          Show
          nebgor Aparup Banerjee added a comment - - edited Thanks everyone, i've integrated this into 2.2.x and master. I've also tweaked the conditions very slightly to save 2 isset calls and help readability. (fixed a typo - thanks Rosie for the catch)
          Hide
          rwijaya Rossiani Wijaya added a comment -

          This is working great.

          Test passed.

          Show
          rwijaya Rossiani Wijaya added a comment - This is working great. Test passed.
          Hide
          stronk7 Eloy Lafuente (stronk7) added a comment -

          Whoever decided one week was worth 14 days had really one bad idea. Anyway, the nightmare is over, so thanks for your, once again, amazing contributions. Many, many thanks!

          Now... disconnect, relax and enjoy the next days, yay!

          Closing...ciao

          Show
          stronk7 Eloy Lafuente (stronk7) added a comment - Whoever decided one week was worth 14 days had really one bad idea. Anyway, the nightmare is over, so thanks for your, once again, amazing contributions. Many, many thanks! Now... disconnect, relax and enjoy the next days, yay! Closing...ciao

            People

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

              Dates

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