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

Remove obsolete get_editing_head_contributions method

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.1.1
    • Fix Version/s: 2.2
    • Component/s: Questions
    • Labels:
    • Testing Instructions:
      Hide

      Try creating some questions, just to make sure this change has not caused any regressions.

      Grep the code for get_editing_head_contributions and verify there are no mentions anywhere.

      Show
      Try creating some questions, just to make sure this change has not caused any regressions. Grep the code for get_editing_head_contributions and verify there are no mentions anywhere.
    • Workaround:
      Hide

      use $PAGE->requires->js in the question edit form

      Show
      use $PAGE->requires->js in the question edit form
    • Affected Branches:
      MOODLE_21_STABLE
    • Fixed Branches:
      MOODLE_22_STABLE
    • Pull from Repository:
    • Pull Master Branch:

      Description

      In moodle 2.1 the function question_get_editing_head_contributions wich is in lib/questionlib.php seems to be never called despite what is said
      /**

      • Get anything that needs to be included in the head of the question editing page
      • for a particular question type. This function is called by question/question.php.
        *
      • @param $question A question object. Only $question->qtype is used.
      • @return string Deprecated. Some HTML code that can go inside the head tag.
        */
        There is no call in question/question.php
        As a result if you put a script.js or script.php file in your question type folder it is not used.
        I verified this in Moodle 2.1 but I don't know if this bug is also present in Moodle 2.0
        Also if the questiontype has a function get_editing_head_contributions function itself it is not taken into account as the parent one is not called

        Attachments

          Activity

            People

            Assignee:
            timhunt Tim Hunt
            Reporter:
            jmvedrine Jean-Michel Vedrine
            Integrator:
            Eloy Lafuente (stronk7)
            Tester:
            Sam Hemelryk
            Participants:
            Component watchers:
            Tim Hunt, Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              5/Dec/11