我是新來的moodle。我創建了一個moodle網站,我創建了自定義菜單項。例如,當我點擊這些菜單項時,我創建了像Home,Aboutus這樣的菜單項,當我點擊Aboutus菜單項時,它會在我的網站上顯示aboutus細節以及如何在moodle中創建aboutus頁面。moodle中的菜單項
感謝您
我是新來的moodle。我創建了一個moodle網站,我創建了自定義菜單項。例如,當我點擊這些菜單項時,我創建了像Home,Aboutus這樣的菜單項,當我點擊Aboutus菜單項時,它會在我的網站上顯示aboutus細節以及如何在moodle中創建aboutus頁面。moodle中的菜單項
感謝您
創建一個Moodle的網站頁面的最簡單方法是使用「頁」資源類型。
如果您編輯'首頁'設置並勾選'包含主題部分'選項(並單擊保存更改!)。
然後,回到首頁,開啓編輯功能,點擊'添加活動或資源'並創建一個新的'Page'資源。
一旦您創建了該頁面資源,您就可以將該頁面的鏈接(從首頁)複製並用作「關於我們」的鏈接。
例如,如果你想用一個冠軍創造了新的一頁「新頁」和頭「外部」,你可以創建一個新的PHP文件external.php
或什麼,並把它下面的代碼:
<?php
// file external.php is the the root directory of Moodle
require_once('config.php');
// Open the page if the user is logged in
if (isloggedin()) {
$PAGE->set_context(get_system_context());
$PAGE->set_pagelayout('standart');
$PAGE->set_title("New page");
$PAGE->set_heading("External");
// path to this file
$PAGE->set_url($CFG->wwwroot . '/external.php');
// Code for navigation bar (Home -> Important)
$PAGE->navbar->ignore_active();
$strHome = "important";
$PAGE->navbar->add($strHome, new moodle_url('external.php'));
// Output the header
echo $OUTPUT->header();
$htmlscr = "<h1>Hello world!</h2>";
// Actual content goes here
echo $htmlscr;
echo $jscr;
echo $OUTPUT->footer();
}
// Else output error message
else {
echo "<h2>Please log in to procede</h2>";
}
?>
此頁面只能以登錄用戶看到。它在我的Moodle 2.6中工作正常。 更多詳細信息在Moodle文檔中https://docs.moodle.org/dev/Page_API
真的需要更多細節 - 您是如何創建菜單的? –