Moodle: 获取老师的课程 Get Faculty Course Profiles

直接代码:

require_once('config.php');

//if (!isloggedin()) exit('<script>location="/moodle/login/"</script>'); 

require_once($CFG->dirroot .'/course/lib.php');
require_once($CFG->libdir .'/filelib.php');

$user_id = 3;

$mycourses = enrol_get_all_users_courses($user_id, true, null, 'visible DESC, sortorder ASC');
 
echo '<pre>'; print_r($mycourses); echo '</pre>';

 

 

原文:Moodle: 获取老师的课程 Get Faculty Course Profiles

你可能感兴趣的:(profile)