Get course modules for a course:
I was trying to get course modules for current courseid. Tried to pull out the array values with print_r and var_dump, not with exact string conversion.
I was looking for module instance or module id and module name (modname) from the array output.
I want the course modules from the course, displays coursename, modules on a custom page.
global $DB;
$course = $DB->get_record('course', array('id' => $courseid));
$info = get_fast_modinfo($course);
print_r($info);
//var_dump($info);