Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-32225 add plagiarism api hooks to other areas of Moodle code
  3. MDL-34593

add extra plugin param to plagiarism_get_form_elements_module()

    XMLWordPrintable

Details

    • Sub-task
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.4
    • 2.4
    • Plagiarism
    • MOODLE_24_STABLE
    • MOODLE_24_STABLE
    • master_MDL-34593_add_extra_plugin_param_to_get_form_elements_module
    • Hide

      This can only be tested by a developer, no core code calls these functions.
      Also - the existing plagiarism plugins don't make use of this parameter (yet) - once this patch is accepted we'll patch the plugins to use the new param.

      Show
      This can only be tested by a developer, no core code calls these functions. Also - the existing plagiarism plugins don't make use of this parameter (yet) - once this patch is accepted we'll patch the plugins to use the new param.

    Description

      now that we've added hooks to various plugins we're finding the current method of obtaining the current module type is a bit fragile.

      We need to add an extra param to plagiarism_get_form_elements_module() called $plugin which contains the $module->component (frankenstyle name) - so in mod forum it would look like this:
      plagiarism_get_form_elements_module($mform, $ctx->get_course_context(), 'mod_forum');

      Attachments

        Activity

          People

            danmarsden Dan Marsden
            danmarsden Dan Marsden
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Dan Marsden, Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Laurent David, Sara Arjona (@sarjona)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              3/Dec/12