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

Plagiarism API needs to use the context/component/area/itemid pattern

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Minor Minor
    • None
    • 2.8.1
    • Plagiarism
    • MOODLE_28_STABLE

      Currently the plagiarism API has a call to plagiarism_get_links()

      /**
       * displays the similarity score and provides a link to the full report if allowed.
       *
       * @param object  $linkarray contains all relevant information for the plugin to generate a link                                    
       * @return string - url to allow login/viewing of a similarity report
       */
      function plagiarism_get_links($linkarray)
      

      This does not describe what is expected in the linkarray. This means that the plugins adding plagiarism support, each pass different custom data, and the plagiarism plugins each get custom coded to work with specific modules only.

      Current known abuses are "mod/assign/submission/onlinetext/locallib.php" passing the entire "assignment" record, and mod_forum passing the entire forum record.

      We should deprecate the passing of these module specific data structures, and insist on the magic 4 "context/component/area/itemid" passing through this API always (as well as "content" or "file" params).

      This is an API change - so master only at first and we can consider backporting just some phpdocs to say not to use this wrong data.

            Unassigned Unassigned
            damyon Damyon Wiese
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:

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