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

deprecate plagiarism_get_form_elements()

XMLWordPrintable

    • MOODLE_37_STABLE, MOODLE_38_STABLE
    • MOODLE_39_STABLE
    • MDL-65835-master
    • Hide
      • It is recommended that a developer do this test as it requires editing the test plugin.

      test

      1. Install the test plagiarism plugin (plagiarism_test.zip) in the plagiarism directory.
      2. Enable plagiarism plugins - Site administration > Advanced features.
      3. Go Site administration > Plugins > Plagiarism > Manage plagiarism plugins - and follow the Setttings link. You should get a message "Plugin is ready to go".
      4. Go to / create an assignment.
      5. On the modedit.php page check you see a debugging message saying that plagiarism_plugin::get_form_elements_module() is deprecated.
      6. Save the form. Check that you see another debugging message saying that plagiarism_plguin::save_form_elements() is deprecated.
      7. Edit the plagiarism plugin to remove the two methods in the class. (plagiarism/test/lib.php)
      8. Go back to the assignment and edit the settings.
      9. Check that there is no deprecation message on the settings page.
      10. Save the form.
      11. Check that there is no deprecation message when saving the assignment settings.

      for the curious

      1. Update the two functions in lib.php of the test plugin and check that they work.
      Show
      It is recommended that a developer do this test as it requires editing the test plugin. test Install the test plagiarism plugin (plagiarism_test.zip) in the plagiarism directory. Enable plagiarism plugins - Site administration > Advanced features. Go Site administration > Plugins > Plagiarism > Manage plagiarism plugins - and follow the Setttings link. You should get a message "Plugin is ready to go". Go to / create an assignment. On the modedit.php page check you see a debugging message saying that plagiarism_plugin::get_form_elements_module() is deprecated. Save the form. Check that you see another debugging message saying that plagiarism_plguin::save_form_elements() is deprecated. Edit the plagiarism plugin to remove the two methods in the class. (plagiarism/test/lib.php) Go back to the assignment and edit the settings. Check that there is no deprecation message on the settings page. Save the form. Check that there is no deprecation message when saving the assignment settings. for the curious Update the two functions in lib.php of the test plugin and check that they work.
    • 5
    • Moppies Moodle 3.8 Sprint 1, Moppies Moodle 3.8 Sprint 2, Moppies Moodle 3.8 Sprint 3, Activity Sprint 2

      we should deprecate plagiarism_get_form_elements() and recommend the use of the coursemodule callbacks (added in 3.1)

      The "replacement" function would be to use plagiarism_get_form_elements - but by using callbacks plugin devs can also hook into the validation/edit_post_actions functions as well which wasn't possible using plagiarism_get_form_elements

            abgreeve Adrian Greeve
            danmarsden Dan Marsden
            Glyn (Mathew) May Glyn (Mathew) May
            Jun Pataleta Jun Pataleta
            Ferran Recio Ferran Recio
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 6 hours, 45 minutes
                6h 45m

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