Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
メニューリストにすべてのmoodleコースを表示する必要があります。PHPコードまたはmoodle組み込み関数を使用してすべてのコースを取得する方法を教えてください。
ありがとう
このファイルを含める
require_once($CFG->dirroot . '/lib/coursecatlib.php');
この関数を使用して、メニュー リストのすべてのコースを取得します。
$allcourses = coursecat::get(0)->get_courses(array('recursive' => true)); var_dump($allcourses);exit;