You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
91 lines
2.4 KiB
91 lines
2.4 KiB
12 years ago
|
<?php
|
||
|
/* For licensing terms, see /license.txt */
|
||
|
|
||
|
$cidReset = true;
|
||
|
|
||
8 years ago
|
require_once __DIR__.'/../inc/global.inc.php';
|
||
12 years ago
|
|
||
|
$this_section = SECTION_PLATFORM_ADMIN;
|
||
|
|
||
10 years ago
|
api_protect_admin_script(false, true);
|
||
7 years ago
|
Skill::isAllowed();
|
||
12 years ago
|
|
||
|
//Adds the JS needed to use the jqgrid
|
||
10 years ago
|
$htmlHeadXtra[] = api_get_js('d3/d3.v3.5.4.min.js');
|
||
12 years ago
|
$htmlHeadXtra[] = api_get_js('d3/colorbrewer.js');
|
||
12 years ago
|
$htmlHeadXtra[] = api_get_js('d3/jquery.xcolor.js');
|
||
|
|
||
12 years ago
|
$tpl = new Template(null, false, false);
|
||
12 years ago
|
|
||
12 years ago
|
$load_user = 0;
|
||
|
if (isset($_GET['load_user'])) {
|
||
|
$load_user = 1;
|
||
|
}
|
||
12 years ago
|
|
||
12 years ago
|
$skill_condition = '';
|
||
12 years ago
|
if (isset($_GET['skill_id'])) {
|
||
12 years ago
|
$skill_condition = '&skill_id='.intval($_GET['skill_id']);
|
||
|
$tpl->assign('skill_id_to_load', $_GET['skill_id']);
|
||
12 years ago
|
}
|
||
12 years ago
|
|
||
12 years ago
|
$url = api_get_path(WEB_AJAX_PATH)."skill.ajax.php?a=get_skills_tree_json&load_user=$load_user";
|
||
12 years ago
|
$tpl->assign('wheel_url', $url);
|
||
12 years ago
|
|
||
8 years ago
|
$url = api_get_path(WEB_AJAX_PATH).'skill.ajax.php?1=1';
|
||
12 years ago
|
$tpl->assign('url', $url);
|
||
10 years ago
|
$tpl->assign('isAdministration', true);
|
||
12 years ago
|
|
||
10 years ago
|
$dialogForm = new FormValidator('form', 'post', null, null, ['id' => 'add_item']);
|
||
10 years ago
|
$dialogForm->addLabel(
|
||
|
get_lang('Name'),
|
||
|
Display::tag('p', null, ['id' => 'name', 'class' => 'form-control-static'])
|
||
|
);
|
||
|
$dialogForm->addLabel(
|
||
5 years ago
|
get_lang('Short code'),
|
||
10 years ago
|
Display::tag('p', null, ['id' => 'short_code', 'class' => 'form-control-static'])
|
||
|
);
|
||
|
$dialogForm->addLabel(
|
||
|
get_lang('Parent'),
|
||
|
Display::tag('p', null, ['id' => 'parent', 'class' => 'form-control-static'])
|
||
|
);
|
||
|
$dialogForm->addLabel(
|
||
5 years ago
|
[get_lang('Assessments'), get_lang('With Certificate')],
|
||
10 years ago
|
Display::tag('ul', null, ['id' => 'gradebook', 'class' => 'form-control-static list-unstyled'])
|
||
10 years ago
|
);
|
||
10 years ago
|
$dialogForm->addLabel(
|
||
|
get_lang('Description'),
|
||
7 years ago
|
Display::tag(
|
||
|
'p',
|
||
|
null,
|
||
|
['id' => 'description', 'class' => 'form-control-static']
|
||
|
)
|
||
10 years ago
|
);
|
||
|
|
||
10 years ago
|
$tpl->assign('dialogForm', $dialogForm->returnForm());
|
||
|
|
||
8 years ago
|
$saveProfileForm = new FormValidator(
|
||
|
'form',
|
||
|
'post',
|
||
|
null,
|
||
|
null,
|
||
|
['id' => 'dialog-form-profile']
|
||
|
);
|
||
10 years ago
|
$saveProfileForm->addHidden('profile_id', null);
|
||
8 years ago
|
$saveProfileForm->addText(
|
||
|
'name',
|
||
|
get_lang('Name'),
|
||
|
true,
|
||
|
['id' => 'name_profile']
|
||
|
);
|
||
|
$saveProfileForm->addTextarea(
|
||
|
'description',
|
||
|
get_lang('Description'),
|
||
|
['id' => 'description_profile', 'rows' => 6]
|
||
|
);
|
||
|
$tpl->assign('save_profile_form', $saveProfileForm->returnForm());
|
||
8 years ago
|
$templateName = $tpl->get_template('skill/skill_wheel.tpl');
|
||
|
$content = $tpl->fetch($templateName);
|
||
8 years ago
|
|
||
12 years ago
|
$tpl->assign('content', $content);
|
||
7 years ago
|
$tpl->displaySkillLayout();
|