Talk:Admin reports: Difference between revisions
No edit summary |
No edit summary |
||
Line 4: | Line 4: | ||
'''2 -''' Copied index.php and settings.php from the admin\report\question folder (''you could use a different folder under admin\report'') | '''2 -''' Copied index.php and settings.php from the admin\report\question folder (''you could use a different folder under admin\report'') | ||
'''3 -''' edited | |||
'''3 -''' edited setting.php, updating '''question''' with folder name '''AU_ProfessionalDevelopment'''. | |||
code looked like this when done | code looked like this when done | ||
Line 10: | Line 11: | ||
$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')); | $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')); | ||
'''4 -''' edited | '''4 -''' edited index.php, stripping out most of the code, leaving the following: | ||
require_once('../../../config.php'); | require_once('../../../config.php'); | ||
require_once($CFG->libdir.'/adminlib.php'); | require_once($CFG->libdir.'/adminlib.php'); | ||
admin_externalpage_setup('reportAU_ProfessionalDevelopment'); | admin_externalpage_setup('reportAU_ProfessionalDevelopment'); | ||
admin_externalpage_print_header(); | admin_externalpage_print_header(); | ||
$header = "<h2>Accelerateu PD Participant Activity Reporting</h2>"; | $header = "<h2>Accelerateu PD Participant Activity Reporting</h2>"; | ||
echo $header; | echo $header; | ||
admin_externalpage_print_footer(); | admin_externalpage_print_footer(); | ||
'''5''' Reloaded the moodle page (i am logged in as the admin - and can see the Admin. Block). | '''5''' Reloaded the moodle page (i am logged in as the admin - and can see the Admin. Block). I can see '''AU_ProfessionalDevelopment''' in the admin\report block. Clicking on it loads my page with the admin header and footer. | ||
I can see '''AU_ProfessionalDevelopment''' in the admin\report block. |
Revision as of 19:58, 20 August 2009
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:
1 - Created a new folder under admin\report, called AU_ProfessionalDevelopment
2 - Copied index.php and settings.php from the admin\report\question folder (you could use a different folder under admin\report)
3 - edited setting.php, updating question with 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'));
4 - edited index.php, stripping out most of the code, leaving the following:
require_once('../../../config.php'); require_once($CFG->libdir.'/adminlib.php'); admin_externalpage_setup('reportAU_ProfessionalDevelopment'); admin_externalpage_print_header();
$header = "
Accelerateu PD Participant Activity Reporting
";
echo $header; admin_externalpage_print_footer();
5 Reloaded the moodle page (i am logged in as the admin - and can see the Admin. Block). I can see AU_ProfessionalDevelopment in the admin\report block. Clicking on it loads my page with the admin header and footer.