accessing apis/ web service function which are not core web services functions

accessing apis/ web service function which are not core web services functions

Ujwal Gupta發表於
Number of replies: 4

i want to update the settings like end time, start time, safe browsing etc of quiz in a section. But moodle is not providing the api / web service function for updating the settings. Is there any way except creating a whole new local plugin to accomplice this task (eg. any admin apis which we can access by some authentication and update the settings of quiz or there is some another web service function which does this task.)

評比平均分數: -
In reply to Ujwal Gupta

accessing apis/ web service function which are not core web services functions

Howard Miller發表於
Core developers的相片 Documentation writers的相片 Particularly helpful Moodlers的相片 Peer reviewers的相片 Plugin developers的相片
The web service functions that you get from the automatic documentation are all there is (even though there are lots).

Yes, if you need something extra the "correct" path is to create new local plugin that exposes the required functions. It's often not especially difficult.
評比平均分數:Useful (1)
In reply to Howard Miller

accessing apis/ web service function which are not core web services functions

Ujwal Gupta發表於
after creating a new local plugin do i have to expose the plugin to the open source community of moodle and only after doing so i can use it? or i can directly use that plugin for my website? also where should i place that plugin such that my moodle website can locate the function in it
In reply to Ujwal Gupta

accessing apis/ web service function which are not core web services functions

Mark Sharp發表於
Core developers的相片 Particularly helpful Moodlers的相片 Plugin developers的相片

Hi,

You don't have to share your code with the community, especially if it's bespoke to your system. But the license still needs to be GPL.

About local plugins, they live in the `local` directory in Moodle. There's a readme.txt in that directory with some useful information, plus some documentation here: Local plugins | Moodle Developer Resources and some information on requirements for all Moodle plugins: Common files | Moodle Developer Resources

Defining external (web service) functions: Function Definitions | Moodle Developer Resources

If you're creating external functions, it's well worth understanding Capabilities and making sure only those with permissions can make changes. Access API | Moodle Developer Resources

評比平均分數:Useful (2)
In reply to Mark Sharp

accessing apis/ web service function which are not core web services functions

Ujwal Gupta發表於
Its very helpful! Thank you so much for sharing.