Merge with CBlue 1.8.8.2

skala
Noel Dieschburg 14 years ago
commit 6ef14576bb
  1. 3
      custompages/first_login.php
  2. 2
      custompages/index-logged.php
  3. 21
      custompages/index-unlogged.php
  4. 12
      custompages/lostpassword.php
  5. 34
      custompages/registration-feedback.php
  6. 44
      custompages/registration.php
  7. 140
      custompages/style-ie6.css
  8. 101
      custompages/style.css
  9. 0
      documentation/dependencies.html
  10. 0
      license.txt
  11. 0
      main/admin/access_url_add_courses_to_url.php
  12. 0
      main/admin/access_url_add_sessions_to_url.php
  13. 0
      main/admin/access_url_add_users_to_url.php
  14. 0
      main/admin/access_url_edit_courses_to_url.php
  15. 0
      main/admin/access_url_edit_sessions_to_url.php
  16. 0
      main/admin/access_url_edit_users_to_url.php
  17. 0
      main/admin/add_many_session_to_category.php
  18. 65
      main/admin/cli.php
  19. 0
      main/admin/course_create_content.php
  20. 0
      main/admin/course_virtual.php
  21. 2
      main/admin/languages.php
  22. 0
      main/admin/ldap_synchro.php
  23. 0
      main/admin/ldap_users_list.php
  24. 0
      main/admin/ldap_users_synchro.php
  25. 0
      main/admin/statistics/index.php
  26. 0
      main/admin/subscribe_class2course.php
  27. 0
      main/admin/subscribe_user2class.php
  28. 0
      main/admin/system_status.php
  29. 0
      main/attendance/attendance_list.php
  30. 109
      main/auth/external_login/functions.inc.php
  31. 114
      main/auth/external_login/ldap.conf.php
  32. 181
      main/auth/external_login/ldap.inc.php
  33. 65
      main/auth/external_login/login.ldap.php
  34. 66
      main/auth/external_login/newUser.ldap.php
  35. 56
      main/auth/external_login/newUser.php
  36. 40
      main/auth/external_login/updateUser.php
  37. 127
      main/auth/external_logininfo/updateUser.php
  38. 329
      main/auth/inscription.php
  39. 0
      main/auth/ldap/authldap.php
  40. 0
      main/auth/ldap/ldap_var.inc.php
  41. 0
      main/auth/ldap/login.php
  42. 0
      main/auth/ldap/newUser.php
  43. 89
      main/auth/lostPassword.php
  44. 0
      main/auth/lost_password.lib.php
  45. 0
      main/auth/my_progress.php
  46. 0
      main/auth/openid/login.php
  47. 0
      main/auth/openid/openid.conf.php
  48. 0
      main/auth/openid/openid.lib.php
  49. 0
      main/auth/openid/whatis.php
  50. 0
      main/auth/openid/xrds.lib.php
  51. 14
      main/auth/profile.php
  52. 0
      main/blog/calendar.php
  53. 0
      main/calendar/allagendas.php
  54. 0
      main/calendar/download.php
  55. 0
      main/calendar/myagenda.php
  56. 0
      main/chat/chat.php
  57. 0
      main/chat/header_frame.inc.php
  58. 4
      main/course_home/activity.php
  59. 4
      main/course_home/vertical_activity.php
  60. 0
      main/course_info/delete_course.php
  61. 0
      main/course_info/download.lib.php
  62. 0
      main/course_info/download.php
  63. 0
      main/course_info/maintenance.php
  64. 0
      main/course_info/postpone.php
  65. 0
      main/course_progress/layout.php
  66. 0
      main/course_progress/thematic_controller.php
  67. 0
      main/coursecopy/backup.php
  68. 0
      main/coursecopy/classes/Announcement.class.php
  69. 0
      main/coursecopy/classes/CourseArchiver.class.php
  70. 0
      main/coursecopy/classes/CourseSession.class.php
  71. 0
      main/coursecopy/classes/Document.class.php
  72. 0
      main/coursecopy/classes/DummyCourseCreator.class.php
  73. 0
      main/coursecopy/classes/Event.class.php
  74. 0
      main/coursecopy/classes/Forum.class.php
  75. 0
      main/coursecopy/classes/ForumCategory.class.php
  76. 0
      main/coursecopy/classes/ForumPost.class.php
  77. 0
      main/coursecopy/classes/ForumTopic.class.php
  78. 0
      main/coursecopy/classes/Glossary.class.php
  79. 0
      main/coursecopy/classes/LinkCategory.class.php
  80. 0
      main/coursecopy/classes/Quiz.class.php
  81. 0
      main/coursecopy/classes/QuizQuestion.class.php
  82. 0
      main/coursecopy/classes/ScormDocument.class.php
  83. 0
      main/coursecopy/classes/Survey.class.php
  84. 0
      main/coursecopy/classes/SurveyInvitation.class.php
  85. 0
      main/coursecopy/classes/SurveyQuestion.class.php
  86. 0
      main/coursecopy/classes/ToolIntro.class.php
  87. 0
      main/coursecopy/classes/wiki.class.php
  88. 0
      main/coursecopy/create_backup.php
  89. 0
      main/coursecopy/import_backup.php
  90. 0
      main/coursecopy/recycle_course.php
  91. 0
      main/css/public_admin/scorm.css
  92. 0
      main/document/download.php
  93. 0
      main/document/footerpage.php
  94. 0
      main/document/headerpage.php
  95. 0
      main/document/quota.php
  96. 102
      main/document/remote.php
  97. 0
      main/document/showinframes.php
  98. 0
      main/document/slideshow.inc.php
  99. 0
      main/document/slideshowoptions.php
  100. 2
      main/document/upload.php
  101. Some files were not shown because too many files have changed in this diff Show More

@ -67,7 +67,10 @@ if ($_GET['invalid'] == 2) {
<div id="header">
<img src="/custompages/images/header.png" alt="Logo" />
</div> <!-- #header -->
<h2> <?php echo cblue_get_lang('FirstLogin');?> </h2>
<div id="changepassword-form-box" class="form-box">
<div class="info"> <?php echo cblue_get_lang('FirstLoginChangePassword');?> </div>
<?php if (isset($error_message)) {
echo '<div id="changepassword-form-error" class="form-error">'.$error_message.'</div>';
}?>

@ -1,5 +1,5 @@
<?php
require_once('main/inc/global.inc.php');
require_once(dirname(__FILE__).'/../main/inc/global.inc.php');
//require_once api_get_path(LIBRARY_PATH).'usermanager.lib.php';
header("Location: /user_portal.php");

@ -52,22 +52,24 @@ if (isset($_GET['loginFailed'])){
</head>
<body>
<div id="backgroundimage">
<img src="/custompages/images/page-background.png" class="backgroundimage" />
<img src="<?php echo api_get_path(WEB_PATH)?>/custompages/images/page-background.png" class="backgroundimage" />
</div>
<div id="wrapper">
<div id="header">
<img src="/custompages/images/header.png" alt="Logo" />
<img src="<?php echo api_get_path(WEB_PATH)?>/custompages/images/header.png" alt="Logo" />
</div> <!-- #header -->
<div id="login-form-box" class="form-box">
<?php if ($values['reset_password']) {
echo '<div id="login-form-info" class="form-info">'.cblue_get_lang('your_password_has_been_reset').'</div>';
}?>
<div id="login-form-info" class="form-info">
<?php if (isset($content['info']) && !empty($content['info'] )) {
echo $content['info'];
}?>
</div>
<?php if (isset($error_message)) {
echo '<div id="login-form-info" class="form-error">'.$error_message.'</div>';
}?>
<form id="login-form" class="form" action="/index.php" method="post">
<form id="login-form" class="form" action="<?php echo api_get_path(WEB_PATH)?>index.php" method="post">
<div>
<label for="login">*<?php echo cblue_get_lang('Username');?></label>
<label for="login">*<?php echo cblue_get_lang('User');?></label>
<input name="login" type="text" /><br />
<label for="password">*<?php echo cblue_get_lang('langPass');?></label>
<input name="password" type="password" /><br />
@ -77,11 +79,12 @@ if (isset($_GET['loginFailed'])){
<span><?php echo cblue_get_lang('LoginEnter');?></span>
</div> <!-- #form-submit -->
<div id="links">
<a href="main/auth/lostPassword.php"><?php echo cblue_get_lang('langLostPassword')?></a>
<a href="<?php echo api_get_path(WEB_PATH)?>main/auth/inscription.php"><?php echo cblue_get_lang('langReg')?></a><br />
<a href="<?php echo api_get_path(WEB_PATH)?>main/auth/lostPassword.php"><?php echo cblue_get_lang('langLostPassword')?></a>
</div>
</div> <!-- #form -->
<div id="footer">
<img src="/custompages/images/footer.png" />
<img src="<?php echo api_get_path(WEB_PATH)?>/custompages/images/footer.png" />
</div> <!-- #footer -->
</div> <!-- #wrapper -->
</body>

@ -32,10 +32,16 @@ require_once('language.php');
<div id="header">
<img src="../../custompages/images/header.png" alt="Ambassador logo" />
</div> <!-- #header -->
<?php echo '<div id="registration-form-info" class="form-info">'.cblue_get_lang('lang_enter_email_and_well_send_you_password').'</div>'; ?>
<div id="registration-form-info" class="form-info">
<?php if(isset($content['error']) && !empty($content['error'])){
echo $content['info'];
} else {
echo cblue_get_lang('lang_enter_email_and_well_send_you_password');
}?>
</div>
<div id="lostpassword-form-box" class="form-box">
<?php if (isset($form_error) && !empty($form_error)) {
echo '<div id="registration-form-error" class="form-error"><ul>'.$form_error.'</ul></div>';
<?php if (isset($content['error']) && !empty($content['error'])) {
echo '<div id="registration-form-error" class="form-error"><ul>'.$content['error'].'</ul></div>';
}?>
<form id="lostpassword-form" class="form" action="lostPassword.php" method="post">
<div>

@ -1,3 +1,31 @@
<?php require_once('../inc/global.inc.php');
header("Location: /user_portal.php");
exit();
<html>
<head>
<title>Registration</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<!--[if !IE 6]><!-->
<link rel="stylesheet" type="text/css" href="../../custompages/style.css" />
<!--<![endif]-->
<!--[if IE 6]>
<link rel="stylesheet" type="text/css" href="../../custompages/style-ie6.css" />
<![endif]-->
<script type="text/javascript" src="../../custompages/jquery-1.5.1.min.js"></script>
</head>
<body>
<div id="backgroundimage">
<img src="/custompages/images/page-background.png" class="backgroundimage" />
</div>
<div id="wrapper">
<div id="header">
<img src="../../custompages/images/header.png" alt="Ambassador logo" />
</div> <!-- #header -->
<div id="registration-feedback-box">
<?php
echo $content['info'];
?>
</div> <!-- #feedback -->
<div id="footer">
<img src="../../custompages/images/footer.png" />
</div> <!-- #footer -->
</div> <!-- #wrapper -->
</body>
</html>

@ -1,7 +1,20 @@
<?php
require_once('../inc/global.inc.php');
require_once('../inc/lib/group_portal_manager.lib.php');
require_once('language.php');
require_once('../inc/global.inc.php');
require_once api_get_path(LIBRARY_PATH).'formvalidator/FormValidator.class.php';
require_once api_get_path(LIBRARY_PATH).'usermanager.lib.php';
require_once api_get_path(CONFIGURATION_PATH).'profile.conf.php';
require_once api_get_path(LIBRARY_PATH).'mail.lib.inc.php';
//Removes some unwanted elementend of the form object
$content['form']->removeElement('extra_mail_notify_invitation');
$content['form']->removeElement('extra_mail_notify_message');
$content['form']->removeElement('extra_mail_notify_group_message');
$content['form']->removeElement('official_code');
$content['form']->removeElement('phone');
$content['form']->removeElement('submit');
$content['form']->removeElement('status');
$content['form']->removeElement('status');
?>
<html>
<head>
@ -27,29 +40,14 @@ require_once('language.php');
<?php if (isset($form_error) && !empty($form_error)) {
echo '<div id="registration-form-error" class="form-error"><ul>'.$form_error.'</ul></div>';
}?>
<form id="registration-form" class="form" action="inscription.php" method="post">
<div>
<label for="email"><?php echo get_lang('langEmail');?>*</label>
<input name="email" type="text" value="<?php echo $values['email']?>" /><br />
<label for="username"><?php echo get_lang('Username');?>*</label>
<input name="username" type="text" value="<?php echo $values['username']?>" /><br />
<p class="forminfo"><?php echo get_lang('UsernameWrong')?></p>
<label for="pass1"><?php echo get_lang('Pass');?>*</label>
<input name="pass1" type="password" value="<?php echo $values['pass1']?>" /><br />
<label for="pass2"><?php echo get_lang('Confirmation');?>*</label>
<input name="pass2" type="password" value="<?php echo $values['pass2']?>" /><br />
<!--
<label for="phone">*Phone number</label>
<input name="phone" type="text" /><br />
-->
<input name="language" type="hidden" value="<?php echo $_SESSION['user_language_choice']?>" />
<input name="status" type="hidden" value="5" /> <!-- learner -->
</div>
</form>
<div id="registration-form-submit" class="form-submit" onclick="document.forms['registration-form'].submit();">
<span><?php echo get_lang('Subscribe');?></span>
<?php
$content['form']->display();
?>
<div id="registration-form-submit" class="form-submit" onclick="document.forms['registration'].submit();">
<span><?php echo cblue_get_lang('Subscribe');?></span>
</div> <!-- #form-submit -->
<div id="links">
<!--<a href="mailto: support@cblue.be"><?php echo cblue_get_lang('NeedContactAdmin')?></a><br />-->
</div>
</div> <!-- #form -->
<div id="footer">

@ -1,3 +1,75 @@
/* Color easy change */
body, .form, #links a, .form-info {
color: #DF002A;
}
.form-submit, input, select {
background-color: #DF002A;
}
.form-error {
color: red;
font-size: 9pt;
}
.form-submit {
margin: 0;
padding: 0;
width: 310px;
height: 27px;
background-color: #DF002A;
/*background-image: url(/custompages/images/login-form-submit-bg.jpg);*/
color: white;
cursor: pointer;
cursor: hand;
}
/* end easy change */
/* Registration form */
#registration-form-box {
width: 400px;
margin-left: auto;
margin-right: auto;
margin-top: 50px;
border: solid 1px #CCCCCC;
text-align: left;
background-color: white;
}
#registration-form-box .form-submit{
width: 400px;
}
div.row {
clear: both;
padding-top: 5px;
}
div.row div.form_header {
white-space: nowrap;
padding: 2px;
background-color: #f0f0f0;
border: 1px solid #bbb;
}
div.row div.label {
float: left;
width: 53%;
text-align: right;
padding-right:1%
}
div.row div.formw {
width: 46%;
float:left;
}
[dir=ltr] div.row div.label, [dir=rtl] div.row div.formw {
float: left;
text-align: right;
}
[dir=rtl] div.row div.label, [dir=ltr] div.row div.formw {
float: right;
text-align: left;
}
span.form_required {
color: #f00;
}
span.form_error {
color: #f00;
font-size: x-small;
margin: 2px;
}
html, body {
margin: 0;
padding: 0;
@ -8,8 +80,8 @@ body {
font-size: 10pt;
width: 100%;
text-align: center;
/*
background-image: url(images/page-background.png);
color: #1F3660;
/*background-image: url(images/page-background.png);
background-repeat: no-repeat;
background-size: 100%;
*/
@ -36,7 +108,6 @@ body {
left: 0;
width: 100%;
z-index: 1;
text-align: center;
}
#header {
@ -66,22 +137,11 @@ body {
margin-left: 15px;
margin-right: 15px;
margin-top: 30px;
color: #1F3660;
/*color: #1F3660;*/
/*position: relative;*/
text-align: left;
}
.form-submit {
margin: 0;
padding: 0;
width: 310px;
height: 27px;
background-color: #1F3660;
background-image: url(/custompages/images/login-form-submit-bg.jpg);
color: white;
cursor: pointer;
cursor: hand;
}
label {
width: 100px;
@ -98,50 +158,45 @@ input {
margin-bottom: 2em;
width: 150px;
color: white;
background-color: #1F3660;
/*background-color: #1F3660;*/
border: none;
}
.radiobutton {
width: 20px;
background-color: white;
margin: 0;
}
.radiogroup {
margin-bottom: 2em;
}
width: 20px;
background-color: white;
margin: 0;
}
.radiogroup {
margin-bottom: 2em;
}
select {
margin-bottom: 2em;
width: 150px;
color: white;
/*background-color: #1F3660;*/
border: none;
margin-bottom: 2em;
width: 150px;
}
label {
clear: both;
clear: both;
}
input, select, .radiogroup {
float: right;
clear: both;
float: right;
clear: both;
}
.radiogroup input, .radiogroup label {
float: none;
}
float: none;
}
#links {
margin-left: 15px;
margin-right: 15px;
margin-top: 10px;
margin-bottom: 50px;
color: #1F3660;
/*color: #1F3660;*/
}
#links a, #links a:hover, #links a:active, #links a:visited {
color: #1F3660;
}
#links a {
text-decoration: none;
@ -158,11 +213,6 @@ span {
}
.form-info {
color: #1F3660;
font-size: 9pt;
}
.form-error {
color: red;
/*color: #1F3660;*/
font-size: 9pt;
}

@ -1,3 +1,75 @@
/* Color easy change */
body, .form, #links a, .form-info {
color: #DF002A;
}
.form-submit, input, select {
background-color: #DF002A;
}
.form-error {
color: red;
font-size: 9pt;
}
.form-submit {
margin: 0;
padding: 0;
width: 310px;
height: 27px;
background-color: #DF002A;
/*background-image: url(/custompages/images/login-form-submit-bg.jpg);*/
color: white;
cursor: pointer;
cursor: hand;
}
/* end easy change */
/* Registration form */
#registration-form-box {
width: 400px;
margin-left: auto;
margin-right: auto;
margin-top: 50px;
border: solid 1px #CCCCCC;
text-align: left;
background-color: white;
}
#registration-form-box .form-submit{
width: 400px;
}
div.row {
clear: both;
padding-top: 5px;
}
div.row div.form_header {
white-space: nowrap;
padding: 2px;
background-color: #f0f0f0;
border: 1px solid #bbb;
}
div.row div.label {
float: left;
width: 53%;
text-align: right;
padding-right:1%
}
div.row div.formw {
width: 46%;
float:left;
}
[dir=ltr] div.row div.label, [dir=rtl] div.row div.formw {
float: left;
text-align: right;
}
[dir=rtl] div.row div.label, [dir=ltr] div.row div.formw {
float: right;
text-align: left;
}
span.form_required {
color: #f00;
}
span.form_error {
color: #f00;
font-size: x-small;
margin: 2px;
}
html, body {
margin: 0;
padding: 0;
@ -8,6 +80,7 @@ body {
font-size: 10pt;
width: 100%;
text-align: center;
/*color: #1F3660;*/
/*background-image: url(images/page-background.png);
background-repeat: no-repeat;
background-size: 100%;
@ -64,22 +137,11 @@ body {
margin-left: 15px;
margin-right: 15px;
margin-top: 30px;
color: #1F3660;
/*color: #1F3660;*/
position: relative;
text-align: left;
}
.form-submit {
margin: 0;
padding: 0;
width: 310px;
height: 27px;
background-color: #1F3660;
background-image: url(/custompages/images/login-form-submit-bg.jpg);
color: white;
cursor: pointer;
cursor: hand;
}
label {
width: 100px;
@ -96,14 +158,14 @@ input {
margin-bottom: 2em;
width: 150px;
color: white;
background-color: #1F3660;
/*background-color: #1F3660;*/
border: none;
}
select {
width: 150px;
color: white;
background-color: #1F3660;
/*background-color: #1F3660;*/
border: none;
margin-bottom: 2em;
}
@ -112,12 +174,9 @@ select {
margin-right: 15px;
margin-top: 10px;
margin-bottom: 50px;
color: #1F3660;
/*color: #1F3660;*/
}
#links a, #links a:hover, #links a:active, #links a:visited {
color: #1F3660;
}
#links a {
text-decoration: none;
@ -134,10 +193,6 @@ span {
}
.form-info {
color: #1F3660;
font-size: 9pt;
}
.form-error {
color: red;
/*color: #1F3660;*/
font-size: 9pt;
}

@ -0,0 +1,65 @@
<?php
/* For licensing terms, see /dokeos_license.txt */
/**
==============================================================================
* Used for external support of chamilo's users
*
* @author Arnaud Ligot, CBlue SPRL
* @package dokeos.admin
==============================================================================
*/
/*
==============================================================================
INIT SECTION
==============================================================================
*/
// name of the language file that needs to be included
$language_file = 'admin';
// we are in the admin area so we do not need a course id
$cidReset = true;
// include global script
require_once '../inc/global.inc.php';
$this_section = SECTION_PLATFORM_ADMIN;
api_protect_admin_script();
/*
==============================================================================
MAIN CODE
==============================================================================
*/
// setting the name of the tool
$tool_name = get_lang('CLI');
// setting breadcrumbs
$interbreadcrumb[] = array ('url' => 'index.php', 'name' => get_lang('PlatformAdmin'));
// including the header file (which includes the banner itself)
Display :: display_header($tool_name);
switch ($_GET["cmd"]) {
case "clear_stapi":
echo "Are you sure you are willing to erease all storage api data (no backup)? <a href='cli.php?cmd=clear_stapi_confirm' >Yes</a>";
break;
case "clear_stapi_confirm":
Database::query("delete from ".Database::get_main_table(TABLE_MAIN_STORED_VALUES));
Database::query("delete from ".Database::get_main_table(TABLE_MAIN_STORED_STACK));
echo "Done";
break;
default:
echo "UNKNOWN COMMAND";
break;
}
/*
==============================================================================
FOOTER
==============================================================================
*/
Display :: display_footer();
?>

@ -76,7 +76,7 @@ $htmlHeadXtra[] ='<script type="text/javascript">
$.ajax({
contentType: "application/x-www-form-urlencoded",
beforeSend: function(objeto) {
$("#id_content_message").html("<div class=\"normal-message\"><img src=\'/main/inc/lib/javascript/indicator.gif\' /></div>");
$("#id_content_message").html("<div class=\"normal-message\"><img src='.api_get_path(WEB_PATH).'main/inc/lib/javascript/indicator.gif\' /></div>");
},
type: "POST",

@ -1,16 +1,8 @@
<?php
/*
Template to automatically create a new user with information from anywhere.
This file is loaded by main/inc/local.inc.php
To use it please add this line to main/inc/conf/configuration.php :
$extAuthSource["external_logininfo"]["newUser"] = $_configuration['root_sys'].$_configuration['code_append']."auth/external_logininfo/newUser.php";
You also have to implements the external_get_user_info function in this file.
*/
require_once(api_get_path(LIBRARY_PATH).'usermanager.lib.php');
require_once(api_get_path(LIBRARY_PATH).'course.lib.php');
define('USERINFO_TABLE', 'userinfo');
define('DEFAULT_PASSWORD', 'boumbalah');
require_once(api_get_path(LIBRARY_PATH).'usermanager.lib.php');
require_once(api_get_path(LIBRARY_PATH).'course.lib.php');
//define('USERINFO_TABLE', 'danone_userinfo');
//define('DEFAULT_PASSWORD', 'danonelearning');
//TODO : Please implements this function for this module to work.
/**
@ -29,9 +21,6 @@
function external_get_user_info($login, $password){
//Those are the mandatory fields for user creation.
//See external_add_user function for all the fields you can have.
if ($password != DEFAULT_PASSWORD) {
return false;
}
$table = USERINFO_TABLE;
$sql = "SELECT * from $table where username='".Database::escape_string($login)."'";
$result = Database::query($sql);
@ -68,6 +57,9 @@ function external_get_user_info($login, $password){
$language = 'english';
break;
}
//Can Send Message ?
$can_send_message = ($user_info['can_send_message'] == 1) ? 'yes' : 'no';
$u = array(
'firstname' => $user_info['firstname'],
@ -75,18 +67,21 @@ function external_get_user_info($login, $password){
'status' => $status,
'admin' => $admin,
'email' => $user_info['email'],
'login' => $user_info['username'],
'username' => $user_info['username'],
'language' => $language,
'password' => DEFAULT_PASSWORD,
'courses' => $user_info['courses'],
'profile_link' => $user_info['profile_link'],
'worldwide_bu' => $user_info['worlwide_bu'],
'manager' => $user_info['manager'],
'country_bu' => $user_info['country_bu'],
'extra' => array(
'position_title' => $user_info['position_title'],
'country' => $user_info['country'],
'job_family' => $user_info['job_family'],
'country_bu' => $user_info['country_bu'],
'worldwide_bu' => $user_info['worldwide_bu'],
'profile_link' => $user_info['profile_link'],
'can_send_message' => $can_send_message,
'update_type' => 'external_logininfo')
);
@ -123,43 +118,57 @@ function external_add_user($u){
if (! isset($u['encrypt_method']) )
$u['encrypt_method'] = '';
$chamilo_uid = UserManager::create_user($u['firstname'], $u['lastname'],$u['status'], $u['email'], $u['login'], $u['password'], $u['official_code'], $u['language'], $u['phone'],$u['picture_uri'], $u['auth_source'], $u['expiration_date'], $u['active'], $u['hr_dept_id'], $u['extra'], $u['encrypt_method']);
$chamilo_uid = UserManager::create_user($u['firstname'], $u['lastname'],$u['status'], $u['email'], $u['username'], $u['password'], $u['official_code'], $u['language'], $u['phone'],$u['picture_uri'], $u['auth_source'], $u['expiration_date'], $u['active'], $u['hr_dept_id'], $u['extra'], $u['encrypt_method']);
return $chamilo_uid;
}
//MAIN CODE
//$login and $password variables are setted in main/inc/local.inc.php
$user = external_get_user_info($login, $password);
if ($user !== false && ($chamilo_uid = external_add_user($user)) !== false) {
//log in the user
$loginFailed = false;
$_user['user_id'] = $chamilo_uid;
api_session_register('_user');
//Autosubscribe to courses
if(!empty($user['courses'])){
$autoSubscribe = explode('|', $user['courses']);
foreach ($autoSubscribe as $code) {
if (CourseManager::course_exists($code)) {
CourseManager::subscribe_user($_user['user_id'], $code);
}
/**
* Update the user in chamilo database. It upgrade only info that is present in the
* new_user array
*
* @param $new_user associative array with the value to upgrade
* WARNING user_id key is MANDATORY
* Possible keys are :
* - firstname
* - lastname
* - username
* - auth_source
* - email
* - status
* - official_code
* - phone
* - picture_uri
* - expiration_date
* - active
* - creator_id
* - hr_dept_id
* - extra : array of custom fields
* - language
* - courses : string of all courses code separated by '|'
* - admin : boolean
* @return boolean
* @author ndiechburg <noel@cblue.be>
**/
function external_update_user($new_user){
$old_user = UserManager::get_user_info_by_id($new_user['user_id']);
$u = array_merge($old_user, $new_user);
$updated = UserManager::update_user($u['user_id'], $u['firstname'], $u['lastname'], $u['username'], null, $u['auth_source'], $u['email'], $u['status'], $u['official_code'], $u['phone'], $u['picture_uri'], $u['expiration_date'], $u['active'], $u['creator_id'], $u['hr_dept_id'], $u['extra'], $u['language'],'');
if(isset($u['courses']) && !empty($u['courses'])){
$autoSubscribe = explode('|', $u['courses']);
foreach ($autoSubscribe as $code) {
if (CourseManager::course_exists($code)) {
CourseManager::subscribe_user($u['user_id'], $code);
}
}
// Is User Admin ?
if ($user['admin']){
$is_platformAdmin = true;
Database::query("INSERT INTO admin values ('$chamilo_uid')");
}
// Can user create course
$is_allowedCreateCourse = (bool) (($user['status'] == COURSEMANAGER) or (api_get_setting('drhCourseManagerRights') and $user['status'] == SESSIONADMIN));
}
// Is User Admin ?
//TODO decomments and check that user_is is not already in admin table
/*
if (isset($u['admin']) && $u['admin']){
$table = Database::get_main_table(TABLE_MAIN_ADMIN);
$res = Database::query("SELECT * from $table WHERE user_id = ".$u['user_id']);
}*/
event_login();
} else {
$loginFailed = true;
unset($_user['user_id']);
$uidReset = false;
}
?>

@ -0,0 +1,114 @@
<?php // External login module : LDAP
/**
* Configuration file
* Please edit this file to match with your LDAP settings
**/
require_once(dirname(__FILE__).'/ldap.inc.php');
/**
* Array of connection parameters
**/
$extldap_config = array(
//base dommain string
'base_dn' => 'DC=cblue,DC=be',
//admin distinguished name
'admin_dn' => 'CN=admin,dc=cblue,dc=be',
//admin password
'admin_password' => 'pass',
//ldap host
'host' => array('10.1.2.3', '10.1.2.4', '10.1.2.5'),
// filter
// 'filter' => '', // no () arround the string
//'port' => , default on 389
//protocl version (2 or 3)
'protocol_version' => 3,
// set this to 0 to connect to AD server
'referrals' => 0,
//String used to search the user in ldap. %username will ber replaced by the username.
//See extldap_get_user_search_string() function below
// 'user_search' => 'sAMAccountName=%username%', // no () arround the string
'user_search' => 'uid=%username%', // no () arround the string
//encoding used in ldap (most common are UTF-8 and ISO-8859-1
'encoding' => 'UTF-8',
//Set to true if user info have to be update at each login
'update_userinfo' => true
);
/**
* return the string used to search a user in ldap
*
* @param string username
* @return string the serach string
* @author ndiechburg <noel@cblue.be>
**/
function extldap_get_user_search_string($username)
{
global $extldap_config;
// init
$filter = '('.$extldap_config['user_search'].')';
// replacing %username% by the actual username
$filter = str_replace('%username%',$username,$filter);
// append a global filter if needed
if (isset($extldap_config['filter']) && $extldap_config['filter'] != "")
$filter = '(&'.$filter.'('.$extldap_config['filter'].'))';
return $filter;
}
/**
* Correspondance array between chamilo user info and ldap user info
* This array is of this form :
* '<chamilo_field> => <ldap_field>
*
* If <ldap_field> is "func", then the value of <chamilo_field> will be the return value of the function
* extldap_get_<chamilo_field>($ldap_array)
* In this cas you will have to declare the extldap_get_<chamilo_field> function
*
* If <ldap_field> is a string beginning with "!", then the value will be this string without "!"
*
* If <ldap_field> is any other string then the value of <chamilo_field> will be
* $ldap_array[<ldap_field>][0]
*
* If <ldap_field> is an array then its value will be an array of values with the same rules as above
*
**/
$extldap_user_correspondance = array(
'firstname' => 'givenName',
'lastname' => 'sn',
'status' => 'func',
'admin' => 'func',
'email' => 'mail',
'auth_source' => '!extldap',
//'username' => ,
'language' => '!english',
'password' => '!PLACEHOLDER',
'extra' => array(
'title' => 'title',
'globalid' => 'employeeID',
'department' => 'department',
'country' => 'co',
'bu' => 'Company')
);
/**
* Please declare here all the function you use in extldap_user_correspondance
* All these functions must have an $ldap_user parameter. This parameter is the
* array returned by the ldap for the user
**/
/**
* example function for email
**/
/*
function extldap_get_email($ldap_user){
return $ldap_user['cn'].$ldap['sn'].'@gmail.com';
}
*/
function extldap_get_status($ldap_user){
return STUDENT;
}
function extldap_get_admin($ldap_user){
return false;
}
?>

@ -0,0 +1,181 @@
<?php // External login module : LDAP
/**
* This files is included by newUser.ldap.php and login.ldap.php
* It implements the functions nedded by both files
**/
//Includes the configuration file
require_once(dirname(__FILE__).'/../../inc/global.inc.php');
require_once(dirname(__FILE__).'/ldap.conf.php');
/**
* Returns a transcoded and trimmed string
*
* @param string
* @return string
* @author ndiechburg <noel@cblue.be>
**/
function extldap_purify_string($string)
{
global $extldap_config;
if(isset($extldap_config['encoding'])) {
return trim(api_to_system_encoding($string, $extldap_config['encoding']));
}
else {
return trim($string);
}
}
/**
* Establishes a connection to the LDAP server and sets the protocol version
*
* @return resource ldap link identifier or false
* @author ndiechburg <noel@cblue.be>
**/
function extldap_connect()
{
global $extldap_config;
if (!is_array($extldap_config['host']))
$extldap_config['host'] = array($extldap_config['host']);
foreach($extldap_config['host'] as $host) {
//Trying to connect
if (isset($extldap_config['port'])) {
$ds = ldap_connect($host,$extldap_config['port']);
} else {
$ds = ldap_connect($host);
}
if (!$ds) {
$port = isset($extldap_config['port']) ? $ldap_config['port'] : 389;
error_log('EXTLDAP ERROR : cannot connect to '.$extldap_config['host'].':'. $port);
} else
break;
}
if (!$ds) {
error_log('EXTLDAP ERROR : no valid server found');
return false;
}
//Setting protocol version
if (isset($extldap_config['protocol_version'])) {
if ( ! ldap_set_option($ds, LDAP_OPT_PROTOCOL_VERSION, $extldap_config['protocol_version'])) {
ldap_set_option($ds, LDAP_OPT_PROTOCOL_VERSION, 2);
}
}
//Setting protocol version
if (isset($extldap_config['referrals'])) {
if ( ! ldap_set_option($ds, LDAP_OPT_REFERRALS, $extldap_config['referrals'])) {
ldap_set_option($ds, LDAP_OPT_REFERRALS, $extldap_config['referrals']);
}
}
return $ds;
}
/**
* Authenticate user on external ldap server and return user ldap entry if that succeeds
*
* @return mixed false if user cannot authenticate on ldap, user ldap entry if tha succeeds
* @author ndiechburg <noel@cblue.be>
**/
function extldap_authenticate($username, $password)
{
global $extldap_config;
if (empty($username) or empty($password)){
return false;
}
$ds = extldap_connect();
if (!$ds) {
return false;
}
//Connection as admin to search dn of user
$ldapbind = @ldap_bind($ds, $extldap_config['admin_dn'], $extldap_config['admin_password']);
if ($ldapbind === false){
error_log('EXTLDAP ERROR : cannot connect with admin login/password');
return false;
}
$user_search = extldap_get_user_search_string($username);
//Search distinguish name of user
$sr = ldap_search($ds, $extldap_config['base_dn'], $user_search);
if ( !$sr ){
error_log('EXTLDAP ERROR : ldap_search('.$ds.', '.$extldap_config['base_dn'].", $user_search) failed");
return false;
}
$entries_count = ldap_count_entries($ds,$sr);
if ($entries_count > 1) {
error_log('EXTLDAP ERROR : more than one entry for that user ( ldap_search(ds, '.$extldap_config['base_dn'].", $user_search) )");
return false;
}
if ($entries_count < 1) {
error_log('EXTLDAP ERROR : No entry for that user ( ldap_search(ds, '.$extldap_config['base_dn'].", $user_search) )");
return false;
}
$users = ldap_get_entries($ds,$sr);
$user = $users[0];
//now we try to autenthicate the user in the ldap
$ubind = @ldap_bind($ds, $user['dn'], $password);
if($ubind !== false){
return $user;
}
else {
error_log('EXTLDAP : Wrong password for '.$user['dn']);
}
}
/**
* Return an array with userinfo compatible with chamilo using $extldap_user_correspondance
* configuration array declared in ldap.conf.php file
*
* @param array ldap user
* @param array correspondance array (if not set use extldap_user_correspondance declared
* in ldap.conf.php
* @return array userinfo array
* @author ndiechburg <noel@cblue.be>
**/
function extldap_get_chamilo_user($ldap_user, $cor = null)
{
global $extldap_user_correspondance;
if ( is_null($cor) ) {
$cor = $extldap_user_correspondance;
}
$chamilo_user =array();
foreach ($cor as $chamilo_field => $ldap_field) {
if (is_array($ldap_field)){
$chamilo_user[$chamilo_field] = extldap_get_chamilo_user($ldap_user, $ldap_field);
continue;
}
switch ($ldap_field) {
case 'func':
$func = "extldap_get_$chamilo_field";
if (function_exists($func)) {
$chamilo_user[$chamilo_field] = extldap_purify_string($func($ldap_user));
} else {
error_log("EXTLDAP WARNING : You forgot to declare $func");
}
break;
default:
//if string begins with "!", then this is a constant
if($ldap_field[0] === '!' ){
$chamilo_user[$chamilo_field] = trim($ldap_field, "!\t\n\r\0");
break;
}
if ( isset($ldap_user[$ldap_field][0]) ) {
$chamilo_user[$chamilo_field] = extldap_purify_string($ldap_user[$ldap_field][0]);
} else {
error_log('EXTLDAP WARNING : '.$ldap_field. '[0] field is not set in ldap array');
}
break;
}
}
return $chamilo_user;
}
?>

@ -0,0 +1,65 @@
<?php // External login module : LDAP
/**
*
* This file is included in main/inc/local.inc.php at user login if the user have 'external_ldap' in
* his auth_source field insted of platform
*
* Variables that can be used :
* - $login : string containing the username posted by the user
* - $password : string containing the password posted by the user
* - $uData : associative array with those keys :
* -username
* -password
* -auth_source
* -active
* -expiration_date
*
* If login succeeds, we have 2 choices :
* 1. - set $loginFailed to false,
* - set $_SESSION['_user']['user_id'] with the dokeos user_id
* - set $uidReset to true
* - upgrade user info in dokeos database if needeed
* - let the script local.inc.php continue
*
* 2. - set $_SESSION['_user']['user_id'] with the dokeos user_id
* - set $_SESSION['_user']['uidReset'] to true
* - upgrade user info in dokeos database if needeed
* - redirect to any page and let local.inc.php do the magic
*
* If login fails we have to redirect to index.php with the right message
* Possible messages are :
* - index.php?loginFailed=1&error=access_url_inactive
* - index.php?loginFailed=1&error=account_expired
* - index.php?loginFailed=1&error=account_inactive
* - index.php?loginFailed=1&error=user_password_incorrect
* - index.php?loginFailed=1&error=unrecognize_sso_origin');
*
**/
require_once(dirname(__FILE__).'/ldap.conf.php');
require_once(dirname(__FILE__).'/functions.inc.php');
$ldap_user = extldap_authenticate($login,$password);
if ($ldap_user !== false) {
$chamilo_user = extldap_get_chamilo_user($ldap_user);
//userid is not on the ldap, we have to use $uData variable from local.inc.php
$chamilo_user['user_id'] = $uData['user_id'];
//Update user info
if(isset($extldap_config['update_userinfo']) && $extldap_config['update_userinfo'])
{
external_update_user($chamilo_user);
}
$loginFailed = false;
$_user['user_id'] = $chamilo_user['user_id'];
$_user['uidReset'] = true;
api_session_register('_user');
$uidReset=true;
event_login();
} else {
$loginFailed = true;
$uidReset = false;
unset($_user['user_id']);
}
?>

@ -0,0 +1,66 @@
<?php // External login module : LDAP
/**
* This file is included by main/inc/local.inc.php when extldap is activated, a user try to login
* and chamilo does not find his user
* Variables that can be used :
* - $login : string containing the username posted by the user
* - $password : string containing the password posted by the user
*
* Please configure the exldap module in main/auth/external_login/ldap.conf.php
*
* If login succeeds, we have to add the user in the chamilo database and then
* we have 2 choices :
* 1. - set $loginFailed to false,
* - set $_SESSION['_user']['user_id'] with the dokeos user_id
* - set $uidReset to true
* - let the script local.inc.php continue
*
* 2. - set $_SESSION['_user']['user_id'] with the dokeos user_id
* - set $_SESSION['_user']['uidReset'] to true
* - upgrade user info in dokeos database if needeed
* - redirect to any page and let local.inc.php do the magic
*
* If login fails we have also 2 choices :
* 1. - unset $_user['user_id']
* - set $loginFailed=true
* - set $uidReset = false
* User wil then have the user password incorrect message
*
* 2. We redirect the user to index.php with appropriate message :
* Possible messages are :
* - index.php?loginFailed=1&error=access_url_inactive
* - index.php?loginFailed=1&error=account_expired
* - index.php?loginFailed=1&error=account_inactive
* - index.php?loginFailed=1&error=user_password_incorrect
* - index.php?loginFailed=1&error=unrecognize_sso_origin');
**/
require_once(dirname(__FILE__).'/ldap.conf.php');
require_once(dirname(__FILE__).'/functions.inc.php');
$ldap_user = extldap_authenticate($login,$password);
if ($ldap_user !== false) {
$chamilo_user = extldap_get_chamilo_user($ldap_user);
//username is not on the ldap, we have to use $login variable
$chamilo_user['username'] = $login;
$chamilo_uid = external_add_user($chamilo_user);
if ($chamilo_uid !==false) {
$loginFailed = false;
$_user['user_id'] = $chamilo_uid;
$_user['uidReset'] = true;
api_session_register('_user');
$uidReset=true;
// Is user admin?
if ($chamilo_user['admin']=== true){
$is_platformAdmin = true;
Database::query("INSERT INTO admin values ('$chamilo_uid')");
}
}
event_login();
} else {
$loginFailed = true;
$uidReset = false;
unset($_user['user_id']);
}
?>

@ -0,0 +1,56 @@
<?php
/*
Template to automatically create a new user with information from anywhere.
This file is loaded by main/inc/local.inc.php
To use it please add this line to main/inc/conf/configuration.php :
$extAuthSource["external_logininfo"]["newUser"] = $_configuration['root_sys'].$_configuration['code_append']."auth/external_logininfo/newUser.php";
You also have to implements the external_get_user_info function in functions.inc.php
*/
require_once(api_get_path(LIBRARY_PATH).'usermanager.lib.php');
require_once(api_get_path(LIBRARY_PATH).'course.lib.php');
require_once(dirname(__FILE__).'/functions.inc.php');
//MAIN CODE
//$login and $password variables are setted in main/inc/local.inc.php
if ($password != DEFAULT_PASSWORD) {
$user = false;
} else {
$user = external_get_user_info($login, $password);
}
if ($user !== false && ($chamilo_uid = external_add_user($user)) !== false) {
//log in the user
$loginFailed = false;
$_user['user_id'] = $chamilo_uid;
$_user['uidReset'] = true;
api_session_register('_user');
$uidReset=true;
//Autosubscribe to courses
if(!empty($user['courses'])){
$autoSubscribe = explode('|', $user['courses']);
foreach ($autoSubscribe as $code) {
if (CourseManager::course_exists($code)) {
CourseManager::subscribe_user($_user['user_id'], $code);
}
}
}
// Is User Admin ?
if ($user['admin']){
$is_platformAdmin = true;
Database::query("INSERT INTO admin values ('$chamilo_uid')");
}
// Can user create course
$is_allowedCreateCourse = (bool) (($user['status'] == COURSEMANAGER) or (api_get_setting('drhCourseManagerRights') and $user['status'] == SESSIONADMIN));
event_login();
} else {
$loginFailed = true;
unset($_user['user_id']);
$uidReset = false;
}
?>

@ -0,0 +1,40 @@
<?php //Script loaded by local.inc.php providing update user information of type external_logininfo.
/*
This script must not exit.
*/
require_once(api_get_path(LIBRARY_PATH).'usermanager.lib.php');
require_once(api_get_path(LIBRARY_PATH).'course.lib.php');
require_once(dirname(__FILE__).'/functions.inc.php');
//MAIN CODE
//$uData variable is set in local.inc.php
$user = UserManager::get_user_info_by_id($uData['user_id']);
$new_user = external_get_user_info($login);
$user['firstname'] = $new_user['firstname'];
$user['lastname'] = $new_user['lastname'];
$user['status'] = $new_user['status'];
$user['admin'] = $new_user['admin'];
$user['email'] = $new_user['email'];
$user['username'] = $new_user['username'];
$user['profile_link'] = $new_user['profile_link'];
$user['worldwide_bu'] = $new_user['worldwide_bu'];
$user['manager'] = $new_user['manager'];
$user['country_bu'] = $new_user['country_bu'];
$user['extra'] = $new_user['extra'];
if ($new_user !== false) { //User can login
external_update_user($user);
$loginFailed = false;
$_user['user_id'] = $user['user_id'];
$_user['uidReset'] = true;
$uidReset=true;
api_session_register('_user');
} else { //User cannot login
$loginFailed = true;
api_session_unregister('_uid');
header('Location: '.api_get_path(WEB_PATH).'index.php?loginFailed=1&error=user_password_incorrect');
exit;
}
?>

@ -1,127 +0,0 @@
<?php //Script loaded by local.inc.php providing update user information of type external_logininfo.
/*
This script must not exit.
*/
require_once(api_get_path(LIBRARY_PATH).'usermanager.lib.php');
require_once(api_get_path(LIBRARY_PATH).'course.lib.php');
define('USERINFO_TABLE', 'userinfo');
//TODO : Please implements this function for this module to work.
/**
* Gets user info from external source
* @param string login
* @param string password
* @return user array with at least the following fields:
* firstname
* lastname
* status
* email
* login
* password
* or false if no data
**/
function external_get_user_info($login, $password){
//Those are the mandatory fields for user creation.
//See external_add_user function for all the fields you can have.
$table = USERINFO_TABLE;
$sql = "SELECT * from $table where username='".Database::escape_string($login)."'";
$result = Database::query($sql);
if (Database::num_rows($result) == 0 ) { //false password
return false;
}
$user_info = Database::fetch_assoc($result);
// User status
$admin = false;
switch($user_info['status']){
case 'admin':
$status = COURSEMANAGER;
$admin = true;
break;
case 'teacher':
$status = COURSEMANAGER;
break;
case 'user':
$status = STUDENT;
break;
default:
$status = STUDENT;
}
// Language
switch($user_info['language']){
case 'FR' :
$language = 'french';
break;
case 'EN' :
$language = 'english';
break;
default :
$language = 'english';
break;
}
$u = array(
'firstname' => $user_info['firstname'],
'lastname' => $user_info['lastname'],
'status' => $status,
'admin' => $admin,
'email' => $user_info['email'],
'login' => $user_info['username'],
'language' => $language,
'password' => DEFAULT_PASSWORD,
'courses' => $user_info['courses'],
'profile_link' => $user_info['profile_link'],
'worldwide_bu' => $user_info['worlwide_bu'],
'manager' => $user_info['manager'],
'country_bu' => $user_info['country_bu'],
'extra' => array(
'position_title' => $user_info['position_title'],
'country' => $user_info['country'],
'job_family' => $user_info['job_family'],
'update_type' => 'external_logininfo')
);
return $u; //Please return false if user does not exist
}
/**
* update user info in database
**/
function external_update_user($u){
$updated = UserManager::update_user($u['user_id'], $u['firstname'], $u['lastname'], $u['login'], null, $u['auth_source'], $u['email'], $u['status'], $u['official_code'], $u['phone'], $u['picture_uri'], $u['expiration_date'], $u['active'], $u['creator_id'], $u['hr_dept_id'], $u['extra'], $u['language'],'');
if(!empty($user['courses'])){
$autoSubscribe = explode('|', $u['courses']);
foreach ($autoSubscribe as $code) {
if (CourseManager::course_exists($code)) {
CourseManager::subscribe_user($_user['user_id'], $code);
}
}
}
// Is User Admin ?
if ($user['admin']){
$is_platformAdmin = true;
Database::query("INSERT INTO admin values ('$chamilo_uid')");
}
}
//MAIN CODE
//$uData variable is set in local.inc.php
$user = UserManager::get_user_info_by_id($uData['user_id']);
$new_user = external_get_user_info($login);
$user['firstname'] = $new_user['firstname'];
$user['lastname'] = $new_user['lastname'];
$user['status'] = $new_user['status'];
$user['admin'] = $new_user['admin'];
$user['email'] = $new_user['email'];
$user['username'] = $new_user['login'];
$user['profile_link'] = $new_user['profile_link'];
$user['worldwide_bu'] = $new_user['worldwide_bu'];
$user['manager'] = $new_user['manager'];
$user['country_bu'] = $new_user['country_bu'];
$user['extra'] = $new_user['extra'];
if ($new_user !== false) {
$new_user['user_id'] = $uData['user_id'];
external_update_user($new_user);
}
?>

@ -1,141 +1,23 @@
<?php
/* For licensing terms, see /license.txt */
/**
* This script displays a form for registering new users.
* @package chamilo.auth
*/
/**
* Code
*/
$language_file = array('registration', 'admin');
if (!empty($_POST['language'])) { //quick hack to adapt the registration form result to the selected registration language
$_GET['language'] = $_POST['language'];
}
require_once '../inc/global.inc.php';
require_once api_get_path(LIBRARY_PATH).'formvalidator/FormValidator.class.php';
require_once api_get_path(LIBRARY_PATH).'usermanager.lib.php';
require_once api_get_path(CONFIGURATION_PATH).'profile.conf.php';
require_once api_get_path(LIBRARY_PATH).'mail.lib.inc.php';
require_once api_get_path(LIBRARY_PATH).'legal.lib.php';
require_once api_get_path(LIBRARY_PATH).'custompages.lib.php';
// Load terms & conditions from the current lang
if (api_get_setting('allow_terms_conditions') == 'true') {
$get = array_keys($_GET);
if (isset($get)) {
if ($get[0] == 'legal'){
$language = api_get_interface_language();
$language = api_get_language_id($language);
$term_preview = LegalManager::get_last_condition($language);
if (!$term_preview) {
//look for the default language
$language = api_get_setting('platformLanguage');
$language = api_get_language_id($language);
$term_preview = LegalManager::get_last_condition($language);
}
$tool_name = get_lang('TermsAndConditions');
Display :: display_header('');
echo '<div class="actions-title">';
echo $tool_name;
echo '</div>';
if (!empty($term_preview['content'])) {
echo $term_preview['content'];
} else {
echo get_lang('ComingSoon');
}
Display :: display_footer();
exit;
}
}
}
// Custom pages
if (api_get_setting('use_custom_pages') == 'true') {
if (isset($_POST['username'])) {
$values = array();
$values['firstname'] = $_POST['firstname'];
$values['lastname'] = $_POST['lastname'];
$values['status'] = $_POST['status'];
$values['email'] = $_POST['email'];
$values['username'] = $_POST['username'];
$values['pass1'] = $_POST['pass1'];
$values['official_code'] = '';
$values['language'] = $_POST['language'];
$values['phone'] = $_POST['phone'];
$picture_uri = null;
$user_id = UserManager::create_user($values['firstname'], $values['lastname'], $values['status'], $values['email'], $values['username'], $values['pass1'], $values['official_code'], $values['language'], $values['phone'], $picture_uri);
if ($user_id) {
/*
SESSION REGISTERING
*/
$_user['firstName'] = stripslashes($values['firstname']);
$_user['lastName'] = stripslashes($values['lastname']);
$_user['mail'] = $values['email'];
$_user['language'] = $values['language'];
$_user['user_id'] = $user_id;
$is_allowedCreateCourse = $values['status'] == 1;
api_session_register('_user');
api_session_register('is_allowedCreateCourse');
//stats
event_login();
// last user login date is now
$user_last_login_datetime = 0; // used as a unix timestamp it will correspond to : 1 1 1970
api_session_register('user_last_login_datetime');
/*
EMAIL NOTIFICATION
*/
if (strpos($values['email'], '@') !== false) {
// Let us predefine some variables. Be sure to change the from address!
$recipient_name = api_get_person_name($values['firstname'], $values['lastname']);
$email = $values['email'];
$emailfromaddr = api_get_setting('emailAdministrator');
$emailfromname = api_get_setting('siteName');
$emailsubject = '['.api_get_setting('siteName').'] '.get_lang('YourReg',null,$_user['language']).' '.api_get_setting('siteName');
// The body can be as long as you wish, and any combination of text and variables
$portal_url = $_configuration['root_web'];
if ($_configuration['multiple_access_urls']) {
$access_url_id = api_get_current_access_url_id();
if ($access_url_id != -1 ){
$url = api_get_access_url($access_url_id);
$portal_url = $url['url'];
}
}
$emailbody = get_lang('Dear',null,$_user['language']).' '.stripslashes(Security::remove_XSS($recipient_name)).",\n\n".get_lang('YouAreReg',null,$_user['language']).' '.api_get_setting('siteName').' '.get_lang('WithTheFollowingSettings',null,$_user['language'])."\n\n".get_lang('Username',null,$_user['language']).' : '.$values['username']."\n".get_lang('Pass',null,$_user['language']).' : '.stripslashes($values['pass1'])."\n\n".get_lang('Address',null,$_user['language']).' '.api_get_setting('siteName').' '.get_lang('Is',null,$_user['language']).' : '.$portal_url."\n\n".get_lang('Problem',null,$_user['language'])."\n\n".get_lang('Formula',null,$_user['language']).",\n\n".api_get_person_name(api_get_setting('administratorName'), api_get_setting('administratorSurname'))."\n".get_lang('Manager',null,$_user['language']).' '.api_get_setting('siteName')."\nT. ".api_get_setting('administratorTelephone')."\n".get_lang('Email',null,$_user['language']).' : '.api_get_setting('emailAdministrator');
// Here we are forming one large header line
// Every header must be followed by a \n except the last
$sender_name = api_get_person_name(api_get_setting('administratorName'), api_get_setting('administratorSurname'), null, PERSON_NAME_EMAIL_ADDRESS);
$email_admin = api_get_setting('emailAdministrator');
@api_mail($recipient_name, $email, $emailsubject, $emailbody, $sender_name, $email_admin);
}
CustomPages::displayPage('registration-feedback');
}
} else {
CustomPages::displayPage('registration');
}
}
$tool_name = get_lang('Registration',null,(!empty($_POST['language'])?$_POST['language']:$_user['language']));
Display :: display_header($tool_name);
$home = api_get_path(SYS_PATH).'home/';
if ($_configuration['multiple_access_urls']) {
$access_url_id = api_get_current_access_url_id();
if ($access_url_id != -1) {
$url_info = api_get_access_url($access_url_id);
$url = api_remove_trailing_slash(preg_replace('/https?:\/\//i', '', $url_info['url']));
$clean_url = replace_dangerous_char($url);
$clean_url = str_replace('/', '-', $clean_url);
$clean_url .= '/';
$home_old = api_get_path(SYS_PATH).'home/';
$home = api_get_path(SYS_PATH).'home/'.$clean_url;
}
}
if (!empty($_SESSION['user_language_choice'])) {
$user_selected_language = $_SESSION['user_language_choice'];
} elseif (!empty($_SESSION['_user']['language'])) {
@ -143,33 +25,7 @@ if (!empty($_SESSION['user_language_choice'])) {
} else {
$user_selected_language = get_setting('platformLanguage');
}
if (file_exists($home.'register_top_'.$user_selected_language.'.html')) {
$home_top_temp = @(string)file_get_contents($home.'register_top_'.$user_selected_language.'.html');
$open = str_replace('{rel_path}', api_get_path(REL_PATH), $home_top_temp);
$open = api_to_system_encoding($open, api_detect_encoding(strip_tags($open)));
if (!empty($open)) {
echo '<div style="border:1px solid #E1E1E1; padding:2px;">'.$open.'</div>';
}
}
// Forbidden to self-register
if (api_get_setting('allow_registration') == 'false') {
api_not_allowed();
}
//api_display_tool_title($tool_name);
if (api_get_setting('allow_registration') == 'approval') {
Display::display_normal_message(get_lang('YourAccountHasToBeApproved'));
}
//if openid was not found
if (!empty($_GET['openid_msg']) && $_GET['openid_msg'] == 'idnotfound') {
Display::display_warning_message(get_lang('OpenIDCouldNotBeFoundPleaseRegister'));
}
$form = new FormValidator('registration');
$form->addElement('header', '', $tool_name);
if (api_get_setting('allow_terms_conditions') == 'true') {
$display_all_form = !isset($_SESSION['update_term_and_condition'][1]);
} else {
@ -317,7 +173,7 @@ if ($display_all_form) {
if ($get_lang_variables) {
$field_details[3] = get_lang($field_details[3]);
}
$form->addElement('select', 'extra_'.$field_details[1], $field_details[3], $options, array('class'=>'chzn-select', 'id'=>'extra_'.$field_details[1]));
$form->addElement('select', 'extra_'.$field_details[1], $field_details[3], $options, '');
break;
case USER_FIELD_TYPE_SELECT_MULTIPLE:
$options = array();
@ -383,6 +239,111 @@ if ($display_all_form) {
}
}
$form->addElement('style_submit_button', 'submit', get_lang('RegisterUser'), 'class="save"');
if (isset($_SESSION['user_language_choice']) && $_SESSION['user_language_choice'] != '') {
$defaults['language'] = $_SESSION['user_language_choice'];
} else {
$defaults['language'] = api_get_setting('platformLanguage');
}
if (!empty($_GET['username'])) {
$defaults['username'] = Security::remove_XSS($_GET['username']);
}
if (!empty($_GET['email'])) {
$defaults['email'] = Security::remove_XSS($_GET['email']);
}
if (!empty($_GET['phone'])) {
$defaults['phone'] = Security::remove_XSS($_GET['phone']);
}
if (api_get_setting('openid_authentication') == 'true' && !empty($_GET['openid'])) {
$defaults['openid'] = Security::remove_XSS($_GET['openid']);
}
$defaults['status'] = STUDENT;
if (is_array($extra_data)) {
$defaults = array_merge($defaults, $extra_data);
}
$form->setDefaults($defaults);
if (api_get_setting('use_custom_pages') != 'true') {
// Load terms & conditions from the current lang
if (api_get_setting('allow_terms_conditions') == 'true') {
$get = array_keys($_GET);
if (isset($get)) {
if ($get[0] == 'legal'){
$language = api_get_interface_language();
$language = api_get_language_id($language);
$term_preview = LegalManager::get_last_condition($language);
if (!$term_preview) {
//look for the default language
$language = api_get_setting('platformLanguage');
$language = api_get_language_id($language);
$term_preview = LegalManager::get_last_condition($language);
}
$tool_name = get_lang('TermsAndConditions');
Display :: display_header('');
echo '<div class="actions-title">';
echo $tool_name;
echo '</div>';
if (!empty($term_preview['content'])) {
echo $term_preview['content'];
} else {
echo get_lang('ComingSoon');
}
Display :: display_footer();
exit;
}
}
}
$tool_name = get_lang('Registration',null,(!empty($_POST['language'])?$_POST['language']:$_user['language']));
Display :: display_header($tool_name);
echo Display::tag('h1', $tool_name);
$home = api_get_path(SYS_PATH).'home/';
if ($_configuration['multiple_access_urls']) {
$access_url_id = api_get_current_access_url_id();
if ($access_url_id != -1) {
$url_info = api_get_access_url($access_url_id);
$url = api_remove_trailing_slash(preg_replace('/https?:\/\//i', '', $url_info['url']));
$clean_url = replace_dangerous_char($url);
$clean_url = str_replace('/', '-', $clean_url);
$clean_url .= '/';
$home_old = api_get_path(SYS_PATH).'home/';
$home = api_get_path(SYS_PATH).'home/'.$clean_url;
}
}
if (file_exists($home.'register_top_'.$user_selected_language.'.html')) {
$home_top_temp = @(string)file_get_contents($home.'register_top_'.$user_selected_language.'.html');
$open = str_replace('{rel_path}', api_get_path(REL_PATH), $home_top_temp);
$open = api_to_system_encoding($open, api_detect_encoding(strip_tags($open)));
if (!empty($open)) {
echo '<div style="border:1px solid #E1E1E1; padding:2px;">'.$open.'</div>';
}
}
// Forbidden to self-register
if (api_get_setting('allow_registration') == 'false') {
api_not_allowed();
}
//api_display_tool_title($tool_name);
if (api_get_setting('allow_registration') == 'approval') {
Display::display_normal_message(get_lang('YourAccountHasToBeApproved'));
}
//if openid was not found
if (!empty($_GET['openid_msg']) && $_GET['openid_msg'] == 'idnotfound') {
Display::display_warning_message(get_lang('OpenIDCouldNotBeFoundPleaseRegister'));
}
}
// Terms and conditions
if (api_get_setting('allow_terms_conditions') == 'true') {
@ -426,34 +387,6 @@ if (api_get_setting('allow_terms_conditions') == 'true') {
}
}
$form->addElement('style_submit_button', 'submit', get_lang('RegisterUser'), 'class="a_button gray"');
if (isset($_SESSION['user_language_choice']) && $_SESSION['user_language_choice'] != '') {
$defaults['language'] = $_SESSION['user_language_choice'];
} else {
$defaults['language'] = api_get_setting('platformLanguage');
}
if (!empty($_GET['username'])) {
$defaults['username'] = Security::remove_XSS($_GET['username']);
}
if (!empty($_GET['email'])) {
$defaults['email'] = Security::remove_XSS($_GET['email']);
}
if (!empty($_GET['phone'])) {
$defaults['phone'] = Security::remove_XSS($_GET['phone']);
}
if (api_get_setting('openid_authentication') == 'true' && !empty($_GET['openid'])) {
$defaults['openid'] = Security::remove_XSS($_GET['openid']);
}
$defaults['status'] = STUDENT;
if (is_array($extra_data)) {
$defaults = array_merge($defaults, $extra_data);
}
$form->setDefaults($defaults);
if ($form->validate()) {
/*
@ -582,7 +515,10 @@ if ($form->validate()) {
}
// 3. exit the page
unset($user_id);
Display :: display_footer();
if (api_get_setting('use_custom_pages') != 'true') {
Display :: display_footer();
}
exit;
}
@ -637,15 +573,15 @@ if ($form->validate()) {
}
}
echo '<p>'.get_lang('Dear',null,$_user['language']).' '.stripslashes(Security::remove_XSS($recipient_name)).',<br /><br />'.get_lang('PersonalSettings',null,$_user['language']).".</p>\n";
$display_text = '<p>'.get_lang('Dear',null,$_user['language']).' '.stripslashes(Security::remove_XSS($recipient_name)).',<br /><br />'.get_lang('PersonalSettings',null,$_user['language']).".</p>\n";
if (!empty ($values['email'])) {
echo '<p>'.get_lang('MailHasBeenSent',null,$_user['language']).'.</p>';
$display_text.= '<p>'.get_lang('MailHasBeenSent',null,$_user['language']).'.</p>';
}
$button_text = '';
if ($is_allowedCreateCourse) {
echo '<p>', get_lang('NowGoCreateYourCourse',null,$_user['language']), ".</p>\n";
$display_text .= '<p>'. get_lang('NowGoCreateYourCourse',null,$_user['language']). ".</p>\n";
$action_url = '../create_course/add_course.php';
$button_text = api_get_setting('course_validation') == 'true'
? get_lang('CreateCourseRequest', null, $_user['language'])
@ -655,15 +591,36 @@ if ($form->validate()) {
$action_url = 'courses.php?action=subscribe';
else
$action_url = api_get_path(WEB_PATH).'user_portal.php';
echo '<p>', get_lang('NowGoChooseYourCourses',null,$_user['language']), ".</p>\n";
$display_text.='<p>'. get_lang('NowGoChooseYourCourses',null,$_user['language']). ".</p>\n";
$button_text = get_lang('Next',null,$_user['language']);
}
// ?uidReset=true&uidReq=$_user['user_id']
echo '<form action="', $action_url, '" method="post">', "\n", '<button type="submit" class="next" name="next" value="', get_lang('Next',null,$_user['language']), '" validationmsg=" ', get_lang('Next',null,$_user['language']), ' ">', $button_text, '</button>', "\n", '</form><br />', "\n";
$display_text .= '<form action="'. $action_url. '" method="post">'. "\n". '<button type="submit" class="next" name="next" value="'. get_lang('Next',null,$_user['language']). '" validationmsg=" '. get_lang('Next',null,$_user['language']). ' ">'. $button_text. '</button>'. "\n". '</form><br />'. "\n";
if (api_get_setting('use_custom_pages') == 'true') {
CustomPages::displayPage('registration-feedback', array('info' => $display_text));
}
echo $display_text;
} else {
// Custom pages
if (api_get_setting('use_custom_pages') == 'true') {
CustomPages::displayPage('registration', array('form' => $form));
} else {
$form->display();
}
}
?>
<br />
<?php
if (!isset($_POST['username'])) {
/*
<div class="actions">
<a href="<?php echo api_get_path(WEB_PATH); ?>" class="fake_button_back" ><?php echo get_lang('Back'); ?></a>
</div>
*/
?>
<?php
}
Display :: display_footer();
Display :: display_footer();

@ -18,7 +18,7 @@
* Code
*/
// name of the language file that needs to be included
$language_file = 'registration';
$language_file = array('registration', 'index');
require_once '../inc/global.inc.php';
require_once api_get_path(LIBRARY_PATH).'login.lib.php';
@ -30,49 +30,58 @@ require_once api_get_path(LIBRARY_PATH).'custompages.lib.php';
// already be some display output.
global $_configuration;
if (api_get_setting('use_custom_pages') == 'true') {
if (isset ($_POST['user']) && isset ($_POST['email'])) {
$user = $_POST['user'];
$email = $_POST['email'];
$condition = '';
if (!empty($email)) {
$condition = " AND LOWER(email) = '".Database::escape_string($email)."' ";
}
$tbl_user = Database :: get_main_table(TABLE_MAIN_USER);
$query = " SELECT user_id AS uid, lastname AS lastName, firstname AS firstName,
username AS loginName, password, email, status AS status,
official_code, phone, picture_uri, creator_id
FROM ".$tbl_user."
WHERE ( username = '".Database::escape_string($user)."' $condition ) ";
$result = Database::query($query);
$num_rows = Database::num_rows($result);
if ($result && $num_rows > 0) {
if ($num_rows > 1) {
$by_username = false; // more than one user
while ($data = Database::fetch_array($result)) {
$user[] = $data;
}
} else {
$by_username = true; // single user (valid user + email)
$user = Database::fetch_array($result);
}
//Reset Password when user goes to the link
if($_GET['reset'] && $_GET['id']){
$mesg = Login::reset_password($_GET["reset"], $_GET["id"], true);
CustomPages::displayPage('index-unlogged', array('info' => $mesg));
}
//Check email/username and do the right thing
if (isset ($_POST['user']) && isset ($_POST['email'])) {
$user = $_POST['user'];
$email = $_POST['email'];
$condition = '';
if (!empty($email)) {
$condition = " AND LOWER(email) = '".Database::escape_string($email)."' ";
}
$tbl_user = Database :: get_main_table(TABLE_MAIN_USER);
$query = " SELECT user_id AS uid, lastname AS lastName, firstname AS firstName,
username AS loginName, password, email, status AS status,
official_code, phone, picture_uri, creator_id
FROM ".$tbl_user."
WHERE ( username = '".Database::escape_string($user)."' $condition ) ";
$result = Database::query($query);
$num_rows = Database::num_rows($result);
if ($result && $num_rows > 0) {
if ($num_rows > 1) {
$by_username = false; // more than one user
while ($data = Database::fetch_array($result)) {
$user[] = $data;
}
} else {
$by_username = true; // single user (valid user + email)
$user = Database::fetch_array($result);
}
if ($_configuration['password_encryption'] != 'none') {
Login::handle_encrypted_password($user, $by_username);
} else {
Login::send_password_to_user($user, $by_username);
}
} else {
Display::display_error_message(get_lang('NoUserAccountWithThisEmailAddress'));
}
$msg = Login::reset_password($_GET["reset"], $_GET["id"], true);
CustomPages::displayPage('lostpassword-feedback');
//Send email with secret link to user
Login::handle_encrypted_password($user, $by_username);
} else {
Login::send_password_to_user($user, $by_username);
}
} else {
CustomPages::displayPage('lostpassword',array('error' => get_lang('NoUserAccountWithThisEmailAddress')));
}
} else {
CustomPages::displayPage('lostpassword');
}
CustomPages::displayPage('lostpassword');
}
CustomPages::displayPage('index-unlogged', array('info' => get_lang('YourPasswordHasBeenEmailed')));
}
$tool_name = get_lang('LostPassword');
Display :: display_header($tool_name);

@ -278,7 +278,7 @@ if (is_profile_editable() && api_get_setting('profile', 'password') == 'true') {
// user must enter identical password twice so we can prevent some user errors
$form->addRule(array('password1', 'password2'), get_lang('PassTwo'), 'compare');
if (CHECK_PASS_EASY_TO_FIND) {
$form->addRule('password1', get_lang('PassTooEasy').': '.api_generate_password(), 'callback', 'api_check_password');
$form->addRule('password1', get_lang('CurrentPasswordEmptyOrIncorrect'), 'callback', 'api_check_password');
}
}
@ -762,12 +762,12 @@ if ($form->validate()) {
}
// re-init the system to take new settings into account
$uidReset = true;
include api_get_path(INCLUDE_PATH).'local.inc.php';
$_SESSION['profile_update'] = 'success';
$url = api_get_self()."?{$_SERVER['QUERY_STRING']}".($filtered_extension && strpos($_SERVER['QUERY_STRING'], '&fe=1') === false ? '&fe=1' : '');
header("Location: ".$url);
exit;
$_SESSION['_user']['uidReset'] = true;
$_SESSION['noredirection'] = true;
$_SESSION['profile_update'] = 'success';
$url = api_get_self()."?{$_SERVER['QUERY_STRING']}".($filtered_extension && strpos($_SERVER['QUERY_STRING'], '&fe=1') === false ? '&fe=1' : '');
header("Location: ".$url);
exit;
}

@ -71,7 +71,7 @@ if (api_is_allowed_to_edit(null, true) && !api_is_coach()) {
$content .= '<div class="courseadminview" style="border:0px; margin-top: 0px;padding:0px;">
<div class="normal-message" id="id_normal_message" style="display:none">';
$content .= '<img src="'.$server_protocol.$current_host.'/'.$path_work.'main/inc/lib/javascript/indicator.gif"/>&nbsp;&nbsp;';
$content .= '<img src="'.api_get_path(WEB_PATH).'main/inc/lib/javascript/indicator.gif"/>&nbsp;&nbsp;';
$content .= get_lang('PleaseStandBy');
$content .= '</div>
@ -131,4 +131,4 @@ if (api_is_allowed_to_edit(null, true) && !api_is_coach()) {
$content .= CourseHome::show_tools_category($my_list);
$content .= '</div>';
}
}
}

@ -69,7 +69,7 @@ if (api_is_allowed_to_edit(null, true) && !api_is_coach()) {
$content .= '<div class="courseadminview" style="border:0px; margin-top: 0px;padding:5px;">
<div class="normal-message" id="id_normal_message" style="display:none">';
$content .= '<img src="'.$server_protocol.$current_host.'/'.$path_work.'main/inc/lib/javascript/indicator.gif"/>&nbsp;&nbsp;';
$content .= '<img src="'.api_get_path(WEB_PATH).'main/inc/lib/javascript/indicator.gif"/>&nbsp;&nbsp;';
$content .= get_lang('PleaseStandBy');
$content .= '</div>
@ -145,4 +145,4 @@ $content .= '</div>';
$content .= '</div>';
}
}
$content .= '</div>';
$content .= '</div>';

@ -0,0 +1,102 @@
<?php
// By Arnaud Ligot <arnaud@cblue.be>
// Based on work done for old videoconference application
// params:
// action=list cidReq=course_Code cwd=folder result: json output
// I have about 30 minutes to write this peace of code so if somebody has more time, feel free to rewrite it...
/* See license terms in /license.txt */
/* FIX for IE cache when using https */
session_cache_limiter("none");
/*==== DEBUG ====*/
$debug=0;
if ($debug>0)
{
// dump the request
$v = array_keys(get_defined_vars());
error_log(var_export($v, true),3, '/tmp/log');
foreach (array_keys(get_defined_vars()) as $k) {
if ($k == 'GLOBALS')
continue;
error_log($k, 3, '/tmp/log');
error_log(var_export($$k, true), 3, '/tmp/log');
}
}
/*==== INCLUDE ====*/
require_once '../inc/global.inc.php';
api_block_anonymous_users();
require_once (api_get_path(LIBRARY_PATH)."course.lib.php");
require_once (api_get_path(LIBRARY_PATH)."document.lib.php");
require_once ("../newscorm/learnpath.class.php");
/*==== Variables initialisation ====*/
$action = $_REQUEST["action"]; //safe as only used in if()'s
$seek = array('/','%2F','..');
$destroy = array('','','');
$cidReq = str_replace($seek,$destroy,$_REQUEST["cidReq"]);
$cidReq = Security::remove_XSS($cidReq);
$user_id = api_get_user_id();
$coursePath = api_get_path(SYS_COURSE_PATH).$cidReq.'/document';
$_course = CourseManager::get_course_information($cidReq);
if ($_course == null) die ("problem when fetching course information");
// stupid variable initialisation for old version of DocumentManager functions.
$_course['path'] = $_course['directory'];
$_course['dbName'] = $_course['db_name'];
$is_manager = (CourseManager::get_user_in_course_status($user_id, $cidReq) == COURSEMANAGER);
if ($debug>0) error_log($coursePath, 0);
// FIXME: check security around $_REQUEST["cwd"]
$cwd = $_REQUEST["cwd"];
// treat /..
$nParent = 0; // the number of /.. into the url
while (substr($cwd, -3, 3) == "/..")
{
// go to parent directory
$cwd= substr($cwd, 0, -3);
if (strlen($cwd) == 0) $cwd="/";
$nParent++;
}
for (;$nParent >0; $nParent--){
$cwd = (strrpos($cwd,'/')>-1 ? substr($cwd, 0, strrpos($cwd,'/')) : $cwd);
}
if (strlen($cwd) == 0) $cwd="/";
if (Security::check_abs_path($cwd,api_get_path(SYS_PATH)))
die();
if ($action == "list")
{
/*==== List files ====*/
if ($debug>0) error_log("sending file list",0);
// get files list
$files = DocumentManager::get_all_document_data($_course, $cwd, 0, NULL, false);
// adding download link to files
foreach($files as $k=>$f)
if ($f['filetype'] == 'file')
// $files[$k]['download'] = api_get_path(WEB_CODE_PATH)."/document/document.php?cidReq=$cidReq&action=download&id=".urlencode($f['path']);
$files[$k]['download'] = api_get_path(WEB_COURSE_PATH).$cidReq."/document".$f['path'];
print json_encode($files);
exit;
}
?>

@ -306,4 +306,4 @@ if ($nav_info ['name'] == 'Internet Explorer') {
echo Display::tabs($headers, array($multiple_form, $simple_form),'tabs');
}
Display::display_footer();
Display::display_footer();

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save