Trying to add a new external single structure

  • Anthony Chung
  • Topic Author
  • Offline
  • New Member
  • New Member
More
12 years 9 months ago - 12 years 9 months ago #1 by Anthony Chung
Trying to add a new external single structure was created by Anthony Chung
Hi,

I am trying to add a new value to /helpers/externallib.php

inside: function get_course_mods_returns() {
....
'mods' => new external_multiple_structure(
new external_single_structure(
array (
'id' => new external_value(PARAM_INT, 'resource id'),
'name' => new external_value(PARAM_RAW, 'name'),
'mod' => new external_value(PARAM_RAW, 'mod'),
'type' => new external_value(PARAM_RAW, 'type'),
'newvalue' => new external_value(PARAM_RAW, 'newvalue'),

However, this will work if the user is a student. For users who are Administrator or teacher or manager, it will return:
XML-RPC Error (404): Unknown error

I believe this is a permission issue but could you share some light where to correct such issue?

joomdle_connector user issue?

Thanks

Anthony
Last edit: 12 years 9 months ago by Anthony Chung.

Please Log in or Create an account to join the conversation.

More
12 years 9 months ago #2 by Antonio Durán
Replied by Antonio Durán on topic Trying to add a new external single structure
You should enable debugging in Moodle to get more info about the error.

Please Log in or Create an account to join the conversation.