Problem Description
I want to add a Contact Us page to Moodle and I used the below code. But this is not working, I get a completely blank page.
Can anybody point out the fault of this piece of code? I'm using Moodle 2.5 and I placed this file on the root directory of Moodle.
// The number of lines in front of config file determine the // hierarchy of files.
require_once(dirname(dirname(__FILE__)).'/../config.php');
$PAGE->set_context(get_system_context());
$PAGE->set_pagelayout('standard');
$PAGE->set_title("Contact US");
$PAGE->set_heading("Contact");
$PAGE->set_url($CFG->wwwroot.'/contact.php');
echo $OUTPUT->header();
// Actual content goes here
echo "Hello World";
echo $OUTPUT->footer();
AI-Generated Solution
Powered by LMSouq AI · GPT-4.1-mini
Analyzing problem and generating solution…
Was this solution helpful?