Hi everyone, sorry in advance, I'm new to Moodle
I'd like to test my angular front performing a web service call with the standard web service function core_course_get_course_module_by_instance which has 2 parameters "module" (string - of component type) and "instance" (integer) but how do I find the module name and instance id of a given module?
My course "GDP" has a quiz activity module "test: 1" how can I find out the module name and instance ID?
In the below REST call I have tried the component name "mod_quiz" and the instance id "1":
My error is "Invalid external api parameter: the value is "TEST%1instance=1", the server was expecting "component" type"
But if I try the frankenstyle name "mod_TEST: 1" or variants without punctuation "mod_test_1" don't work either.
The code given in the https://docs.moodle.org/dev/Course_module looks good, but it assumes I already know the
global $DB;
$course = $DB->get_record('course', array('id' => $courseid));
$info = get_fast_modinfo($course);
print_object($info);
is the 'course' in this case 'gdp' and then what is the get course id function?