Merge branch '1.10.x' of https://github.com/chamilo/chamilo-lms into 1.10.x

Yannick Warnier 10 years ago
commit 5be1b91c25
  1. 430
      app/Resources/public/css/base.css
  2. 4
      main/admin/archive_cleanup.php
  3. 4
      main/admin/dashboard_add_users_to_user.php
  4. 2
      main/admin/settings.lib.php
  5. 8
      main/admin/user_edit.php
  6. 2
      main/exercice/exercise_submit.php
  7. BIN
      main/img/icons/16/vcard.png
  8. 55
      main/img/icons/svg/vcard.svg
  9. 3
      main/inc/lib/display.lib.php
  10. 4
      main/inc/lib/formvalidator/FormValidator.class.php
  11. 80
      main/inc/lib/pear/HTML/QuickForm/textarea.php
  12. 132
      main/inc/lib/social.lib.php
  13. 2
      main/inc/lib/tracking.lib.php
  14. 1
      main/mySpace/index.php
  15. 9
      main/mySpace/myStudents.php
  16. 18
      main/newscorm/learnpath.class.php
  17. 23
      main/newscorm/lp_view.php
  18. 3
      main/social/profile.php
  19. 6
      main/template/default/layout/footer.tpl
  20. 1
      main/template/default/layout/main_header.tpl
  21. 2
      main/template/default/social/home.tpl
  22. 2
      main/template/default/social/profile.tpl
  23. 48
      main/template/default/social/user_block.tpl

@ -1004,42 +1004,6 @@ button.next.disabled {
float:left;
}
/* Warning and error messages to the user */
.error {
color: red;
}
.confirmation-message .right_link,
.error-message .right_link,
.normal-message .right_link,
.warning-message .right_link {
position: relative;
right: 0;
top: -6px;
float:right;
}
.confirmation-message, .error-message, .normal-message, .warning-message {
min-height: 15px;
position: relative;
margin-top: 5px;
margin-bottom: 10px;
-moz-border-radius: 10px;
border-radius: 10px;
border-width: 1px;
border-style: solid;
border-color: #999;
padding:6px;
}
.confirmation-message img, .error-message img, .normal-message img, .warning-message img {
position: relative;
margin-top: 10px;
margin-bottom: 10px;
float:left;
}
/* Categories courses*/
#course-picture {
@ -1420,207 +1384,6 @@ a.unread {
padding:2px;
}
.social-profile-extended {
width:320px;
overflow:hidden;
}
div.image-social-content {
float:left;
/*border:1px dotted #ccc;*/
margin:2px;
padding: 8px 4px 4px 4px;
background: #ffffff;
height:105px;
width:82px;
z-index:5;
cursor:pointer;
position:relative;
overflow:hidden;
}
div.image-social-content span {
overflow:hidden;
display:block;
height:75px;
}
div.image-social-content img {
vertical-align:middle;
}
div.image-social-content center.friend {
overflow:hidden;
height:30px;
}
.image-social-content .image-delete {
position: absolute;
top: 1px;
right: 1px;
cursor: pointer;
}
.social-info {
background:#B8C8DC;
color:#4475B0;
font-size:12px;
font-weight:bold;
}
.social-display-image {
float:right;
margin-top:-130px;
margin-right:5px;
}
.social-search-image {
color:#000033;
margin-top:2px;
width:200px;
}
.social-subtitle-search {
background:#ffffff;
border-top:1px #9DACBF solid;
border-bottom:1px #9DACBF solid;
}
.social-align-box {
text-align:left;
float:left;
}
.social-header {
margin-bottom:8px;
}
#social-content {
width:100%;
height:auto;
overflow:hidden;
margin-left:auto;
margin-right:auto;
}
#social-content-right {
height: auto;
margin-left: 190px;
overflow: hidden;
width: 75%;
}
.social-content-image {
margin-bottom:10px;
margin-top:2px;
overflow:hidden;
}
#social-content-left {
display:block;
float:left;
height:auto;
min-height:300px;
overflow:hidden;
width:180px;
}
.social-content-description {
background:#ECE9D8;
}
.social-content-body {
background:#ffffff;
}
.social-content-table {
border-top:1px #9DACBF solid;
border-left:1px #9DACBF solid;
border-right:1px #9DACBF solid;
border-bottom:1px #9DACBF solid;
}
.social-profile-info {
width:100%;
}
/* general layout of the profile page */
#social-profile-wrapper {
width: 100%;
text-align:left;
margin:0 auto;
float: left;
}
#social-profile-container {
/* width: 705px; */
}
#social-profile-left {
float:left;
width:22%;
}
#social-profile-content {
float:right;
width:47%;
margin-left: 4px;
}
#social-profile-right {
float:right;
width:30%;
margin-left: 4px;
}
/* SOCIAL MENU VERTICAL */
.social-network-menu {
width:100%;
height:auto;
}
.social-menu-sub-level {
margin-left:20px;
}
/* BOX SHARED PROFILE */
.social-menu-groups {
border-top:1px solid #ddd;
margin-top:2px;
}
.social-menu-groups li {
padding:5px;
}
.social-menu-groups li a{
margin-left:6px;
}
.social_menu_items ul li{
padding:5px;
}
.social_menu_items ul li a{
padding-left:6px;
}
.social_menu_option {
color: #999999;
font-size: 9px;
font-weight: bold;
margin-top: 12px;
margin-bottom:10px;
}
.social-friend-container {
width:100%;
overflow:hidden;
}
.shared_profile_mygroups_grid_container {
width:100%;
overflow:hidden;
}
.shared_profile_mygroups_grid_item {
width:42%;
float:left;
height:140px;
margin:20px;
}
.social-menu-group-member {
float:left;
height:120px;
margin:5px;
overflow:hidden;
padding:2px;
width:76px;
}
.box_shared_profile_group_title {
border-bottom:1pt dotted #000;
padding:5px;
@ -1642,115 +1405,6 @@ div.image-social-content center.friend {
text-align:right;
}
.social-groups-text1 {
font-size:12px;
color:#669;
}
.social-groups-text2 {
font-size:12px;
color:#686868;
font-weight:bold;
}
.social-groups-text3 {
font-size:12px;
color:#000;
font-weight:bold;
text-transform:capitalize;
margin-top:5px;
}
.social-groups-text4 {
font-size:12px;
color:#666666;
}
.social-groups-image {
/* border: 2px solid #cac9c9; */
}
.social-groups-home-title {
border-top: 1px solid #E2E2E2;
padding:2px;
margin-bottom:5px;
font-weight:bold;
background: #F2F2F2;
}
.social-home-users-online {
border:3px solid #E6E6E6;
}
#social-content-online {
margin-bottom:5px;
margin-top:2px;
padding:1px;
}
#social-group-details {
margin-bottom:20px;
}
.social-group-details-info span {
color:#777;
}
.social-group-details-info {
padding:2px 0px 2px 0px;
}
.social-background-content {
z-index:5;
text-align: center;
}
.social-background-content .hidden_message {
cursor:pointer;
position:absolute;
top:0px;
right:0px;
}
.hidden_message {
background-color:#5A5A5A;
padding:2px;
margin:0px;
}
.hidden_message a {
color:#fff !important;
/* text-decoration: underline; */
}
#social-forum-main-title {
font-size:130%;
font-weight:bold;
padding: 0px 8px 0px 8px;
}
#social-forum-title {
font-size:130%;
font-weight:bold;
padding: 0px 8px 0px 8px;
}
#social-thread {
/*-moz-border-radius-bottomleft:5px;
-moz-border-radius-bottomright:5px; */
-moz-border-radius-topleft:5px;
-moz-border-radius-topright:5px;
border:1px solid #E1E1E0;
background-color:#E1E1E0;
padding:8px;
font-size:110%;
font-weight:bold;
}
#social-post {
-moz-border-radius-bottomleft:5px;
-moz-border-radius-bottomright:5px;
/* -moz-border-radius-topleft:5px;
-moz-border-radius-topright:5px; */
border:1px solid #E1E1E0;
background-color:#ECECEB;
padding:12px;
}
/* GROUP TOOL */
#group_description {
margin: 10px 0px 10px 0px;
}
@ -1852,34 +1506,6 @@ div.image-social-content center.friend {
margin-right:4px;
}
textarea {
border:1px solid #CCCCCC;
padding:5px;
-moz-border-radius:5px;
-webkit-border-radius:5px;
border-radius:5px;
color:#666666;
}
select {
color:#555;
border: 1px solid #CCC;
padding: 4px;
background-color: #F3F3F3;
font-size: 12px;
-moz-border-radius:5px;
-webkit-border-radius:5px;
border-radius:5px;
}
/* Fixes the FB input*/
input.maininput:focus {
box-shadow:0 0 0px #fff;
border:none;
}
/* Big icons course home page styles */
#course_tools .big_icon {
padding:10px;
@ -4606,29 +4232,23 @@ i.size-32.icon-new-work{
}
/* Social Profile */
.social-avatar{
.social-profile{
text-align: center;
}
.social-avatar .user-details {
font-size: 12px;
}
.social-avatar .img-profile{
margin-bottom: 5px;
padding-left: 50px;
padding-right: 50px;
padding-top: 20px;
.social-profile .expand-image {
display: inline-block;
}
.social-avatar .social-profile{
text-align: center;
padding-top: 20px;
.list-user-data{
list-style: none;
margin: 0;
padding: 0;
}
.social-avatar .social-profile .img-responsive{
display: inline-block;
margin: auto;
.list-user-data .item{
font-size: 12px;
padding-top: 5px;
}
.social-avatar .edit-profile{
margin-top: 15px;
margin-bottom: 15px;
.list-user-data .item.name{
text-align: center;
}
.social-search form{
margin-bottom: 0px;
@ -4822,9 +4442,13 @@ i.size-32.icon-new-work{
margin-right: 5px;
}
.social-network-menu .nav li a{
padding: 8px;
padding: 5px;
font-size: 12px;
}
.social-network-menu .nav-pills li.active a{
background: none;
color: #1ABC9C;
}
.social-network-menu .nav li a img{
vertical-align: bottom;
margin-right: 5px;
@ -4842,16 +4466,26 @@ i.size-32.icon-new-work{
.bottom_actions {
display: block;
}
.bottom_actions .form-group{
margin-bottom: 10px;
}
.bottom_actions_fixed {
position: fixed;
z-index: 9001;
z-index: 9999;
bottom: 0;
left: 0px;
margin-bottom: 0px;
background:#ECF0F1;
padding: 20px;
border-top: 3px solid #DCE4EC;
padding-top: 20px;
padding-bottom: 10px;
border-top: 1px solid #DCE4EC;
background: #ffffff;
background: -moz-linear-gradient(top, #ffffff 0%, #f6f6f6 47%, #ededed 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ffffff), color-stop(47%,#f6f6f6), color-stop(100%,#ededed));
background: -webkit-linear-gradient(top, #ffffff 0%,#f6f6f6 47%,#ededed 100%);
background: -o-linear-gradient(top, #ffffff 0%,#f6f6f6 47%,#ededed 100%);
background: -ms-linear-gradient(top, #ffffff 0%,#f6f6f6 47%,#ededed 100%);
background: linear-gradient(to bottom, #ffffff 0%,#f6f6f6 47%,#ededed 100%);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#ededed',GradientType=0 );
}
.sessions-items{
list-style: none;

@ -18,8 +18,8 @@ api_protect_admin_script(true);
// setting breadcrumbs
$interbreadcrumb[] = array('url' => 'index.php','name' => get_lang('PlatformAdmin'));
$form = new FormValidator('archive_cleanup_form');
$form->addButtonSend( get_lang('ArchiveDirCleanupProceedButton'));
$form = new FormValidator('archive_cleanup_form', 'post', '', '', array(), FormValidator::LAYOUT_BOX);
$form->addButtonSend(get_lang('ArchiveDirCleanupProceedButton'));
$message = null;

@ -51,7 +51,7 @@ if (UserManager::is_admin($user_id)) {
}
$add_type = 'multiple';
if(isset($_GET['add_type']) && $_GET['add_type']!='') {
if (isset($_GET['add_type']) && $_GET['add_type']!='') {
$add_type = Security::remove_XSS($_REQUEST['add_type']);
}
@ -327,6 +327,8 @@ echo Display::page_header(
null, $size = 'h3'
);
$assigned_users_to_hrm = array();
switch ($userStatus) {
case DRH:
$assigned_users_to_hrm = UserManager::get_users_followed_by_drh($user_id);

@ -1440,7 +1440,9 @@ function generate_settings_form($settings, $settings_by_access_list)
if (!empty($settings)) {
$form->setDefaults($default_values);
}
$form->addHtml('<div class="bottom_actions">');
$form->addButtonSave(get_lang('SaveSettings'));
$form->addHtml('</div>');
return $form;
}

@ -423,10 +423,14 @@ $content = null;
$bigImage = UserManager::getUserPicture($user_id, USER_IMAGE_SIZE_BIG);
$normalImage = UserManager::getUserPicture($user_id, USER_IMAGE_SIZE_ORIGINAL);
$content .= '<a class="expand-image" href="'.$bigImage.'" /><img src="'.$normalImage.'"></a>';
$content .= '<div class="row">';
$content .= '<div class="col-md-10">';
// Display form
$content .= $form->returnForm();
$content .= '</div>';
$content .= '<div class="col-md-2">';
$content .= '<a class="thumbnail expand-image" href="'.$bigImage.'" /><img src="'.$normalImage.'"></a>';
$content .= '</div>';
$tpl = new Template($tool_name);
$tpl->assign('message', $message);

@ -736,7 +736,7 @@ if ($time_control) {
}
if (!empty($objExercise->description)){
echo Display::panelCollapse(get_lang('ExerciseDescriptionLabel'), $objExercise->description, 'exercise-description', $params['open'] = '', 'description', 'exercise-collapse');
echo Display::panelCollapse(get_lang('ExerciseDescriptionLabel'), $objExercise->description, 'exercise-description', null, 'description', 'exercise-collapse');
}
if ($origin != 'learnpath') {

Binary file not shown.

After

Width:  |  Height:  |  Size: 638 B

@ -52,7 +52,7 @@
x2="66.549683"
y2="952.11566"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.2218072,0,0,1.1935911,-12.173437,-1124.5213)" />
gradientTransform="matrix(1.2400694,0,0,1.1935911,-13.248449,-192.15917)" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient4172"
@ -91,16 +91,16 @@
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="2.0666667"
inkscape:cx="123.82005"
inkscape:cy="64.022978"
inkscape:cx="92.849433"
inkscape:cy="66.241208"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="false"
units="px"
inkscape:window-width="1366"
inkscape:window-height="712"
inkscape:window-x="1920"
inkscape:window-y="27"
inkscape:window-width="1920"
inkscape:window-height="1051"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1" />
<metadata
id="metadata7">
@ -110,7 +110,7 @@
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
<dc:title />
</cc:Work>
</rdf:RDF>
</metadata>
@ -120,10 +120,10 @@
id="layer1"
transform="translate(0,-932.36213)">
<g
id="g4431"
inkscape:export-filename="/var/www/chamilo/main/img/icons/64/vcard.png"
inkscape:export-xdpi="48"
inkscape:export-ydpi="48">
id="g4250"
inkscape:export-filename="/var/www/chamilo/main/img/icons/16/vcard.png"
inkscape:export-xdpi="12"
inkscape:export-ydpi="12">
<rect
inkscape:export-ydpi="24"
inkscape:export-xdpi="24"
@ -140,17 +140,17 @@
inkscape:export-xdpi="24"
inkscape:export-filename="/var/www/chamilo/main/img/icons/32/vcard.png"
id="rect4136"
transform="translate(0,932.36213)"
d="M 14.695312 22.226562 C 9.792541 22.226562 5.8457031 26.173332 5.8457031 31.076172 L 5.8457031 88.923828 C 5.8457031 93.826228 9.792541 97.773437 14.695312 97.773438 L 32.332031 97.773438 A 7.94875 7.94875 0 0 1 32.253906 96.734375 A 7.94875 7.94875 0 0 1 40.203125 88.785156 A 7.94875 7.94875 0 0 1 48.150391 96.734375 A 7.94875 7.94875 0 0 1 48.074219 97.773438 L 74.332031 97.773438 A 7.94875 7.94875 0 0 1 74.253906 96.734375 A 7.94875 7.94875 0 0 1 82.203125 88.785156 A 7.94875 7.94875 0 0 1 90.150391 96.734375 A 7.94875 7.94875 0 0 1 90.074219 97.773438 L 105.30469 97.773438 C 110.20751 97.773438 114.1543 93.826228 114.1543 88.923828 L 114.1543 31.076172 C 114.1543 26.173332 110.20751 22.226562 105.30469 22.226562 L 14.695312 22.226562 z "
style="opacity:1;fill:#cccccc;fill-opacity:1;stroke:none;stroke-width:0.41800001;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
d="m 13.858727,953.89117 c -4.9933047,0 -9.0130239,4.01965 -9.0130239,9.01303 l 0,58.9159 c 0,4.9929 4.0197192,9.013 9.0130239,9.013 l 17.962394,0 a 8.0955297,8.0955297 0 0 1 -0.07957,-1.0583 8.0955297,8.0955297 0 0 1 8.096008,-8.096 8.0955297,8.0955297 0 0 1 8.094018,8.096 8.0955297,8.0955297 0 0 1 -0.07758,1.0583 l 26.742683,0 a 8.0955297,8.0955297 0 0 1 -0.07957,-1.0583 8.0955297,8.0955297 0 0 1 8.096007,-8.096 8.0955297,8.0955297 0 0 1 8.094019,8.096 8.0955297,8.0955297 0 0 1 -0.07758,1.0583 l 15.511714,0 c 4.99335,0 9.01302,-4.0201 9.01302,-9.013 l 0,-58.9159 c 0,-4.99338 -4.01967,-9.01303 -9.01302,-9.01303 l -92.282549,0 z"
style="opacity:1;fill:#0088aa;fill-opacity:0.96078431;stroke:none;stroke-width:0.41800001;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
inkscape:connector-curvature="0" />
<path
inkscape:export-ydpi="24"
inkscape:export-xdpi="24"
inkscape:export-filename="/var/www/chamilo/main/img/icons/32/vcard.png"
id="path4158"
transform="translate(0,932.36213)"
d="M 16.660156 24.654297 C 11.997283 24.654297 8.2441406 28.321803 8.2441406 32.876953 L 8.2441406 86.621094 C 8.2441406 91.176094 11.997283 94.84375 16.660156 94.84375 L 29.429688 94.84375 A 10.94875 10.94875 0 0 1 40.203125 85.785156 A 10.94875 10.94875 0 0 1 50.986328 94.84375 L 71.429688 94.84375 A 10.94875 10.94875 0 0 1 82.203125 85.785156 A 10.94875 10.94875 0 0 1 92.986328 94.84375 L 102.83594 94.84375 C 107.49878 94.84375 111.25391 91.176094 111.25391 86.621094 L 111.25391 32.876953 C 111.25391 28.321803 107.49878 24.654297 102.83594 24.654297 L 16.660156 24.654297 z "
style="opacity:1;fill:url(#linearGradient4168);fill-opacity:1;stroke:none;stroke-width:0.41800001;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
d="m 16.016114,957.01643 c -4.732567,0 -8.5418074,3.6675 -8.5418074,8.22265 l 0,53.74412 c 0,4.555 3.8092404,8.2227 8.5418074,8.2227 l 12.960396,0 a 11.112398,10.94875 0 0 1 10.934467,-9.0586 11.112398,10.94875 0 0 1 10.944377,9.0586 l 20.748922,0 a 11.112398,10.94875 0 0 1 10.934467,-9.0586 11.112398,10.94875 0 0 1 10.944377,9.0586 l 9.99683,0 c 4.73254,0 8.54379,-3.6677 8.54379,-8.2227 l 0,-53.74412 c 0,-4.55515 -3.81125,-8.22265 -8.54379,-8.22265 l -87.463836,0 z"
style="opacity:1;fill:url(#linearGradient4168);fill-opacity:1;stroke:none;stroke-width:0.41800001;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
inkscape:connector-curvature="0" />
<rect
inkscape:export-ydpi="24"
inkscape:export-xdpi="24"
@ -237,24 +237,5 @@
id="rect4334"
style="opacity:1;fill:#cccccc;fill-opacity:1;stroke:none;stroke-width:0.41800001;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
</g>
<image
y="984.2984"
x="-95.386772"
id="image4376"
xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAhRJREFU
OI3Nk71uE1EQhb+5e73edbz+IYkNcZwIIwEtr8ATUPIGlDwAL0BNSYlEQToQCAQFSEQCIehTBEGw
FRNn7STe+GfXu/dS2BBBSwGnmZlmNOfoG/jXkjv33732C6Vr4TBZOp1mylgwWDJjMdaSWYsx8zkz
lswaa8lm6fgkbO983tW1Srl568aVUjyz4uWd37f/2cu8TuLUmcTZ2s27T6bqIMpaSWrk4esu7TBh
FFv2+ob2wNA5NnRPDL3IEo4ssww6/YR7T7scjWIVrG5cUuM4k3xO0bhQ4uWnHsenM+olIeeA6wiu
FlwNFV/oDxO2tg+onCuxXMkjIGo8TQFonS+yXi/x4mOPo2jGSlHhanAdKHvCIErY2u6xslyi1Sgi
dm5NjaYZANqB1lqR1WqBR2/aDKKEsicEntCPEh68alMuF2itFfH1WTZqNJlfIALpLMXTho1GhWcf
enTCKZ1wyuP3PZqNCoGboWyKq8+S1eM4wwJJknIwiGjWA1w3R3fg8XZniAIuN6vUl31G04RuGLFS
DbAWsIIeTVObGSu9fkRzNcD3cmDhYq3ARq2AALJgQxdcdC1g/3DIpOJjrbF6NOh8jZN08+q6L0Vf
iagMtbAkIr8Y+MkBaDargfnyfZhEh519PTsN967ffl7NB8WlnOeIoxXKERwBpQSlFwsWVImIzdI4
mZwc9cPd9re//IT/QT8ASF/1K70mQQMAAAAASUVORK5CYII=
"
preserveAspectRatio="none"
height="20"
width="20" />
</g>
</svg>

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 13 KiB

@ -2221,7 +2221,6 @@ class Display
}
public static function panelCollapse($title, $content, $id = null, $params = null, $idAccordion = null, $idCollpase = null)
{
$params['open'] = 'in';
if (!empty($idAccordion)) {
$html = null;
$html .= '<div class="panel-group" id="'.$idAccordion.'" role="tablist" aria-multiselectable="true">' . PHP_EOL;
@ -2229,7 +2228,7 @@ class Display
$html .= '<div class="panel-heading" role="tab"><h4 class="panel-title">' . PHP_EOL;
$html .= '<a role="button" data-toggle="collapse" data-parent="#'.$idAccordion.'" href="#'.$idCollpase.'" aria-expanded="true" aria-controls="'.$idCollpase.'">'.$title.'</a>' . PHP_EOL;
$html .= '</h4></div>' . PHP_EOL;
$html .= '<div id="'.$idCollpase.'" class="panel-collapse collapse ' . $params['open'] . '" role="tabpanel">' . PHP_EOL;
$html .= '<div id="'.$idCollpase.'" class="panel-collapse collapse in" role="tabpanel">' . PHP_EOL;
$html .= '<div class="panel-body">'.$content.'</div>' . PHP_EOL;
$html .= '</div></div></div>' . PHP_EOL;

@ -418,7 +418,7 @@ EOT;
*
* @return HTML_QuickForm_button
*/
public function addButtonSend($label, $name = 'submit', $createElement = false)
public function addButtonSend($label, $name = 'submit', $createElement = false, $attributes = array())
{
return $this->addButton(
$name,
@ -427,7 +427,7 @@ EOT;
'primary',
null,
null,
array(),
$attributes,
$createElement
);
}

@ -44,6 +44,7 @@ class HTML_QuickForm_textarea extends HTML_QuickForm_element
*/
public $_value = null;
private $columnsSize;
// }}}
// {{{ constructor
@ -60,6 +61,8 @@ class HTML_QuickForm_textarea extends HTML_QuickForm_element
public function __construct($elementName=null, $elementLabel=null, $attributes=null)
{
$attributes['class'] = isset($attributes['class']) ? $attributes['class'] : 'form-control';
$columnsSize = isset($attributes['cols-size']) ? $attributes['cols-size'] : null;
$this->setColumnsSize($columnsSize);
parent::__construct($elementName, $elementLabel, $attributes);
$this->_persistantFreeze = true;
$this->_type = 'textarea';
@ -222,4 +225,81 @@ class HTML_QuickForm_textarea extends HTML_QuickForm_element
return $html . $this->_getPersistantData();
}
/**
* @return null
*/
public function getColumnsSize()
{
return $this->columnsSize;
}
/**
* @param null $columnsSize
*/
public function setColumnsSize($columnsSize)
{
$this->columnsSize = $columnsSize;
}
/**
* @param string $layout
*
* @return string
*/
public function getTemplate($layout)
{
$size = $this->getColumnsSize();
$this->removeAttribute('cols-size');
switch ($layout) {
case FormValidator::LAYOUT_INLINE:
return '
<div class="form-group {error_class}">
<label {label-for} >
<!-- BEGIN required --><span class="form_required">*</span><!-- END required -->
{label}
</label>
{element}
</div>';
break;
case FormValidator::LAYOUT_HORIZONTAL:
return '
<div class="form-group {error_class}">
<label {label-for} class="col-sm-'.$size[0].' control-label" >
<!-- BEGIN required --><span class="form_required">*</span><!-- END required -->
{label}
</label>
<div class="col-sm-'.$size[1].'">
{icon}
{element}
<!-- BEGIN label_2 -->
<p class="help-block">{label_2}</p>
<!-- END label_2 -->
<!-- BEGIN error -->
<span class="help-inline">{error}</span>
<!-- END error -->
</div>
<div class="col-sm-'.$size[2].'">
<!-- BEGIN label_3 -->
{label_3}
<!-- END label_3 -->
</div>
</div>';
break;
case FormValidator::LAYOUT_BOX_NO_LABEL:
return '
<label {label-for}>{label}</label>
<div class="input-group">
{icon}
{element}
</div>';
break;
}
}
}

@ -725,18 +725,18 @@ class SocialManager extends UserManager
array('shared_profile', 'groups', 'group_edit', 'member_list', 'waiting_list', 'invite_friends')
)) {
$html .= '<div class="panel panel-default sidebar-nav">';
$html .= '<div class="panel-body">';
$html .= '<ul class="nav nav-pills nav-stacked">';
$links = '<ul class="nav nav-pills nav-stacked">';
$active = $show == 'home' ? 'active' : null;
$html .= '
$links .= '
<li class="home-icon ' . $active . '">
<a href="' . api_get_path(WEB_CODE_PATH) . 'social/home.php">
' . $homeIcon . ' ' . get_lang('Home') . '
</a>
</li>';
$active = $show == 'messages' ? 'active' : null;
$html .= '
$links .= '
<li class="messages-icon ' . $active . '">
<a href="' . api_get_path(WEB_CODE_PATH) . 'messages/inbox.php?f=social">
' . $messagesIcon . ' ' . get_lang('Messages') . $count_unread_message . '
@ -745,7 +745,7 @@ class SocialManager extends UserManager
//Invitations
$active = $show == 'invitations' ? 'active' : null;
$html .= '
$links .= '
<li class="invitations-icon ' . $active . '">
<a href="' . api_get_path(WEB_CODE_PATH) . 'social/invitations.php">
' . $invitationsIcon . ' ' . get_lang('Invitations') . $total_invitations . '
@ -754,21 +754,21 @@ class SocialManager extends UserManager
//Shared profile and groups
$active = $show == 'shared_profile' ? 'active' : null;
$html .= '
$links .= '
<li class="shared-profile-icon' . $active . '">
<a href="' . api_get_path(WEB_CODE_PATH) . 'social/profile.php">
' . $sharedProfileIcon . ' ' . get_lang('ViewMySharedProfile') . '
</a>
</li>';
$active = $show == 'friends' ? 'active' : null;
$html .= '
$links .= '
<li class="friends-icon ' . $active . '">
<a href="' . api_get_path(WEB_CODE_PATH) . 'social/friends.php">
' . $friendsIcon . ' ' . get_lang('Friends') . '
</a>
</li>';
$active = $show == 'browse_groups' ? 'active' : null;
$html .= '
$links .= '
<li class="browse-groups-icon ' . $active . '">
<a href="' . api_get_path(WEB_CODE_PATH) . 'social/groups.php">
' . $groupsIcon . ' ' . get_lang('SocialGroups') . '
@ -777,7 +777,7 @@ class SocialManager extends UserManager
//Search users
$active = $show == 'search' ? 'active' : null;
$html .= '
$links .= '
<li class="search-icon ' . $active . '">
<a href="' . api_get_path(WEB_CODE_PATH) . 'social/search.php">
' . $searchIcon . ' ' . get_lang('Search') . '
@ -786,13 +786,22 @@ class SocialManager extends UserManager
//My files
$active = $show == 'myfiles' ? 'active' : null;
$html .= '
$links .= '
<li class="myfiles-icon ' . $active . '">
<a href="' . api_get_path(WEB_CODE_PATH) . 'social/myfiles.php">
' . $filesIcon . ' ' . get_lang('MyFiles') . '
</a>
</li>';
$html .='</ul></div></div>';
$links .='</ul>';
$html .= Display::panelCollapse(
get_lang('SocialNetwork'),
$links,
'social-network-menu',
null,
'sn-sidebar',
'sn-sidebar-collapse'
);
}
if (in_array($show, $show_groups) && !empty($group_id)) {
@ -804,13 +813,12 @@ class SocialManager extends UserManager
}
if ($show == 'shared_profile') {
$html .= '<div class="panel panel-default sidebar-nav">';
$html .= '<div class="panel-body">';
$html .= '<ul class="nav nav-pills nav-stacked">';
$links = '<ul class="nav nav-pills nav-stacked">';
// My own profile
if ($show_full_profile && $user_id == intval(api_get_user_id())) {
$html .= '
$links .= '
<li class="home-icon ' . $active . '">
<a href="' . api_get_path(WEB_CODE_PATH) . 'social/home.php">
' . $homeIcon . ' ' . get_lang('Home') . '
@ -822,14 +830,14 @@ class SocialManager extends UserManager
</a>
</li>';
$active = $show == 'invitations' ? 'active' : null;
$html .= '
$links .= '
<li class="invitations-icon' . $active . '">
<a href="' . api_get_path(WEB_CODE_PATH) . 'social/invitations.php">
' . $invitationsIcon . ' ' . get_lang('Invitations') . $total_invitations . '
</a>
</li>';
$html .= '
$links .= '
<li class="shared-profile-icon active">
<a href="' . api_get_path(WEB_CODE_PATH) . 'social/profile.php">
' . $sharedProfileIcon . ' ' . get_lang('ViewMySharedProfile') . '
@ -846,14 +854,14 @@ class SocialManager extends UserManager
</a>
</li>';
$active = $show == 'search' ? 'active' : null;
$html .= '
$links .= '
<li class="search-icon ' . $active . '">
<a href="' . api_get_path(WEB_CODE_PATH) . 'social/search.php">
' . $searchIcon . ' ' . get_lang('Search') . '
</a>
</li>';
$active = $show == 'myfiles' ? 'active' : null;
$html .= '
$links .= '
<li class="myfiles-icon ' . $active . '">
<a href="' . api_get_path(WEB_CODE_PATH) . 'social/myfiles.php">
' . $filesIcon . ' ' . get_lang('MyFiles') . '
@ -875,8 +883,8 @@ class SocialManager extends UserManager
'user_id' => $user_id
]);
$html .= '<li>';
$html .= Display::url(
$links .= '<li>';
$links .= Display::url(
"$sendMessageIcon $sendMessageText",
$sendMesssageUrl,
[
@ -885,59 +893,29 @@ class SocialManager extends UserManager
'data-title' => $sendMessageText
]
);
$html .= '</li>';
$links .= '</li>';
}
// Check if I already sent an invitation message
$invitation_sent_list = SocialManager::get_list_invitation_sent_by_user_id(api_get_user_id());
if (isset($invitation_sent_list[$user_id]) && is_array($invitation_sent_list[$user_id]) && count($invitation_sent_list[$user_id]) > 0) {
$html .= '<li><a href="'.api_get_path(WEB_CODE_PATH).'social/invitations.php">'.Display::return_icon('invitation.png', get_lang('YouAlreadySentAnInvitation')).'&nbsp;&nbsp;'.get_lang('YouAlreadySentAnInvitation').'</a></li>';
$links .= '<li><a href="'.api_get_path(WEB_CODE_PATH).'social/invitations.php">'.Display::return_icon('invitation.png', get_lang('YouAlreadySentAnInvitation')).'&nbsp;&nbsp;'.get_lang('YouAlreadySentAnInvitation').'</a></li>';
} else {
if (!$show_full_profile) {
$html .= '<li><a class="btn-to-send-invitation" href="#" data-send-to="' . $user_id . '" title="'.get_lang('SendInvitation').'">'.Display :: return_icon('invitation.png', get_lang('SocialInvitationToFriends')).'&nbsp;'.get_lang('SendInvitation').'</a></li>';
$links .= '<li><a class="btn-to-send-invitation" href="#" data-send-to="' . $user_id . '" title="'.get_lang('SendInvitation').'">'.Display :: return_icon('invitation.png', get_lang('SocialInvitationToFriends')).'&nbsp;'.get_lang('SendInvitation').'</a></li>';
}
}
// Chat
//@todo check if user is online and if it's a friend to show the chat link
/*if (api_is_global_chat_enabled()) {
$user_name = $user_info['complete_name'];
if ($user_friend_relation == USER_RELATION_TYPE_FRIEND) {
if ($user_id != api_get_user_id()) {
//Only show chat if I'm available to talk
if ($current_user_info['user_is_online_in_chat'] == 1) {
$options = array('onclick' => "javascript:chatWith('".$user_id."', '".Security::remove_XSS($user_name)."', '".$user_info['user_is_online_in_chat']."')");
$chat_icon = $user_info['user_is_online_in_chat'] ? Display::return_icon('online.png', get_lang('Online')) : Display::return_icon('offline.png', get_lang('Offline'));
$html .= Display::tag('li',
Display::url(
$chat_icon.'&nbsp;&nbsp;'.get_lang('Chat'),
'javascript:void(0);',
$options
)
);
}
}
} else {
if ($user_id != api_get_user_id()) {
if ($current_user_info['user_is_online_in_chat'] == 1) {
$message = Security::remove_XSS(sprintf(get_lang("YouHaveToAddXAsAFriendFirst"), $user_name));
$options = array('onclick' => "javascript:chatNotYetWith('".$message."')");
$chat_icon = $user_info['user_is_online_in_chat'] ? Display::return_icon('online.png', get_lang('Online')) : Display::return_icon('offline.png', get_lang('Offline'));
$html .= Display::tag('li',
Display::url(
$chat_icon.'&nbsp;&nbsp;'.get_lang('Chat'),
'javascript:void(0);',
$options
)
$links .= '</ul>';
$html .= Display::panelCollapse(
get_lang('SocialNetwork'),
$links,
'social-network-menu',
null,
'sn-sidebar',
'sn-sidebar-collapse'
);
}
}
}
}*/
$html .= '</ul></div></div>';
if ($show_full_profile && $user_id == intval(api_get_user_id())) {
$personal_course_list = UserManager::get_personal_session_course_list($user_id);
@ -1566,12 +1544,13 @@ class SocialManager extends UserManager
$regExUrl = "/(http|https)\:\/\/[a-zA-Z0-9\-\.]+\.[a-zA-Z]{2,3}(\/\S*)?/";
$newText = '';
if (preg_match($regExUrl, $text, $url)) {
// make the urls hyper links
$newText .= preg_replace($regExUrl, "<a target=\"_blank\" href=" . $url[0] . ">".$url[0]."</a> ", $text);
// Comment this line to disable OpenGraph
$newText .= self::getHtmlByLink($url[0]);
// make the urls hyper links
//$newText .= preg_replace($regExUrl, "<a target=\"_blank\" href=" . $url[0] . ">".$url[0]."</a> ", $text);
} else {
$newText .= $text;
$newText = $text;
}
return $newText;
}
@ -1586,8 +1565,9 @@ class SocialManager extends UserManager
$graph = OpenGraph::fetch($link);
$url = $graph->url;
$image = $graph->image;
$domain = empty($url) ? parse_url($link) : parse_url($url);
$domain = empty($url) ? '' : parse_url($url);
$domain = $domain['scheme'].'://'.$domain['host'];
$html = '';
// Trick to verify if the Image Url Exist because of some bad metatag dev
if (self::verifyUrl($image) == false){
if (!($image[0] == '/')){
@ -1596,10 +1576,11 @@ class SocialManager extends UserManager
$image = $domain . $image;
}
$title = $graph->title;
$html = '<div class="thumbnail">';
$html .= '<a target="_blank" href="'.$link.'"><h3>'.$title.'</h3>';
$html .= empty($image) ? '' : '<img alt="" src="'.$image.'" height="160" ></a>';
$html .= empty($graph->description) ? '' : '<div>'.$graph->description.'</div>';
$html .= '<div class="post-open-graph">';
$html .= '<h4><a target="_blank" href="'.$link.'">'.$title.'</a></h4>';
$html .= empty($image) ? '' : '<img alt="" src="'.$image.'" />';
$html .= empty($graph->description) ? '' : '<p class="description">'.$graph->description.'<a href="'.$link.'">'.$link.'</a></p>';
$html .= "</div>";
return $html;
}
@ -1865,7 +1846,8 @@ class SocialManager extends UserManager
'post',
api_get_path(WEB_CODE_PATH).'social/profile.php',
null,
array('enctype' => 'multipart/form-data')
array('enctype' => 'multipart/form-data') ,
FormValidator::LAYOUT_HORIZONTAL
);
$form->addTextarea(
@ -1873,12 +1855,12 @@ class SocialManager extends UserManager
null,
[
'placeholder' => get_lang('SocialWallWhatAreYouThinkingAbout'),
'style' => 'width : 100%'
'cols-size' => [1, 10, 1]
]
);
$form->addHtml('<div class="form-group "><div class="url_preview col-md-9 panel-body"></div></div>');
$form->addHtml('<div class="url_preview"></div>');
$form->addHidden('url_content', '');
$form->addButtonSend(get_lang('Post'));
$form->addButtonSend(get_lang('Post'), null, false, ['cols-size' => [1, 10, 1]]);
$html = Display::panel($form->returnForm(), get_lang('SocialWall'));
return $html;

@ -1102,6 +1102,7 @@ class Tracking
*/
public static function getStats($userId)
{
$courses = array();
$assignedCourses = array();
if (api_is_drh() && api_drh_can_access_all_session_content()) {
$studentList = SessionManager::getAllUsersFromCoursesFromAllSessionFromStatus(
@ -1173,7 +1174,6 @@ class Tracking
null,
null
);
$courses = array();
foreach ($platformCourses as $course) {
$courses[$course['code']] = $course['code'];
}

@ -203,6 +203,7 @@ $numberTeachers = 0;
$countHumanResourcesUsers = 0;
$daysAgo = 7;
$studentIds = array();
$avg_courses_per_student = null;
if (!empty($students)) {
// Students
$nb_students = count($students);

@ -353,13 +353,10 @@ if (!empty($student_id)) {
// get average of score and average of progress by student
$avg_student_progress = $avg_student_score = 0;
$course_code = isset($_GET['course']) ? Security :: remove_XSS($_GET['course']) : '';
$course_code = isset($_GET['course']) ? Security :: remove_XSS($_GET['course']) : null;
if (CourseManager :: is_user_subscribed_in_course($user_info['user_id'], $course_code, true)) {
if (!CourseManager :: is_user_subscribed_in_course($user_info['user_id'], $course_code, true)) {
if (isset($courses[$key])) {
unset($courses[$key]);
}
} else {
$avg_student_progress = Tracking::get_avg_student_progress(
$user_info['user_id'],
$course_code,

@ -6686,11 +6686,15 @@ class learnpath
$return .= '<option class="top" value="0">' . get_lang('FirstPosition') . '</option>';
for ($i = 0; $i < count($arrLP); $i++) {
if ($arrLP[$i]['parent_item_id'] == $parent && $arrLP[$i]['id'] != $id) {
if ($extra_info['previous_item_id'] == $arrLP[$i]['id'])
if (is_array($extra_info)) {
if ($extra_info['previous_item_id'] == $arrLP[$i]['id']) {
$selected = 'selected="selected" ';
elseif ($action == 'add') $selected = 'selected="selected" ';
else
}
} elseif ($action == 'add') {
$selected = 'selected="selected" ';
} else {
$selected = '';
}
$return .= '<option ' . $selected . 'value="' . $arrLP[$i]['id'] . '">' . get_lang('After') . ' "' . $arrLP[$i]['title'] . '"</option>';
}
}
@ -6711,9 +6715,13 @@ class learnpath
$arrHide = array ();
for ($i = 0; $i < count($arrLP); $i++) {
if ($arrLP[$i]['id'] != $id && $arrLP[$i]['item_type'] != 'dokeos_chapter') {
if ($extra_info['previous_item_id'] == $arrLP[$i]['id'])
if (is_array($extra_info)) {
if ($extra_info['previous_item_id'] == $arrLP[$i]['id']) {
$s_selected_position = $arrLP[$i]['id'];
elseif ($action == 'add') $s_selected_position = 0;
}
} elseif ($action == 'add') {
$s_selected_position = 0;
}
$arrHide[$arrLP[$i]['id']]['value'] = $arrLP[$i]['title'];
}
}

@ -430,6 +430,29 @@ if ($_SESSION['oLP']->get_preview_image()) {
$lpPreviewImagePath = $_SESSION['oLP']->get_preview_image_path();
}
if ($_SESSION['oLP']->current == $_SESSION['oLP']->get_last()) {
$categories = Category::load(null, null, $course_code, null, null, $sessionId);
if (!empty($categories)) {
$gradebookEvaluations = $categories[0]->get_evaluations();
$gradebookLinks = $categories[0]->get_links();
if (
count($gradebookEvaluations) === 0 &&
count($gradebookLinks) === 1 &&
$gradebookLinks[0]->get_type() == LINK_LEARNPATH &&
$gradebookLinks[0]->get_ref_id() == $_SESSION['oLP']->lp_id
) {
$gradebookMinScore = $categories[0]->get_certificate_min_score();
$userScore = $gradebookLinks[0]->calc_score($user_id, 'best');
if ($userScore[0] >= $gradebookMinScore) {
Category::register_user_certificate($categories[0]->get_id(), $user_id);
}
}
}
}
$gamificationMode = api_get_setting('gamification_mode');
$template = new Template('title', false, false, true, true, false);

@ -294,7 +294,7 @@ $socialAutoExtendLink = Display::url(
// Added a Jquery Function to return the Preview of OpenGraph URL Content
$htmlHeadXtra[] = '<script>
$(document).ready(function() {
$("label").remove();
$("[name=\'social_wall_new_msg_main\']").on("paste", function(e) {
$.ajax({
contentType: "application/x-www-form-urlencoded",
@ -307,6 +307,7 @@ $(document).ready(function() {
success: function(response) {
$(".url_preview").html(response);
$("[name=\'url_content\']").val(response);
$(".url_preview img").addCSS("img-responsive");
}
});
});

@ -53,12 +53,12 @@
&nbsp;
</div><!-- end of #footer_right -->
</div><!-- end of #row -->
<div class="extra-footer">
{{ footer_extra_content }}
</div>
</div><!-- end of #container -->
</footer>
{# Extra footer configured in admin section, only shown to non-admins #}
{{ footer_extra_content }}
<div class="modal fade" id="expand-image-modal" tabindex="-1" role="dialog" aria-labelledby="expand-image-modal-title" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">

@ -54,6 +54,7 @@
{% endif %}
{% endblock %}
<header>
<div class="extra-header">{{ header_extra_content }}</div>
<section id="main" class="container">
{% if plugin_header_main %}
<div class="row">

@ -31,11 +31,13 @@
</h4>
</div>
<div id="listFriends" class="panel-collapse collapse in" role="tabpanel" aria-labelledby="headingOne">
<div class="panel-body">
{{ social_friend_block }}
</div>
</div>
</div>
</div>
</div>
<!-- Block session list -->
{% if sessionList != null %}

@ -26,11 +26,13 @@
</h4>
</div>
<div id="listFriends" class="panel-collapse collapse in" role="tabpanel" aria-labelledby="headingOne">
<div class="panel-body">
{{ social_friend_block }}
</div>
</div>
</div>
</div>
</div>
{{ social_skill_block }}
{{ social_group_info_block }}
<!-- Block course list -->

@ -1,24 +1,36 @@
<div class="social-avatar">
<div class="sidebar-avatar">
<div class="panel-group" id="sn-avatar" role="tablist" aria-multiselectable="true">
<div class="panel panel-default">
<div class="panel-heading" role="tab" id="heading-sn">
<h4 class="panel-title">
<a role="button" data-toggle="collapse" data-parent="#sn-avatar" href="#sn-avatar-one" aria-expanded="true" aria-controls="sn-avatar-one">
{{ "Role" | get_lang }}
</a>
</h4>
</div>
<div id="sn-avatar-one" class="panel-collapse collapse in" role="tabpanel" aria-labelledby="heading-sn">
<div class="panel-body">
{{ social_avatar_block }}
<p class="lead">
{{ user.firstname }}<br>{{ user.lastname }}
</p>
<ul class="list-unstyled user-details">
<li>
<ul class="list-user-data">
<li class="item name">
{{ user.complete_name }}
</li>
<li class="item">
<a href="{{ _p.web }}main/messages/new_message.php">
<img src="{{ "instant_message.png" | icon }}" alt="{{ "Email" | get_lang }}">
{{ user.email}}
</a>
</li>
<li>
<li class="item">
<a href="{{ vcard_user_link }}">
<img src="{{ "vcard.png" | icon(22) }}" alt="{{ "UserInfo" | get_lang }}" width="22" height="22">
<img src="{{ "vcard.png" | icon(16) }}" alt="{{ "UserInfo" | get_lang }}" width="16" height="16">
{{ "UserInfo" | get_lang }}
</a>
</li>
{% if chat_enabled == 1 %}
<li>
<li class="item">
{% if user.id == _u.id %}
<img src="{{ "online.png" | icon }}" alt="{{ "Online" | get_lang }}">
{{ "Chat" | get_lang }} ({{ "Online" | get_lang }})
@ -33,16 +45,20 @@
{% endif %}
</li>
{% endif %}
</ul>
{% if not profile_edition_link is empty %}
<p>
<a class="btn btn-default btn-sm" href="{{ profile_edition_link }}">
<i class="fa fa-edit"></i>
{{ "EditProfile" | get_lang }}
<li class="item">
<a class="btn btn-primary btn-sm btn-block" href="{{ profile_edition_link }}">
<i class="fa fa-edit"></i>{{ "EditProfile" | get_lang }}
</a>
</p>
</li>
{% endif %}
</ul>
</div>
</div>
</div>
</div>
</div>
</div>

Loading…
Cancel
Save