|
|
|
|
@ -956,22 +956,12 @@ class IndexManager |
|
|
|
|
$show_create_link = false; |
|
|
|
|
$show_course_link = false; |
|
|
|
|
|
|
|
|
|
if (!api_is_anonymous()) { |
|
|
|
|
if (api_get_setting('allow_users_to_create_courses') === 'true') { |
|
|
|
|
$show_create_link = true; |
|
|
|
|
} else { |
|
|
|
|
if (api_is_allowed_to_create_course()) { |
|
|
|
|
$show_create_link = true; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
if (api_is_allowed_to_create_course()) { |
|
|
|
|
$show_create_link = true; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (api_is_course_admin() || api_is_allowed_to_create_course()) { |
|
|
|
|
if (api_get_setting('allow_students_to_browse_courses') === 'true') { |
|
|
|
|
$show_course_link = true; |
|
|
|
|
} else { |
|
|
|
|
if (api_get_setting('allow_students_to_browse_courses') === 'true') { |
|
|
|
|
$show_course_link = true; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// My account section |
|
|
|
|
|