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

Web Services Documentation fault check when plugin does not exist

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Minor Minor
    • None
    • 3.3.3, 3.9.1
    • Web Services
    • None
    • MOODLE_33_STABLE, MOODLE_39_STABLE

      If a plugin does not exist in the file system when API Documentation is loaded the LMS returns:

       
      Coding error detected, it must be fixed by a programmer: Cannot find file with external function implementation

      More information about this error
      ×Debug info: 
      Error code: codingerror
      ×Stack trace: * line 87 of /lib/externallib.php: coding_exception thrown

      • line 39 of /admin/webservice/documentation.php: call to external_api::external_function_info()
         
         
        in admin/webservice/documentation.php on lines 33 to 41 should look like:
             
        $functions = $DB->get_records('external_functions', array(), 'name');
        foreach ($functions as $function) {

           $component = $function->component;
           $info = core_plugin_manager::instance()->get_plugin_info($component);

           if(file_exists($info->typerootdir.'/'.$info->name) || $info->component == 'moodle') {
                $functiondescs[$function->name] = external_api::external_function_info($function);
           }}
       
       
      Where the plugin CHECKS if the plugin exists in infrastructure prior to loading the API

            Unassigned Unassigned
            dustinbrisebois Dustin Brisebois
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.