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

Deprecate and fix plagiarismlib use of config vars

XMLWordPrintable

    • MOODLE_38_STABLE
    • MOODLE_39_STABLE
    • master_MDL-67872
    • 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. Run upgrade
      3. Enable plagiarism plugins - Site administration > Advanced features.
      4. Go Site administration > Plugins > Plagiarism > Manage plagiarism plugins - and follow the Setttings link
        1. You should get a message "Plugin is ready to go".
      5. Go to a course
      6. Turn editing on
      7. Create an assignment
      8. Edit the assignment
        1. Confirm that you see only one debugging message saying that the setting plagiarism:'.$plugin.'_use is deprecated.
        2. Confirm that you can see the "Test plagiarism plugin" in the form
      9. Edit the plagiarism/test/settings.php file
      10. Uncomment the commented-out lines 30-31
      11. Go Site administration > Plugins > Plagiarism > Manage plagiarism plugins - and follow the Setttings link
        1. You should get a message "Plugin is ready to go".
      12. Go back to the assignment and edit the settings.
        1. Check that there is no deprecation message on the settings page
        2. Confirm that you can see the "Test plagiarism plugin" in the form
      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. Run upgrade 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 a course Turn editing on Create an assignment Edit the assignment Confirm that you see only one debugging message saying that the setting plagiarism:'.$plugin.'_use is deprecated. Confirm that you can see the "Test plagiarism plugin" in the form Edit the plagiarism/test/settings.php file Uncomment the commented-out lines 30-31 Go Site administration > Plugins > Plagiarism > Manage plagiarism plugins - and follow the Setttings link You should get a message "Plugin is ready to go". Go back to the assignment and edit the settings. Check that there is no deprecation message on the settings page Confirm that you can see the "Test plagiarism plugin" in the form

      plagiarismlib.php plagiarism_load_available_plugins() doesn't use config consistently with other plugin types.
      get_config('plagiarism', $plugin."_use")

      https://github.com/moodle/moodle/blob/master/lib/plagiarismlib.php#L197

      we should deprecate this style of storing the details of enabled plagiarism plugins with something more like:

      get_config('plagiarism_'. $plugin, 'enabled')

      so that we are storing plugin settings within their own frankenstyle namespace instead of in the "global" "plagiarism" plugin space.

      we should be checking if that old var exists and if so, throw a debug notice - the plagiarism plugin developer should be responsible for migrating to the new method and deleting the old var from the db.

       

            danmarsden Dan Marsden
            danmarsden Dan Marsden
            Alexander Morris Alexander Morris
            Andrew Lyons Andrew Lyons
            Anna Carissa Sadia Anna Carissa Sadia
            Votes:
            0 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 hour, 41 minutes
                1h 41m

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