Skip to content

Commit

Permalink
MDL-50032 webservice: Remove plugin functions from mobile service
Browse files Browse the repository at this point in the history
  • Loading branch information
jleyva committed Mar 4, 2016
1 parent 186eba1 commit 0ca559a
Show file tree
Hide file tree
Showing 35 changed files with 179 additions and 178 deletions.
80 changes: 0 additions & 80 deletions lib/db/services.php
Original file line number Diff line number Diff line change
Expand Up @@ -1213,29 +1213,9 @@
'core_notes_delete_notes',
'core_user_get_course_user_profiles',
'core_message_send_instant_messages',
'mod_assign_get_grades',
'mod_assign_get_assignments',
'mod_assign_get_submissions',
'mod_assign_get_user_flags',
'mod_assign_set_user_flags',
'mod_assign_get_user_mappings',
'mod_assign_revert_submissions_to_draft',
'mod_assign_lock_submissions',
'mod_assign_unlock_submissions',
'mod_assign_save_submission',
'mod_assign_submit_for_grading',
'mod_assign_save_grade',
'mod_assign_save_user_extensions',
'mod_assign_reveal_identities',
'message_airnotifier_is_system_configured',
'message_airnotifier_are_notification_preferences_configured',
'core_grades_update_grades',
'mod_forum_get_forums_by_courses',
'mod_forum_get_forum_discussions_paginated',
'mod_forum_get_forum_discussion_posts',
'mod_forum_add_discussion_post',
'mod_forum_add_discussion',
'mod_forum_can_add_discussion',
'core_files_get_files',
'core_message_get_messages',
'core_message_create_contacts',
Expand All @@ -1253,9 +1233,7 @@
'core_course_get_courses',
'core_completion_update_activity_completion_status_manually',
'core_completion_mark_course_self_completed',
'mod_data_get_databases_by_courses',
'core_comment_get_comments',
'mod_forum_view_forum',
'core_course_view_course',
'core_course_search_courses',
'core_course_get_course_module',
Expand All @@ -1267,69 +1245,11 @@
'core_message_mark_message_read',
'core_message_delete_message',
'core_notes_view_notes',
'mod_forum_view_forum_discussion',
'core_user_view_user_profile',
'gradereport_user_view_grade_report',
'core_rating_get_item_ratings',
'mod_url_view_url',
'core_user_get_users_by_field',
'core_user_add_user_private_files',
'mod_assign_view_grading_table',
'mod_assign_view_submission_status',
'mod_scorm_view_scorm',
'mod_scorm_get_scorm_scoes',
'mod_scorm_get_scorm_user_data',
'mod_scorm_insert_scorm_tracks',
'mod_scorm_get_scorm_sco_tracks',
'mod_scorm_get_scorm_attempt_count',
'mod_scorm_get_scorms_by_courses',
'mod_scorm_launch_sco',
'mod_survey_get_surveys_by_courses',
'mod_survey_view_survey',
'mod_survey_get_questions',
'mod_survey_submit_answers',
'mod_page_view_page',
'mod_resource_view_resource',
'mod_folder_view_folder',
'mod_chat_login_user',
'mod_chat_get_chat_users',
'mod_chat_send_chat_message',
'mod_chat_get_chat_latest_messages',
'mod_chat_view_chat',
'mod_chat_get_chats_by_courses',
'mod_book_view_book',
'mod_book_get_books_by_courses',
'mod_choice_get_choice_results',
'mod_choice_get_choice_options',
'mod_choice_submit_choice_response',
'mod_choice_view_choice',
'mod_choice_get_choices_by_courses',
'mod_choice_delete_choice_responses',
'mod_lti_get_tool_launch_data',
'mod_lti_get_ltis_by_courses',
'mod_lti_view_lti',
'mod_imscp_view_imscp',
'mod_imscp_get_imscps_by_courses',
'mod_quiz_get_quizzes_by_courses',
'mod_quiz_view_quiz',
'mod_glossary_get_glossaries_by_courses',
'mod_wiki_get_wikis_by_courses',
'mod_wiki_view_wiki',
'mod_wiki_view_page',
'mod_wiki_get_subwikis',
'mod_glossary_view_glossary',
'mod_glossary_view_entry',
'mod_glossary_get_entries_by_letter',
'mod_glossary_get_entries_by_date',
'mod_glossary_get_categories',
'mod_glossary_get_entries_by_category',
'mod_glossary_get_authors',
'mod_glossary_get_entries_by_author',
'mod_glossary_get_entries_by_author_id',
'mod_glossary_get_entries_by_search',
'mod_glossary_get_entries_by_term',
'mod_glossary_get_entries_to_approve',
'mod_glossary_get_entry_by_id',
),
'enabled' => 0,
'restrictedusers' => 0,
Expand Down
51 changes: 34 additions & 17 deletions mod/assign/db/services.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,31 +30,35 @@
'methodname' => 'get_grades',
'classpath' => 'mod/assign/externallib.php',
'description' => 'Returns grades from the assignment',
'type' => 'read'
'type' => 'read',
'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE)
),

'mod_assign_get_assignments' => array(
'classname' => 'mod_assign_external',
'methodname' => 'get_assignments',
'classpath' => 'mod/assign/externallib.php',
'description' => 'Returns the courses and assignments for the users capability',
'type' => 'read'
'type' => 'read',
'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE)
),

'mod_assign_get_submissions' => array(
'classname' => 'mod_assign_external',
'methodname' => 'get_submissions',
'classpath' => 'mod/assign/externallib.php',
'description' => 'Returns the submissions for assignments',
'type' => 'read'
'type' => 'read',
'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE)
),

'mod_assign_get_user_flags' => array(
'classname' => 'mod_assign_external',
'methodname' => 'get_user_flags',
'classpath' => 'mod/assign/externallib.php',
'description' => 'Returns the user flags for assignments',
'type' => 'read'
'type' => 'read',
'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE)
),

'mod_assign_set_user_flags' => array(
Expand All @@ -63,87 +67,98 @@
'classpath' => 'mod/assign/externallib.php',
'description' => 'Creates or updates user flags',
'type' => 'write',
'capabilities'=> 'mod/assign:grade'
'capabilities'=> 'mod/assign:grade',
'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE)
),

'mod_assign_get_user_mappings' => array(
'classname' => 'mod_assign_external',
'methodname' => 'get_user_mappings',
'classpath' => 'mod/assign/externallib.php',
'description' => 'Returns the blind marking mappings for assignments',
'type' => 'read'
'type' => 'read',
'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE)
),

'mod_assign_revert_submissions_to_draft' => array(
'classname' => 'mod_assign_external',
'methodname' => 'revert_submissions_to_draft',
'classpath' => 'mod/assign/externallib.php',
'description' => 'Reverts the list of submissions to draft status',
'type' => 'write'
'type' => 'write',
'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE)
),

'mod_assign_lock_submissions' => array(
'classname' => 'mod_assign_external',
'methodname' => 'lock_submissions',
'classpath' => 'mod/assign/externallib.php',
'description' => 'Prevent students from making changes to a list of submissions',
'type' => 'write'
'type' => 'write',
'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE)
),

'mod_assign_unlock_submissions' => array(
'classname' => 'mod_assign_external',
'methodname' => 'unlock_submissions',
'classpath' => 'mod/assign/externallib.php',
'description' => 'Allow students to make changes to a list of submissions',
'type' => 'write'
'type' => 'write',
'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE)
),

'mod_assign_save_submission' => array(
'classname' => 'mod_assign_external',
'methodname' => 'save_submission',
'classpath' => 'mod/assign/externallib.php',
'description' => 'Update the current students submission',
'type' => 'write'
'type' => 'write',
'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE)
),

'mod_assign_submit_for_grading' => array(
'classname' => 'mod_assign_external',
'methodname' => 'submit_for_grading',
'classpath' => 'mod/assign/externallib.php',
'description' => 'Submit the current students assignment for grading',
'type' => 'write'
'type' => 'write',
'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE)
),

'mod_assign_save_grade' => array(
'classname' => 'mod_assign_external',
'methodname' => 'save_grade',
'classpath' => 'mod/assign/externallib.php',
'description' => 'Save a grade update for a single student.',
'type' => 'write'
'type' => 'write',
'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE)
),

'mod_assign_save_grades' => array(
'classname' => 'mod_assign_external',
'methodname' => 'save_grades',
'classpath' => 'mod/assign/externallib.php',
'description' => 'Save multiple grade updates for an assignment.',
'type' => 'write'
'type' => 'write',
'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE)
),

'mod_assign_save_user_extensions' => array(
'classname' => 'mod_assign_external',
'methodname' => 'save_user_extensions',
'classpath' => 'mod/assign/externallib.php',
'description' => 'Save a list of assignment extensions',
'type' => 'write'
'type' => 'write',
'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE)
),

'mod_assign_reveal_identities' => array(
'classname' => 'mod_assign_external',
'methodname' => 'reveal_identities',
'classpath' => 'mod/assign/externallib.php',
'description' => 'Reveal the identities for a blind marking assignment',
'type' => 'write'
'type' => 'write',
'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE)
),

'mod_assign_view_grading_table' => array(
Expand All @@ -152,7 +167,8 @@
'classpath' => 'mod/assign/externallib.php',
'description' => 'Trigger the grading_table_viewed event.',
'type' => 'write',
'capabilities' => 'mod/assign:view, mod/assign:viewgrades'
'capabilities' => 'mod/assign:view, mod/assign:viewgrades',
'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE)
),

'mod_assign_view_submission_status' => array(
Expand All @@ -161,6 +177,7 @@
'classpath' => 'mod/assign/externallib.php',
'description' => 'Trigger the submission status viewed event.',
'type' => 'write',
'capabilities' => 'mod/assign:view'
'capabilities' => 'mod/assign:view',
'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE)
),
);
2 changes: 1 addition & 1 deletion mod/assign/version.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@
defined('MOODLE_INTERNAL') || die();

$plugin->component = 'mod_assign'; // Full name of the plugin (used for diagnostics).
$plugin->version = 2015111601; // The current module version (Date: YYYYMMDDXX).
$plugin->version = 2015111602; // The current module version (Date: YYYYMMDDXX).
$plugin->requires = 2015111000; // Requires this Moodle version.
$plugin->cron = 60;
6 changes: 4 additions & 2 deletions mod/book/db/services.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@
'methodname' => 'view_book',
'description' => 'Simulate the view.php web interface book: trigger events, completion, etc...',
'type' => 'write',
'capabilities' => 'mod/book:read'
'capabilities' => 'mod/book:read',
'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE)
),

'mod_book_get_books_by_courses' => array(
Expand All @@ -42,6 +43,7 @@
'description' => 'Returns a list of book instances in a provided set of courses,
if no courses are provided then all the book instances the user has access to will be returned.',
'type' => 'read',
'capabilities' => ''
'capabilities' => '',
'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE)
)
);
2 changes: 1 addition & 1 deletion mod/book/version.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@
defined('MOODLE_INTERNAL') || die;

$plugin->component = 'mod_book'; // Full name of the plugin (used for diagnostics)
$plugin->version = 2015111600; // The current module version (Date: YYYYMMDDXX)
$plugin->version = 2015111601; // The current module version (Date: YYYYMMDDXX)
$plugin->requires = 2015111000; // Requires this Moodle version
$plugin->cron = 0; // Period for cron to check this module (secs)
18 changes: 12 additions & 6 deletions mod/chat/db/services.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,39 +33,44 @@
'methodname' => 'login_user',
'description' => 'Log a user into a chat room in the given chat.',
'type' => 'write',
'capabilities' => 'mod/chat:chat'
'capabilities' => 'mod/chat:chat',
'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE)
),

'mod_chat_get_chat_users' => array(
'classname' => 'mod_chat_external',
'methodname' => 'get_chat_users',
'description' => 'Get the list of users in the given chat session.',
'type' => 'read',
'capabilities' => 'mod/chat:chat'
'capabilities' => 'mod/chat:chat',
'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE)
),

'mod_chat_send_chat_message' => array(
'classname' => 'mod_chat_external',
'methodname' => 'send_chat_message',
'description' => 'Send a message on the given chat session.',
'type' => 'write',
'capabilities' => 'mod/chat:chat'
'capabilities' => 'mod/chat:chat',
'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE)
),

'mod_chat_get_chat_latest_messages' => array(
'classname' => 'mod_chat_external',
'methodname' => 'get_chat_latest_messages',
'description' => 'Get the latest messages from the given chat session.',
'type' => 'read',
'capabilities' => 'mod/chat:chat'
'capabilities' => 'mod/chat:chat',
'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE)
),

'mod_chat_view_chat' => array(
'classname' => 'mod_chat_external',
'methodname' => 'view_chat',
'description' => 'Trigger the course module viewed event and update the module completion status.',
'type' => 'write',
'capabilities' => 'mod/chat:chat'
'capabilities' => 'mod/chat:chat',
'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE)
),

'mod_chat_get_chats_by_courses' => array(
Expand All @@ -74,6 +79,7 @@
'description' => 'Returns a list of chat instances in a provided set of courses,
if no courses are provided then all the chat instances the user has access to will be returned.',
'type' => 'read',
'capabilities' => ''
'capabilities' => '',
'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE)
)
);
2 changes: 1 addition & 1 deletion mod/chat/version.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

defined('MOODLE_INTERNAL') || die();

$plugin->version = 2015111600; // The current module version (Date: YYYYMMDDXX).
$plugin->version = 2015111601; // The current module version (Date: YYYYMMDDXX).
$plugin->requires = 2015111000; // Requires this Moodle version.
$plugin->component = 'mod_chat'; // Full name of the plugin (used for diagnostics).
$plugin->cron = 300;
Loading

0 comments on commit 0ca559a

Please sign in to comment.