6b16559201
Default levels can be configured. Working on management interface for predefined skills.
35 lines
1.0 KiB
PHP
35 lines
1.0 KiB
PHP
<?php
|
|
if(isset($_SERVER['SCRIPT_FILENAME']))
|
|
{
|
|
// If SCRIPT_FILENAME is set, use that so the symlinked directories the developmen environment uses are handled correctly
|
|
$root = dirname(dirname(dirname($_SERVER['SCRIPT_FILENAME'])));
|
|
error_log("Using {$root}/config.php");
|
|
require_once($root."/config.php");
|
|
}
|
|
else
|
|
{
|
|
// If not, assume the cwd is not symlinked and proceed as we are used to
|
|
require_once("../../config.php");
|
|
}
|
|
|
|
// HOW DID WE ENSURE ONLY ADMINS CAN VIEW THIS PAGE?
|
|
|
|
require_once($CFG->libdir.'/adminlib.php');
|
|
|
|
|
|
admin_externalpage_setup("block_gradelevel_default_levels");
|
|
|
|
$systemcontext = context_system::instance();
|
|
// Check if user has capability to manage skills
|
|
require_capability('block/gradelevel:skillmanager', $systemcontext);
|
|
|
|
|
|
$PAGE->requires->js_call_amd('block_gradelevel/leveleditor', 'init');
|
|
|
|
print $OUTPUT->header();
|
|
print $OUTPUT->heading(get_string('cfgpage_globallevels', 'block_gradelevel'));
|
|
|
|
// render page for skill level 0 (global)
|
|
print block_gradelevel_skillmgmtservice::render_leveltable(0);
|
|
print $OUTPUT->footer();
|