Merge branch 'MDL-49942-master' of git://github.com/jleyva/moodle
authorEloy Lafuente (stronk7) <stronk7@moodle.org>
Tue, 15 Sep 2015 20:52:13 +0000 (22:52 +0200)
committerEloy Lafuente (stronk7) <stronk7@moodle.org>
Tue, 15 Sep 2015 20:52:13 +0000 (22:52 +0200)
1  2 
lib/db/services.php

diff --combined lib/db/services.php
@@@ -323,24 -323,6 +323,24 @@@ $functions = array
          'capabilities'  => 'moodle/course:managegroups',
      ),
  
 +    'core_group_get_activity_allowed_groups' => array(
 +        'classname'     => 'core_group_external',
 +        'methodname'    => 'get_activity_allowed_groups',
 +        'classpath'     => 'group/externallib.php',
 +        'description'   => 'Gets a list of groups that the user is allowed to access within the specified activity.',
 +        'type'          => 'read',
 +        'capabilities'  => '',
 +    ),
 +
 +    'core_group_get_activity_groupmode' => array(
 +        'classname'     => 'core_group_external',
 +        'methodname'    => 'get_activity_groupmode',
 +        'classpath'     => 'group/externallib.php',
 +        'description'   => 'Returns effective groupmode used in a given activity.',
 +        'type'          => 'read',
 +        'capabilities'  => '',
 +    ),
 +
      'core_notes_get_course_notes' => array(
          'classname'     => 'core_notes_external',
          'methodname'    => 'get_course_notes',
          'capabilities'=> 'moodle/course:view,moodle/course:update,moodle/course:viewhiddencourses',
      ),
  
+     'core_course_search_courses' => array(
+         'classname'     => 'core_course_external',
+         'methodname'    => 'search_courses',
+         'classpath'     => 'course/externallib.php',
+         'description'   => 'Search courses by (name, module, block, tag)',
+         'type'          => 'read',
+         'capabilities'  => '',
+     ),
      'moodle_course_create_courses' => array(
          'classname'   => 'moodle_course_external',
          'methodname'  => 'create_courses',
          'classpath'   => 'lib/external/externallib.php',
          'description' => 'Return a translated string - similar to core get_string() call',
          'type'        => 'read',
 +        'loginrequired' => false,
 +        'ajax'        => true,
      ),
  
      'core_get_strings' => array(
          'classpath'   => 'lib/external/externallib.php',
          'description' => 'Return some translated strings - like several core get_string() calls',
          'type'        => 'read',
 +        'loginrequired' => false,
 +        'ajax'        => true,
      ),
  
      'core_get_component_strings' => array(
          'description' => 'Return all raw strings (with {$a->xxx}) for a specific component
              - similar to core get_component_strings() call',
          'type'        => 'read',
 +        'loginrequired' => false,
 +        'ajax'        => true,
      ),
  
  
          'classname'   => 'core\output\external',
          'methodname'  => 'load_template',
          'description' => 'Load a template for a renderable',
 -        'type'        => 'read'
 +        'type'        => 'read',
 +        'loginrequired' => false,
 +        'ajax'        => true,
      ),
  
      // Completion related functions.
          'methodname'  => 'update_tags',
          'description' => 'Updates tags',
          'type'        => 'write',
 +        'ajax'        => true
      ),
  
      'core_tag_get_tags' => array(
          'methodname'  => 'get_tags',
          'description' => 'Gets tags by their ids',
          'type'        => 'read',
 +        'ajax'        => true
      ),
  
  );
@@@ -1153,7 -1134,6 +1162,7 @@@ $services = array
              'mod_forum_get_forum_discussions_paginated',
              'mod_forum_get_forum_discussion_posts',
              'mod_forum_add_discussion_post',
 +            'mod_forum_add_discussion',
              'core_files_get_files',
              'core_message_get_messages',
              'core_message_create_contacts',
              'core_message_get_blocked_users',
              'gradereport_user_get_grades_table',
              'core_group_get_course_user_groups',
 +            'core_group_get_activity_allowed_groups',
 +            'core_group_get_activity_groupmode',
              'core_user_remove_user_device',
              'core_course_get_courses',
              'core_completion_update_activity_completion_status_manually',
              'core_comment_get_comments',
              'mod_forum_view_forum',
              'core_course_view_course',
+             'core_course_search_courses',
              'core_completion_get_activities_completion_status',
              'core_notes_get_course_notes',
              'core_completion_get_course_completion_status',
              'core_user_add_user_private_files',
              'mod_assign_view_grading_table',
              'mod_scorm_view_scorm',
 +            'mod_scorm_get_scorm_attempt_count',
              'mod_page_view_page',
              'mod_resource_view_resource',
              'mod_folder_view_folder',