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

Assignment types should be allowed to publish mnet rpc functions

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.9.4
    • 2.0
    • Assignment (2.2), MNet
    • None
    • Any
    • MOODLE_19_STABLE
    • MOODLE_20_STABLE

    Description

      I'm developing an assignment type in which the user submits a Mahara View within Moodle. It needs to call a couple of xmlrpc methods on a networked Mahara site. It is a requirement that this works in Moodle 1.9, so I need to ensure that the methods are defined on the Moodle side (even though they will never be called in Moodle), otherwise the user will not be permitted to send the method calls to the Mahara site.

      Modules can publish rpc methods currently in their rpclib.php file, but "sub" modules like assignment types and resource types cannot.

      Here are two possible solutions:

      (1) Add an rpclib.php in mod/assignment which 'collects' the published rpc functions from all the assignment types (see the file assignment_rpclib.patch).

      • The xmlrpc method bar provided by assignment type foo will be called 'mod/assignment/rpclib.php/bar'
      • If resource types want to publish rpc functions, a nearly identical rpclib.php could go in mod/resource too.

      (2) Modify admin/mnet/adminlib.php to look for rpclib.php files in mod/assignment/type/, mod/resource/type/ (see the file mnet_adminlib.patch)

      • The xmlrpc method bar provided by assignment type foo will be called 'mod/assignment/type/foo/rpclib.php/bar'
      • No need to add rpclib.php files in mod/assignment, mod/resource.

      Attachments

        Issue Links

          Activity

            People

              mjollnir Penny Leach
              richardmansfield Richard Mansfield
              Ilya Tregubov, Kevin Percy, Mathew May, Mihail Geshoski, Shamim Rezaie, David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                24/Nov/10