|
|
|
|
@ -17,7 +17,7 @@ |
|
|
|
|
* same as the current one. If it isn't it will update session information from |
|
|
|
|
* the database. You can also force the course reset if you want ($gidReset). |
|
|
|
|
* |
|
|
|
|
The course id is stored in $_cid session variable. |
|
|
|
|
The course id is stored in $_cid session variable. |
|
|
|
|
* The group id is stored in $_gid session variable. |
|
|
|
|
* |
|
|
|
|
* |
|
|
|
|
@ -71,16 +71,16 @@ The course id is stored in $_cid session variable. |
|
|
|
|
* string $_course['extLink' ]['url' ] |
|
|
|
|
* string $_course['extLink' ]['name'] |
|
|
|
|
* string $_course['categoryCode'] |
|
|
|
|
* string $_course['categoryName'] |
|
|
|
|
|
|
|
|
|
* boolean $is_courseMember |
|
|
|
|
* boolean $is_courseTutor |
|
|
|
|
* boolean $is_courseAdmin |
|
|
|
|
* |
|
|
|
|
* |
|
|
|
|
* GROUP VARIABLES |
|
|
|
|
* string $_course['categoryName'] |
|
|
|
|
|
|
|
|
|
* boolean $is_courseMember |
|
|
|
|
* boolean $is_courseTutor |
|
|
|
|
* boolean $is_courseAdmin |
|
|
|
|
* |
|
|
|
|
* |
|
|
|
|
* GROUP VARIABLES |
|
|
|
|
* |
|
|
|
|
* int $_gid (the group id) |
|
|
|
|
* int $_gid (the group id) |
|
|
|
|
* |
|
|
|
|
* |
|
|
|
|
* IMPORTANT ADVICE FOR DEVELOPERS |
|
|
|
|
@ -122,20 +122,20 @@ The course id is stored in $_cid session variable. |
|
|
|
|
* 7. The script initializes the user status and permission for the group level. |
|
|
|
|
* |
|
|
|
|
* @package chamilo.include |
|
|
|
|
*/ |
|
|
|
|
/* |
|
|
|
|
*/ |
|
|
|
|
/* |
|
|
|
|
INIT SECTION |
|
|
|
|
variables should be initialised here |
|
|
|
|
*/ |
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
require_once api_get_path(LIBRARY_PATH).'course.lib.php'; |
|
|
|
|
require_once (api_get_path(LIBRARY_PATH).'conditionallogin.lib.php'); |
|
|
|
|
require_once api_get_path(LIBRARY_PATH).'course.lib.php'; |
|
|
|
|
require_once (api_get_path(LIBRARY_PATH).'conditionallogin.lib.php'); |
|
|
|
|
|
|
|
|
|
// verified if exists the username and password in session current |
|
|
|
|
if (isset($_SESSION['info_current_user'][1]) && isset($_SESSION['info_current_user'][2])) { |
|
|
|
|
// verified if exists the username and password in session current |
|
|
|
|
if (isset($_SESSION['info_current_user'][1]) && isset($_SESSION['info_current_user'][2])) { |
|
|
|
|
require_once api_get_path(LIBRARY_PATH).'usermanager.lib.php'; |
|
|
|
|
require_once api_get_path(LIBRARY_PATH).'legal.lib.php'; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
//Conditional login |
|
|
|
|
if (isset($_SESSION['conditional_login']['uid']) && $_SESSION['conditional_login']['can_login']=== true){ |
|
|
|
|
require_once (api_get_path(LIBRARY_PATH).'usermanager.lib.php'); |
|
|
|
|
@ -177,7 +177,7 @@ $login = isset($_POST["login"]) ? $_POST["login"] : ''; |
|
|
|
|
|
|
|
|
|
/* |
|
|
|
|
MAIN CODE |
|
|
|
|
*/ |
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
if (!empty($_SESSION['_user']['user_id']) && ! ($login || $logout)) { |
|
|
|
|
// uid is in session => login already done, continue with this value |
|
|
|
|
|