@ -12,7 +12,7 @@ require_once __DIR__.'/../inc/global.inc.php';
$this_section = SECTION_PLATFORM_ADMIN;
api_protect_admin_script();
Skill::isAllow();
Skill::isAllowed();
$backpack = 'https://backpack.openbadges.org/';
@ -14,7 +14,7 @@ $cidReset = true;
require_once __DIR__.'/../inc/global.inc.php';
@ -16,7 +16,7 @@ require_once __DIR__.'/../inc/global.inc.php';
$interbreadcrumb[] = array("url" => 'index.php', "name" => get_lang('PlatformAdmin'));
$interbreadcrumb[] = array('url' => 'skill_list.php', 'name' => get_lang('ManageSkills'));
@ -14,7 +14,7 @@ require_once __DIR__.'/../inc/global.inc.php';
$action = isset($_GET['action']) ? $_GET['action'] : 'list';
$skillId = isset($_GET['id']) ? intval($_GET['id']) : 0;
@ -11,7 +11,7 @@ require_once __DIR__.'/../inc/global.inc.php';
//Adds the JS needed to use the jqgrid
$htmlHeadXtra[] = api_get_js('jquery.jsPlumb.all.js');
$htmlHeadXtra[] = api_get_jqgrid_js();
$interbreadcrumb[] = array(
'url' => 'index.php',
api_protect_admin_script(false, true);
$htmlHeadXtra[] = api_get_js('d3/d3.v3.5.4.min.js');
@ -109,7 +109,7 @@ if (api_is_platform_admin()) {
api_get_path(WEB_CODE_PATH).'admin/add_drh_to_user.php?u='.$userId
);
if (Skill::isAllow($userId, false)) {
if (Skill::isAllowed($userId, false)) {
$actions[] = Display::url(
Display::return_icon(
'skill-badges.png',
@ -21,7 +21,7 @@ if (empty($userId)) {
api_not_allowed(true);
}
SkillManager::isAllow($userId);
SkillManager::isAllowed($userId);
$user = api_get_user_entity($userId);
@ -46,7 +46,7 @@ if (!$user || !$skill) {
exit;
Skill::isAllow($user->getId());
Skill::isAllowed($user->getId());
$userInfo = [
'id' => $user->getId(),
@ -20,7 +20,7 @@ if (!$userId || !$skillId) {
Skill::isAllow($userId);
Skill::isAllowed($userId);
$em = Database::getManager();
$user = $em->find('ChamiloUserBundle:User', $userId);
@ -15,7 +15,7 @@ if (empty($userId)) {
$courseId = api_get_course_int_id();
$sessionId = api_get_session_id();
@ -10,7 +10,7 @@ $action = isset($_REQUEST['a']) ? $_REQUEST['a'] : null;
api_block_anonymous_users();
Skill::isAllow(api_get_user_id());
Skill::isAllowed(api_get_user_id());
$skill = new Skill();
$gradebook = new Gradebook();
@ -4368,7 +4368,7 @@ class CourseManager
'session_category_id' => $session_category_id
if (Skill::isAllow($user_id, false)) {
if (Skill::isAllowed($user_id, false)) {
$objUser = $em->find('ChamiloUserBundle:User', $user_id);
$objCourse = $em->find('ChamiloCoreBundle:Course', $course['real_id']);
@ -1917,7 +1917,7 @@ class Skill extends Model
*
* @return bool
*/
public static function isAllow($studentId = 0, $blockPage = true)
public static function isAllowed($studentId = 0, $blockPage = true)
{
if (self::isToolAvailable()) {
if (api_is_platform_admin()) {
@ -2130,7 +2130,7 @@ class SocialManager extends UserManager
public static function getSkillBlock($userId)
if (Skill::isAllow($userId, false) === false) {
if (Skill::isAllowed($userId, false) === false) {
return '';
@ -6454,7 +6454,7 @@ class Tracking
public static function displayUserSkills($userId, $courseId = 0, $sessionId = 0)
$skillManager = new Skill();
@ -395,7 +395,7 @@ class IndexManager
];
if (Skill::isAllow(0, false)) {
if (Skill::isAllowed(0, false)) {
$items[] = [
'icon' => Display::return_icon('skill-badges.png', get_lang('MySkills')),
'link' => api_get_path(WEB_CODE_PATH).'social/my_skills_report.php',
@ -407,7 +407,7 @@ if (api_can_login_as($student_id)) {
Display::return_icon('login_as.png', get_lang('LoginAs'), null, ICON_SIZE_MEDIUM).'</a> ';
if (Skill::isAllow($student_id, false)) {
if (Skill::isAllowed($student_id, false)) {
echo Display::url(
@ -10,7 +10,7 @@
$userId = api_get_user_id();
$isStudent = api_is_student();
$isStudentBoss = api_is_student_boss();
@ -10,7 +10,7 @@ $cidReset = true;
//Add the JS needed to use the jqgrid
$this_section = SECTION_MYPROFILE;
@ -10,7 +10,7 @@ require_once __DIR__.'/../inc/global.inc.php';
$this_section = SECTION_SOCIAL;