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

A call back to override course image in course_summary_exporter

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Reopened
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: Future Dev
    • Fix Version/s: None
    • Component/s: Course
    • Testing Instructions:
      Hide

      This is a new call back and to test it one needs to implement a new function {component_name}_override_course_image($course) in lib.php of the component. 

      1. Add a callback function {component_name}_override_course_image($course) to lib.php of one of the plugins.  And make sure it returns URL with image .
      2. Purge moodle cache 
      3. Create a course and a user
      4. Enrol the created user to the created course.
      5. Login as the user and make sure that my overview block on the main page displays an image URL from the function from step 1.
      Show
      This is a new call back and to test it one needs to implement a new function {component_name}_override_course_image($course) in lib.php of the component.  Add a callback function {component_name}_override_course_image($course) to lib.php of one of the plugins.  And make sure it returns URL with image . Purge moodle cache  Create a course and a user Enrol the created user to the created course. Login as the user and make sure that my overview block on the main page displays an image URL from the function from step 1.
    • Pull from Repository:
    • Pull Master Branch:
      MDL-66668-course-image-override-master

      Description

      Would be good to have a call back to be able to give plugins and opportunity to override course image in course_summary_exporter.

      Use case: we need to get a custom images to the block on dashboard. The business  logic is not very important here.

        Attachments

          Activity

            People

            Assignee:
            dmitriim Dmitrii Metelkin
            Reporter:
            dmitriim Dmitrii Metelkin
            Peer reviewer:
            Brendan Heywood
            Integrator:
            Jun Pataleta
            Participants:
            Component watchers:
            Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Víctor Déniz Falcón
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:

                Time Tracking

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 30 minutes
                30m