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

deprecate plagiarism_get_form_elements()

    XMLWordPrintable

    Details

    • Testing Instructions:
      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.
    • Affected Branches:
      MOODLE_37_STABLE, MOODLE_38_STABLE
    • Fixed Branches:
      MOODLE_39_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-65835-master
    • Story Points:
      5
    • Sprint:
      Moppies Moodle 3.8 Sprint 1, Moppies Moodle 3.8 Sprint 2, Moppies Moodle 3.8 Sprint 3, Activity Sprint 2

      Description

      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

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              abgreeve Adrian Greeve
              Reporter:
              danmarsden Dan Marsden
              Peer reviewer:
              Mathew May
              Integrator:
              Jun Pataleta
              Tester:
              Ferran Recio
              Participants:
              Component watchers:
              Dan Marsden, Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Víctor Déniz Falcón
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                15/Jun/20

                  Time Tracking

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