Note:

If you want to create a new page for developers, you should create it on the Moodle Developer Resource site.

Talk:Admin reports

From MoodleDocs
Revision as of 19:46, 20 August 2009 by james mergenthaler (talk | contribs) (creating admin report)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

I am using Moodle 1.9. I have created a new reporting module in my local moodle server. I did have problems getting the admin. functions to work, i tried following the examples here but was not able to move forward. To accomplish the same thing, I completed these steps:


Created a new folder under admin\report, called AU_ProfessionalDevelopment Copied index.php and settings.php from the admin\report\question folder (you could use a different folder under admin\report) edited the setting.php file, updating the code where it says question with my folder name AU_ProfessionalDevelopment.

code looked like this when done

$ADMIN->add('reports', new admin_externalpage('reportAU_ProfessionalDevelopment', get_string('AU_ProfessionalDevelopment', 'admin'), "$CFG->wwwroot/$CFG->admin/report/AU_ProfessionalDevelopment/index.php", 'moodle/site:config'));

edited the index.php, stripping out most of the code, leaving the following:

   require_once('../../../config.php');
   require_once($CFG->libdir.'/adminlib.php');

# these functions

   admin_externalpage_setup('reportAU_ProfessionalDevelopment');
   admin_externalpage_print_header();
   //print_heading(get_string('admin report', 'myReport'));

$header = "

Accelerateu PD Participant Activity Reporting

";

   echo $header;
   admin_externalpage_print_footer();

When i reloaded my moodle page, i could see AU_ProfessionalDevelopment within the admin\report block. When i click on the report - it loads my page with the admin header and footer.