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

Allow local plugins to override mod/mod_form.php definition

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Won't Fix
    • Affects Version/s: 2.3
    • Fix Version/s: None
    • Component/s: Forms Library
    • Labels:

      Description

      For the next academic year, we intend to automatically create all summative assignments in Moodle based on our student records system. As a result, we'll be setting a number of parameters by default for these assignments including:

      • name (to match what the students see on their transcripts)
      • due date
      • plagiarism detection settings

      In order to do so, we need to alter the form for mod_assign, and possibly mod_turnitintool to prevent tutors from being able to change these settings.

      I was pondering the best way of doing this, and I suspect that there are other situations where others may have a requirement to do the same - or to change the defaults for core forms without changing the core component itself, and the solution I've come up with is to allow local plugins to extend the mod_{$module->name}_mod_form, override the definition, and change settings for the elements defined in the parent definition.

      I've got a working PoC and would appreciate some feedback.

        Attachments

          Activity

            People

            Assignee:
            dobedobedoh Andrew Lyons
            Reporter:
            dobedobedoh Andrew Lyons
            Participants:
            Component watchers:
            Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Sujith Haridasan
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: