Moodle
  1. Moodle
  2. MDL-29325

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

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor 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
    • Rank:
      18859

      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.

      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
        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
        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
        Adam Barbary added a comment -

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

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

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

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

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

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

        Thanks for suggesting this and providing a patch.

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

        Patch again for 2.1 this time.

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

        NOTE TO INTEGRATOR: Master only.

        Show
        Dan Marsden added a comment - NOTE TO INTEGRATOR: Master only.
        Hide
        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
        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
        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
        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
        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
        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
        Rossiani Wijaya added a comment -

        This is working great.

        Test passed.

        Show
        Rossiani Wijaya added a comment - This is working great. Test passed.
        Hide
        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
        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: