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

Assignment types should be allowed to publish mnet rpc functions

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.9.4
    • Fix Version/s: 2.0
    • Component/s: Assignment (2.2), MNet
    • Labels:
      None
    • Database:
      Any
    • Affected Branches:
      MOODLE_19_STABLE
    • Fixed Branches:
      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.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Votes:
                  1 Vote for this issue
                  Watchers:
                  4 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    24/Nov/10