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

Remove redundant code from to get contenttype and load content in the Content Bank

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.10
    • Fix Version/s: None
    • Component/s: Content bank
    • Affected Branches:
      MOODLE_310_STABLE

      Description

      In several places, the Content Bank code checks the DB for specific content and then invoke a specific contenttype_XXX\contenttype and  contenttype_XXX\content to operate the methods.

      This code is always the same and now it is encapsulated into the methods:

      • contentbank\content::get_content_type_instance
      • contentbank\contentbank::get_content_from_id

      For example, in functions such delete_contents, move_contents, rename_content, etc. 

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              tusefomal Ferran Recio
              Participants:
              Component watchers:
              Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated: