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

Review implementations of xxxx_pluginfile() functions in core

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • 2.7
    • Files API
    • MOODLE_27_STABLE

      While integrating MDL-39929, it was detected that different implementations of the xxxx_pluginfile() methods (mainly in activity modules) were showing some inconsistencies/differences that would be worth reviewing.

      Some of them include:

      • Handling of the $forcedownload parameter, sometimes used, other ignored when finally sending the file.
      • Potentially missing the $options param when sending the file.
      • Heterogeneous use of require_login() and require_course_login(), sometimes allowing autologinguests, others forbidding it.
      • Different implementations (sometimes using a big "switch case" like conditional use of "if...else", others sending not found...
      • ...

      In any case, we should review them and, while assuming they are working, try to homogenize (and cover with acceptance tests) all them. For clarity and because core implementations are often used as a reference for devs out there.

      That is it, ciao

            Unassigned Unassigned
            stronk7 Eloy Lafuente (stronk7)
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.