using function "core_course_get_courses_by_field" to sort courses after type of "enrollmentmethods" not availiable?

using function "core_course_get_courses_by_field" to sort courses after type of "enrollmentmethods" not availiable?

by Peter Traenkle -
Number of replies: 0

Hello everyone!

I’m trying to request a course-list by calling the wsfunction=core_course_get_courses_by_field using curl request (REST API)

in order to have courses sorted after their enrollmentmethods I use for example

-d field=enrollmentmethods -d value="manual". 

Unfortunately, within the outputted json-file I get the following error message: 


{

    "debuginfo": "Invalid field name",

    "errorcode": "invalidparameter",

    "exception": "invalid_parameter_exception",

    "message": "Invalid parameter value detected (Invalid field name)"

}


Is that field just not included in the function somehow?

Because in calling the field "shortname" with one of the course short-names I get the data for that specific course and for that case and course-id it works just fine. 


Any help or hint is highly appreciated!!


Best wishes 


Peter

Average of ratings: -