Details

    • Type: Epic
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 2.1.2, Future Dev
    • Fix Version/s: DEV backlog
    • Component/s: Web Services
    • Labels:
    • Affected Branches:
      MOODLE_21_STABLE
    • Epic Name:
      Web service API Roadmap

      Description

      How to add a web service function into core

      if you want to suggest or implement a web service function, read the Moodledocs.

      Integration priority

      1. the ones required for the official Mobile app (generally very few)
      2. the ones for which a git patch has been submitted.
      3. the most voted ones
      4. the other ones

        Gliffy Diagrams

          Issue Links

          1.
          core_user_get_users() Sub-task Closed Jérôme Mouneyrac
           
          2.
          core_course_delete_courses Sub-task Closed Juan Leyva
           
          3.
          core_course_get_recent_activity() Sub-task Closed Unassigned
           
          4.
          core_course_get_contents() Sub-task Closed Jérôme Mouneyrac
           
          5.
          core_course_update_courses() Sub-task Closed Rajesh Taneja
           
          6.
          core_cohort_xxxx_cohorts() Sub-task Closed Andrea Bicciolo
           
          7. enrol_manual_unenrol_users() Sub-task Development in progress Unassigned
           
          8. enrol_ manual_update_enrolments() Sub-task Development in progress Unassigned
           
          9. core_message_xxx_instant_messages() Sub-task Development in progress Unassigned
           
          10.
          core_message_xxx_contacts() Sub-task Closed Frédéric Massart
           
          11.
          core_notes_xxx_notes() Sub-task Closed Jason Fowler
           
          12.
          core_event_trigger_event() Sub-task Closed Frédéric Massart
           
          13. core_calendar_update_calendar_events() Sub-task Development in progress Unassigned
           
          14.
          core_files_xxx_files() Sub-task Closed Unassigned
           
          15.
          core_grade_xxx_grades() Sub-task Closed Juan Leyva
           
          16.
          core_grade_xxx_scales() Sub-task Closed Unassigned
           
          17.
          core_grade_get_outcomes() Sub-task Closed Unassigned
           
          18.
          core_rating_xxxx_ratings() Sub-task Closed Unassigned
           
          19.
          core_comment_xxx_comments() Sub-task Closed Unassigned
           
          20.
          core_course_delete_modules() Sub-task Closed Mark Nelson
           
          21.
          mod_forum_get_discussions() Sub-task Closed Mark Nelson
           
          22.
          mod_forum_get_forum_discussion_posts() Sub-task Closed Juan Leyva
           
          23.
          core_grade_get_definitions Sub-task Closed Paul Charsley
           
          24.
          mod_assign_get_submissions Sub-task Closed Paul Charsley
           
          25.
          mod_assign_get_assignments Sub-task Closed Paul Charsley
           
          26.
          core_users_get_users_with_capability Sub-task Closed Paul Charsley
           
          27.
          core_gradingform_update_definitions Sub-task Closed Unassigned
           
          28.
          mod_assign_get_grades Sub-task Closed Paul Charsley
           
          29.
          mod_assign_set_grades Sub-task Closed Unassigned
           
          30.
          core_course_duplicate_course Sub-task Closed Juan Leyva
           
          31.
          core_group_xxx_groupings Sub-task Closed Juan Leyva
           
          32.
          core_course_xxx_categories() Sub-task Closed Jérôme Mouneyrac
           
          33.
          core_course_import_course Sub-task Closed Juan Leyva
           
          34.
          enrol_cohort_xxx() Sub-task Closed Unassigned
           
          35. core_course_create_backups Sub-task Open Juan Leyva
           
          36.
          core_group_[assign|unassign]_module_grouping Sub-task Closed Ankit Agarwal
           
          37.
          core_user_get_users_by_field() Sub-task Closed Jérôme Mouneyrac
           
          38.
          Core lib: get_module Sub-task Closed Mark Nelson
           
          39. mod_forum_create/update_forums Sub-task Open Unassigned
           
          40.
          Core lib: create/update module Sub-task Closed Jérôme Mouneyrac
           
          41.
          mod_forum_get_forum() Sub-task Closed Mark Nelson
           
          42.
          core_calendar_delete_calendar_events() Sub-task Closed Ankit Agarwal
           
          43.
          core_calendar_get_calendar_events() Sub-task Closed Ankit Agarwal
           
          44.
          core_calendar_create_calendar_events() Sub-task Closed Ankit Agarwal
           
          45. core_calendar_update_calendar_events() Sub-task Open moodle.com
           
          46. mod_forum_xxx_discussions() Sub-task Open moodle.com
           
          47. core_enrol_get_instances() Sub-task Open Unassigned
           
          48.
          mod_assign_get_user_xx Sub-task Closed Paul Charsley
           
          49. core_course_create_sections Sub-task Open Unassigned
           
          50. core_course_create_modules Sub-task Open Unassigned
           
          51.
          mod_assign_set_user_flags Sub-task Closed Paul Charsley
           
          52.
          core_user_add_user_device Sub-task Closed Juan Leyva
           
          53.
          core_message_get_messages Sub-task Closed Juan Leyva
           
          54.
          Web Service for SSO Sub-task Closed Juan Leyva
           
          55.
          New WS function: core_message_get_blocked_users Sub-task Closed Juan Leyva
           
          56.
          mod_forum_get_forum_discussions_paginated Sub-task Closed Juan Leyva
           
          57.
          gradereport_user_get_grades_table Sub-task Closed Juan Leyva
           
          58.
          core_user_remove_user_device Sub-task Closed Juan Leyva
           
          59.
          core_group_get_course_user_groups Sub-task Closed Juan Leyva
           
          60.
          core_comment_get_comments Sub-task Closed Juan Leyva
           
          61. mod_glossary_xxx services Sub-task Open Juan Leyva
           
          62.
          core_completion_get_course_completion_status Sub-task Closed Juan Leyva
           
          63.
          core_completion_get_activities_completion_status Sub-task Closed Juan Leyva
           
          64.
          core_notes_get_course_notes Sub-task Closed Juan Leyva
           
          65.
          mod_data_get_databases_by_courses Sub-task Closed Juan Leyva
           
          66.
          core_rating_get_item_ratings Sub-task Closed Juan Leyva
           
          67. mod_data_get_entries Sub-task Open Juan Leyva
           
          68.
          core_completion_update_activity_completion_status_manually Sub-task Closed Juan Leyva
           
          69.
          core_course_view_course Sub-task Closed Juan Leyva
           
          70.
          core_user_view_user_list Sub-task Closed Juan Leyva
           
          71.
          core_user_view_user_profile Sub-task Closed Juan Leyva
           
          72.
          gradereport_user_view_grade_report Sub-task Closed Juan Leyva
           
          73.
          core_message_mark_message_read Sub-task Closed Juan Leyva
           
          74.
          mod_forum_view_forum Sub-task Closed Juan Leyva
           
          75.
          mod_forum_view_forum_discussion Sub-task Closed Juan Leyva
           
          76.
          core_notes_view_notes Sub-task Closed Juan Leyva
           
          77. mod_assign_view_grading_table Sub-task Waiting for peer review Juan Leyva
           
          78. core_course_search_courses() Sub-task Open Costantino Cito
           
          79. mod_book_view_book Sub-task Open Juan Leyva
           
          80. mod_book_view_chapter Sub-task Open Juan Leyva
           
          81. mod_imscp_view_imscp Sub-task Open Juan Leyva
           
          82. mod_choice_get_choices_by_courses Sub-task Open Costantino Cito
           
          83. mod_choice_get_choice_results Sub-task Open Costantino Cito
           
          84. mod_choice_get_choice_options Sub-task Open Costantino Cito
           
          85. mod_choice_submit_choice_response Sub-task Open Costantino Cito
           

            Issues in Epic

              Activity

              Hide
              andreabix Andrea Bicciolo added a comment -

              Hello Jerome,

              there are tentative dates to better understand when the listed web services are planned to be implemented ?

              Show
              andreabix Andrea Bicciolo added a comment - Hello Jerome, there are tentative dates to better understand when the listed web services are planned to be implemented ?
              Hide
              jerome Jérôme Mouneyrac added a comment - - edited

              Hi Andrea,
              I will implement this API starting next week or the week after.

              I'll be working on the sub-tasks in this order:
              1) the ones we require for the official Mobile app
              2) the ones for which a patch has been submitted. I'll go through all of the patches. If there is no major changes required, I or the contributor will make the minor changes and we'll submit them for integration.
              3) the most voted ones
              4) the other ones ... but hopefully we will be stuck in 2) or 3).

              Previously, I had time to successfully submit to integration 1 to 2 web services functions per week. I can see at least half of this list (51 subtasks) implemented for 2.3, the 1st of June.

              Edit (24/04/12): this obviously will not happen for 2.3

              Show
              jerome Jérôme Mouneyrac added a comment - - edited Hi Andrea, I will implement this API starting next week or the week after. I'll be working on the sub-tasks in this order: 1) the ones we require for the official Mobile app 2) the ones for which a patch has been submitted. I'll go through all of the patches. If there is no major changes required, I or the contributor will make the minor changes and we'll submit them for integration. 3) the most voted ones 4) the other ones ... but hopefully we will be stuck in 2) or 3). Previously, I had time to successfully submit to integration 1 to 2 web services functions per week. I can see at least half of this list (51 subtasks) implemented for 2.3, the 1st of June. Edit (24/04/12): this obviously will not happen for 2.3
              Hide
              andreabix Andrea Bicciolo added a comment -

              Hi Jerome.

              thanks for the clarification, I must vote here an there then

              Show
              andreabix Andrea Bicciolo added a comment - Hi Jerome. thanks for the clarification, I must vote here an there then
              Hide
              jerome Jérôme Mouneyrac added a comment -

              I linked few issues because they have contributed patches (so we remember of them easily and why not integrate them if possible )

              Show
              jerome Jérôme Mouneyrac added a comment - I linked few issues because they have contributed patches (so we remember of them easily and why not integrate them if possible )
              Hide
              libertymoodle Luis de Vasconcelos added a comment -

              Are there any plans to update the Web service test client under Site administration / Development? In 2.2.1+ (Build: 20120112) the new core_* functions are not available - only the moodle_* functions are available.

              Show
              libertymoodle Luis de Vasconcelos added a comment - Are there any plans to update the Web service test client under Site administration / Development? In 2.2.1+ (Build: 20120112) the new core_* functions are not available - only the moodle_* functions are available.
              Hide
              chrisf Chris Fryer added a comment -

              I see the Web Services Roadmap (http://docs.moodle.org/dev/Web_services_Roadmap) was trimmed significantly on March 9th 2012. Can you point me to the discussion where this was decided, please? A lot of functionality we were looking forward to has now gone.

              Show
              chrisf Chris Fryer added a comment - I see the Web Services Roadmap ( http://docs.moodle.org/dev/Web_services_Roadmap ) was trimmed significantly on March 9th 2012. Can you point me to the discussion where this was decided, please? A lot of functionality we were looking forward to has now gone.
              Hide
              jerome Jérôme Mouneyrac added a comment -

              Hi Chris, I just kept the already integrated web service core function in the Moodledocs. The Roadmap is in this issue The reason of this change is that I'm the one updating it and I don't want to update it in two different places. I'll mention it more clearly on the Moodledocs.

              Show
              jerome Jérôme Mouneyrac added a comment - Hi Chris, I just kept the already integrated web service core function in the Moodledocs. The Roadmap is in this issue The reason of this change is that I'm the one updating it and I don't want to update it in two different places. I'll mention it more clearly on the Moodledocs.
              Hide
              blrandel Bayard Randel added a comment -

              Web service functions relating to blogs.

              Show
              blrandel Bayard Randel added a comment - Web service functions relating to blogs.
              Hide
              bill@ashtree-partnership.com Bill Stock added a comment -

              45567 was raised seperately to reopen this issue.

              Show
              bill@ashtree-partnership.com Bill Stock added a comment - 45567 was raised seperately to reopen this issue.
              Hide
              marina Marina Glancy added a comment -

              This issue has been converted to Epic. Please do not create any more sub-tasks, instead add issues in Epic. Also keep in mind that sub-tasks can not be added to HQ sprints.
              Let me know if you need help in bulk-converting unresolved sub-tasks into epic issues.

              Show
              marina Marina Glancy added a comment - This issue has been converted to Epic. Please do not create any more sub-tasks, instead add issues in Epic. Also keep in mind that sub-tasks can not be added to HQ sprints. Let me know if you need help in bulk-converting unresolved sub-tasks into epic issues.
              Hide
              dmonllao David Monllaó added a comment -

              Hi, Juan Leyva, Frédéric Massart, Costantino Cito or anyone from mobile can please explain (or post a link to the discussion) why you decided to create a web service function for each different activity? Will we have another set of _by_id(), create_xxxx, update_xxx methods....? This issue seems a good place to explain the proposed roadmap

              Show
              dmonllao David Monllaó added a comment - Hi, Juan Leyva , Frédéric Massart , Costantino Cito or anyone from mobile can please explain (or post a link to the discussion) why you decided to create a web service function for each different activity? Will we have another set of _by_id(), create_xxxx, update_xxx methods....? This issue seems a good place to explain the proposed roadmap
              Hide
              jleyva Juan Leyva added a comment -

              Hi David,

              basically we tried to be consistent with existing functions (prior to mobile) so we decided to add specific functions for retrieving activities by courses like the mod_assign or mod_forum did.

              The reason for adding specific functions for activities are that:

              • Every activity has a different data model so they are going to return different settings/values
              • In those functions we check the specific permissions/access restrictions so they users only can see as response the same that they can see/guess in the web interface (student don't see specific administration settings, etc..) Note that some activities implement mod_xxx:view permissions and others not
              • Unit tests are designed to fail if the data model for the activity is changed, so any change in the data model will require the programmer to review the external function.

              As a side note, we tried to avoid mobile specific functions, so everybody can benefit of our work.

              Apart from that, we are not currently thinking in CUD functions (create, update, delete) except for the SCORM module (see specs https://docs.moodle.org/dev/SCORM_1.2_player_in_the_Mobile_app) and the quiz (https://docs.google.com/document/d/137-fNd-Z-wQhc-t_oeeG4YdFjMuQVHs9DfjBUDSbyIA/edit wip)

              BTW, maybe the learning plans external functions should be mentioned here

              Show
              jleyva Juan Leyva added a comment - Hi David, basically we tried to be consistent with existing functions (prior to mobile) so we decided to add specific functions for retrieving activities by courses like the mod_assign or mod_forum did. The reason for adding specific functions for activities are that: Every activity has a different data model so they are going to return different settings/values In those functions we check the specific permissions/access restrictions so they users only can see as response the same that they can see/guess in the web interface (student don't see specific administration settings, etc..) Note that some activities implement mod_xxx:view permissions and others not Unit tests are designed to fail if the data model for the activity is changed, so any change in the data model will require the programmer to review the external function. As a side note, we tried to avoid mobile specific functions, so everybody can benefit of our work. Apart from that, we are not currently thinking in CUD functions (create, update, delete) except for the SCORM module (see specs https://docs.moodle.org/dev/SCORM_1.2_player_in_the_Mobile_app ) and the quiz ( https://docs.google.com/document/d/137-fNd-Z-wQhc-t_oeeG4YdFjMuQVHs9DfjBUDSbyIA/edit wip) BTW, maybe the learning plans external functions should be mentioned here
              Hide
              dmonllao David Monllaó added a comment -

              Thanks for the explanation Juan. I agree that, if there are modules that require specifics, that is fine. We already disagreed on how this component is evolving, Moodle HQ will have to maintain all this and looking at https://github.com/ccito/moodle/compare/f1a415e...MDL-50538-master (sorry, I don't know if it is a WIP, it is the first one I've picked) I see 0 abstraction and I see parts of the code that are candidates to be copy & pasted to other modules. Considering that there are a few modules in core and we want to make life easier for 3rd party developers, would be nice if you could abstract stuff.

              Yes, Mark Nelson is the learning plans project lead, he (or Damyon Wiese may be interested in linking here some info here. I asked for info because I saw issues for each module and I didn't see any issue about a module level abstraction.

              Show
              dmonllao David Monllaó added a comment - Thanks for the explanation Juan. I agree that, if there are modules that require specifics, that is fine. We already disagreed on how this component is evolving, Moodle HQ will have to maintain all this and looking at https://github.com/ccito/moodle/compare/f1a415e...MDL-50538-master (sorry, I don't know if it is a WIP, it is the first one I've picked) I see 0 abstraction and I see parts of the code that are candidates to be copy & pasted to other modules. Considering that there are a few modules in core and we want to make life easier for 3rd party developers, would be nice if you could abstract stuff. Yes, Mark Nelson is the learning plans project lead, he (or Damyon Wiese may be interested in linking here some info here. I asked for info because I saw issues for each module and I didn't see any issue about a module level abstraction.
              Hide
              jleyva Juan Leyva added a comment -

              Hello David,

              thanks for your feedback.

              Costa started working a week ago in those Web Services and we already noticed that there is a lot of "boiler plate" code we can reuse among similar functions.

              For Moodle 3.0 we have opened this EPIC: MDL-49833 where we are adding all the re-factor and improvement tasks, so probably we will adding issues there for adding new external functions for:

              • Creating a default user external structure (to be used if a external function return information about users)
              • Creating a default file external structure (to be used if a external function return information about files)
              • Creating some helper methods (like multiple courses validation)
                etc...

              But this will have to wait to next month since we are pretty busy with Moodle Mobile 2

              Regards, Juan

              Show
              jleyva Juan Leyva added a comment - Hello David, thanks for your feedback. Costa started working a week ago in those Web Services and we already noticed that there is a lot of "boiler plate" code we can reuse among similar functions. For Moodle 3.0 we have opened this EPIC: MDL-49833 where we are adding all the re-factor and improvement tasks, so probably we will adding issues there for adding new external functions for: Creating a default user external structure (to be used if a external function return information about users) Creating a default file external structure (to be used if a external function return information about files) Creating some helper methods (like multiple courses validation) etc... But this will have to wait to next month since we are pretty busy with Moodle Mobile 2 Regards, Juan
              Hide
              dmonllao David Monllaó added a comment -

              Hi Juan,

              Ok, so if I understand it correctly, the idea is to push now to integration issues like https://github.com/jleyva/moodle/compare/17abbfb...MDL-50349-master (for example) and later, then someone has time for MDL-49833, update the *_by_courses functions?

              Show
              dmonllao David Monllaó added a comment - Hi Juan, Ok, so if I understand it correctly, the idea is to push now to integration issues like https://github.com/jleyva/moodle/compare/17abbfb...MDL-50349-master (for example) and later, then someone has time for MDL-49833 , update the *_by_courses functions?
              Hide
              dmonllao David Monllaó added a comment -

              Yesterday in SCRUM we also discussed about possible improvements to web services base for the same reason.

              Show
              dmonllao David Monllaó added a comment - Yesterday in SCRUM we also discussed about possible improvements to web services base for the same reason.
              Hide
              jleyva Juan Leyva added a comment -

              Hi David,

              nope, the plan is to not integrate anything with boiler plate code, the mod_scorm_get_scorm_by_courses can and must wait to land in master. It was my fault to ask for a peer review of that WS.

              During the next month we'll start working in the MDL-49833 Epic, the first thing we'll do will be helper functions for the *_by_courses functions.

              I hope it's clear now.

              Regards, Juan

              Show
              jleyva Juan Leyva added a comment - Hi David, nope, the plan is to not integrate anything with boiler plate code, the mod_scorm_get_scorm_by_courses can and must wait to land in master. It was my fault to ask for a peer review of that WS. During the next month we'll start working in the MDL-49833 Epic, the first thing we'll do will be helper functions for the *_by_courses functions. I hope it's clear now. Regards, Juan

                People

                • Votes:
                  14 Vote for this issue
                  Watchers:
                  24 Start watching this issue

                  Dates

                  • Created:
                    Updated: