Merge branch '1.9.x' of ssh://github.com/chamilo/chamilo-lms into chamilo19

1.9.x
Julio Montoya 11 years ago
commit 584800014c
  1. 29
      main/css/academica/scorm.css
  2. 30
      main/css/baby_orange/scorm.css
  3. 2
      main/css/base.css
  4. 24
      main/css/base_chamilo.css
  5. 32
      main/css/blue_lagoon/scorm.css
  6. 2
      main/css/chamilo/default.css
  7. 30
      main/css/chamilo/scorm.css
  8. 18
      main/css/chamilo_electric_blue/scorm.css
  9. 19
      main/css/chamilo_green/scorm.css
  10. 16
      main/css/chamilo_orange/scorm.css
  11. 23
      main/css/chamilo_red/scorm.css
  12. 29
      main/css/chamilo_sport_red/scorm.css
  13. 32
      main/css/cool_blue/scorm.css
  14. 11
      main/css/corporate/scorm.css
  15. 14
      main/css/cosmic_campus/scorm.css
  16. 22
      main/css/journal/scorm.css
  17. 29
      main/css/kiddy/scorm.css
  18. 136
      main/exercice/calculated_answer.class.php
  19. 38
      main/exercice/evalmathnotation.php
  20. 22
      main/exercice/question_list_admin.inc.php
  21. 2
      main/inc/lib/autoload.class.php
  22. 2
      main/inc/lib/display.lib.php
  23. 4
      main/inc/lib/main_api.lib.php
  24. 108
      main/inc/lib/message.lib.php
  25. 128
      main/inc/lib/webservices/MessagesWebService.class.php
  26. 72
      main/inc/lib/webservices/WebService.class.php
  27. 1
      main/lang/english/exercice.inc.php
  28. 1
      main/lang/english/tracking.inc.php
  29. 36
      main/lang/english/trad4all.inc.php
  30. 1
      main/lang/french/exercice.inc.php
  31. 1
      main/lang/french/tracking.inc.php
  32. 34
      main/lang/french/trad4all.inc.php
  33. 1
      main/lang/spanish/exercice.inc.php
  34. 1
      main/lang/spanish/tracking.inc.php
  35. 40
      main/lang/spanish/trad4all.inc.php
  36. 2
      main/lang/spanish/userInfo.inc.php
  37. 1
      main/newscorm/lp_view.php
  38. 63
      main/social/invitations.php
  39. 15
      main/template/default/layout/main_header.tpl
  40. 7
      main/template/default/layout/social_layout.tpl
  41. 6
      plugin/tour/config/tour.json
  42. 350
      plugin/tour/intro.js/introjs.min.css
  43. BIN
      plugin/tour/resources/fonts/lato-black.eot
  44. 4691
      plugin/tour/resources/fonts/lato-black.svg
  45. BIN
      plugin/tour/resources/fonts/lato-black.ttf
  46. BIN
      plugin/tour/resources/fonts/lato-black.woff
  47. BIN
      plugin/tour/resources/fonts/lato-bold.eot
  48. 5085
      plugin/tour/resources/fonts/lato-bold.svg
  49. BIN
      plugin/tour/resources/fonts/lato-bold.ttf
  50. BIN
      plugin/tour/resources/fonts/lato-bold.woff
  51. BIN
      plugin/tour/resources/fonts/lato-bolditalic.eot
  52. 4514
      plugin/tour/resources/fonts/lato-bolditalic.svg
  53. BIN
      plugin/tour/resources/fonts/lato-bolditalic.ttf
  54. BIN
      plugin/tour/resources/fonts/lato-bolditalic.woff
  55. BIN
      plugin/tour/resources/fonts/lato-italic.eot
  56. 4514
      plugin/tour/resources/fonts/lato-italic.svg
  57. BIN
      plugin/tour/resources/fonts/lato-italic.ttf
  58. BIN
      plugin/tour/resources/fonts/lato-italic.woff
  59. BIN
      plugin/tour/resources/fonts/lato-light.eot
  60. 4691
      plugin/tour/resources/fonts/lato-light.svg
  61. BIN
      plugin/tour/resources/fonts/lato-light.ttf
  62. BIN
      plugin/tour/resources/fonts/lato-light.woff
  63. BIN
      plugin/tour/resources/fonts/lato-regular.eot
  64. 4691
      plugin/tour/resources/fonts/lato-regular.svg
  65. BIN
      plugin/tour/resources/fonts/lato-regular.ttf
  66. BIN
      plugin/tour/resources/fonts/lato-regular.woff
  67. BIN
      plugin/tour/resources/tour-chamilo.png
  68. 4
      plugin/tour/views/script.tpl
  69. 79
      webservices/rest.php

@ -35,23 +35,6 @@
text-decoration: none;
}
.inner_lp_toc .scorm_item_section {
border:1px solid #222;
background:#333;
font-weight:bold;
color:#fff;
text-shadow:0 -1px 1px #000;
background-image:-webkit-gradient(linear,left top,left bottom,from(#555),to(#333));
background-image:-webkit-linear-gradient(top,#555,#333);
background-image:-moz-linear-gradient(top,#555,#333);
background-image:-ms-linear-gradient(top,#555,#333);
background-image:-o-linear-gradient(top,#555,#333);
background-image:linear-gradient(top,#555,#333);
margin-right: 1px;
padding: 10px 0px 10px 0px;
text-decoration: none;
}
.inner_lp_toc .scorm_item_section .scorm_item:before
{
content : url('../lp_section.png'); /* from main/newscorm/lp_controller.php file */
@ -150,15 +133,8 @@
background: -ms-linear-gradient(top, #505f6b 0%,#3e4f5c 100%); /* IE10+ */
background: linear-gradient(to bottom, #505f6b 0%,#3e4f5c 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#505f6b', endColorstr='#3e4f5c',GradientType=0 ); /* IE6-9 */
margin-right: 1px;
padding: 10px 0px 10px 0px;
text-decoration: none;
-webkit-border-top-left-radius: 10px;
-webkit-border-top-right-radius: 10px;
-moz-border-radius-topleft: 10px;
-moz-border-radius-topright: 10px;
border-top-left-radius: 10px;
border-top-right-radius: 10px;
}
.inner_lp_toc .scorm_item {
@ -352,7 +328,6 @@ opacity: 0.7;
margin-right: 1px;
padding-bottom: 2px;
text-decoration: none;
color: #2F3E46;
}
.inner_lp_toc .scorm_item a.chapter_module {
@ -363,10 +338,9 @@ opacity: 0.7;
.scorm_item_1,
.scorm_item_2 {
font-size: 16px;
margin-left: 10px;
margin-left: 0;
margin-right:10px;
text-decoration: none;
border-color: rgba(255, 255, 255, 0.3);
}
.scorm_item_1 {
border-bottom: 1px solid #CCCCCC;
@ -379,7 +353,6 @@ opacity: 0.7;
.scorm_item_2 {
border-bottom: 1px solid #CCCCCC;
color: #444444;
text-shadow: 0 1px 1px #F6F6F6;
margin-right: 1px;
padding: 10px 0px 10px 0px;
background-image:none;

@ -136,31 +136,6 @@
height: 210px;
/*padding: 10px;*/
}
.inner_lp_toc .scorm_item_section {
border:none;
background:#333;
font-weight:normal;
color:#fff;
text-shadow:none;
background: #fff; /* Old browsers */
background: -moz-linear-gradient(top, #fff 0%, #e5e5e5 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#fff), color-stop(100%,#e5e5e5)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, #fff 0%,#e5e5e5 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #fff 0%,#e5e5e5 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, #fff 0%,#e5e5e5 100%); /* IE10+ */
background: linear-gradient(to bottom, #fff 0%,#e5e5e5 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#fff', endColorstr='#e5e5e5',GradientType=0 ); /* IE6-9 */
margin-right: 1px;
padding: 10px 0px 10px 0px;
text-decoration: none;
-webkit-border-top-left-radius: 10px;
-webkit-border-top-right-radius: 10px;
-moz-border-radius-topleft: 10px;
-moz-border-radius-topright: 10px;
border-top-left-radius: 10px;
border-top-right-radius: 10px;
}
.inner_lp_toc .scorm_item {
font-size: 13px;
margin-left: 10px;
@ -351,7 +326,6 @@ opacity: 0.7;
margin-right: 1px;
padding-bottom: 2px;
text-decoration: none;
color: #2F3E46;
}
.inner_lp_toc .scorm_item a.chapter_module {
@ -362,10 +336,9 @@ opacity: 0.7;
.scorm_item_1,
.scorm_item_2 {
font-size: 16px;
margin-left: 10px;
margin-left: 0;
margin-right:10px;
text-decoration: none;
border-color: rgba(255, 255, 255, 0.3);
}
.scorm_item_1 {
border-bottom: 1px solid #CCCCCC;
@ -378,7 +351,6 @@ opacity: 0.7;
.scorm_item_2 {
border-bottom: 1px solid #CCCCCC;
color: #444444;
text-shadow: 0 1px 1px #F6F6F6;
margin-right: 1px;
padding: 10px 0px 10px 0px;
background-image:none;

@ -30,7 +30,7 @@ legend {
}
#header_right #notifications {
padding:40px 0px 0px 0px;
padding:0;
}
#header_right #notifications li {

@ -1393,14 +1393,26 @@ a.read {
/* INVITATIONS */
.invitation_confirm {
padding-bottom: 10px;
border-bottom: 1px solid #D8DFEA;
.invitation-clear{
padding-bottom: 1em;
padding-top: 1em;
}
.invitation_image {
width:110px;
.invitation-clear .title-profile, .invitation-clear .title-group {
font-size: 15px;
font-weight: bold;
padding-bottom: 0.2em;
}
.invitation-clear .title-profile a, .invitation-clear .title-group a{
color: #333;
}
.invitation-clear .title-profile a:hover, .invitation-clear .title-group a:hover{
color: #666;
}
.invitation-clear .content-invitation, .invitation-clear .description-group {
color: #666;
font-size: 13px;
padding-bottom: 0.3em;
}
/* DASHBOARD */
/* Head section */

@ -21,8 +21,6 @@
margin-right: 10px;
}
.inner_lp_toc .scorm_item_highlight {
font-weight:bold;
border:1px solid #abaaa7;
background-color: #abaaa7;
background-image:none;
margin-right: 0px;
@ -35,23 +33,6 @@
text-decoration: none;
}
.inner_lp_toc .scorm_item_section {
border:1px solid #222;
background:#333;
font-weight:bold;
color:#fff;
text-shadow:0 -1px 1px #000;
background-image:-webkit-gradient(linear,left top,left bottom,from(#555),to(#333));
background-image:-webkit-linear-gradient(top,#555,#333);
background-image:-moz-linear-gradient(top,#555,#333);
background-image:-ms-linear-gradient(top,#555,#333);
background-image:-o-linear-gradient(top,#555,#333);
background-image:linear-gradient(top,#555,#333);
margin-right: 1px;
padding: 10px 0px 10px 0px;
text-decoration: none;
}
.inner_lp_toc .scorm_item_section .scorm_item:before
{
content : url('../lp_section.png'); /* from main/newscorm/lp_controller.php file */
@ -152,13 +133,7 @@
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#2e75a3', endColorstr='#2e75a3',GradientType=0 ); /* IE6-9 */
margin-right: 1px;
padding: 10px 0px 10px 0px;
text-decoration: none;
-webkit-border-top-left-radius: 10px;
-webkit-border-top-right-radius: 10px;
-moz-border-radius-topleft: 10px;
-moz-border-radius-topright: 10px;
border-top-left-radius: 10px;
border-top-right-radius: 10px;
text-decoration: none;s
}
.inner_lp_toc .scorm_item {
@ -351,7 +326,6 @@ opacity: 0.7;
margin-right: 1px;
padding-bottom: 2px;
text-decoration: none;
color: #2F3E46;
}
.inner_lp_toc .scorm_item a.chapter_module {
@ -362,10 +336,9 @@ opacity: 0.7;
.scorm_item_1,
.scorm_item_2 {
font-size: 16px;
margin-left: 10px;
margin-left: 0;
margin-right:10px;
text-decoration: none;
border-color: rgba(255, 255, 255, 0.3);
}
.scorm_item_1 {
border-bottom: 1px solid #CCCCCC;
@ -378,7 +351,6 @@ opacity: 0.7;
.scorm_item_2 {
border-bottom: 1px solid #CCCCCC;
color: #444444;
text-shadow: 0 1px 1px #F6F6F6;
margin-right: 1px;
padding: 10px 0px 10px 0px;
background-image:none;

@ -118,7 +118,6 @@ a.thumbnail:hover{
}
.breadcrumb a{
line-height: 30px;
text-transform: none;
}
@ -441,7 +440,6 @@ a.thumbnail:hover{
}
.breadcrumb a{
padding-top: 0;
line-height: 30px;
text-transform: none;
}

@ -22,7 +22,6 @@
}
.inner_lp_toc .scorm_item_highlight {
font-weight:bold;
border:1px solid #00aad4;
background-color: #00aad4;
background-image:none;
margin-right: 0px;
@ -144,23 +143,9 @@
font-weight:normal;
color:#fff;
text-shadow:none;
background: #05abe0; /* Old browsers */
background: -moz-linear-gradient(top, #05abe0 0%, #2e75a3 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#05abe0), color-stop(100%,#2e75a3)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, #05abe0 0%,#2e75a3 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #05abe0 0%,#2e75a3 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, #05abe0 0%,#2e75a3 100%); /* IE10+ */
background: linear-gradient(to bottom, #05abe0 0%,#2e75a3 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#05abe0', endColorstr='#2e75a3',GradientType=0 ); /* IE6-9 */
margin-right: 1px;
padding: 10px 0px 10px 0px;
text-decoration: none;
-webkit-border-top-left-radius: 10px;
-webkit-border-top-right-radius: 10px;
-moz-border-radius-topleft: 10px;
-moz-border-radius-topright: 10px;
border-top-left-radius: 10px;
border-top-right-radius: 10px;
}
.inner_lp_toc .scorm_item {
@ -352,7 +337,8 @@
margin-right: 1px;
padding-bottom: 2px;
text-decoration: none;
color: #2F3E46;
text-shadow: none;
font-weight: normal;
}
.inner_lp_toc .scorm_item a.chapter_module {
@ -363,10 +349,9 @@
.scorm_item_1,
.scorm_item_2 {
font-size: 16px;
margin-left: 10px;
margin-left: 0;
margin-right:10px;
text-decoration: none;
border-color: rgba(255, 255, 255, 0.3);
}
.scorm_item_1 {
border-bottom: 1px solid #CCCCCC;
@ -377,9 +362,9 @@
padding: 10px 0px 10px 0px;
}
.scorm_item_2 {
border-bottom: 1px solid #CCCCCC;
border-bottom: 1px solid #00AAD4;
color: #444444;
text-shadow: 0 1px 1px #F6F6F6;
text-shadow: none;
margin-right: 1px;
padding: 10px 0px 10px 0px;
background-image:none;
@ -406,10 +391,7 @@
}
.scorm_item_section.scorm_item_normal.scorm_not_attempted {
background-image: none;
background-position: 270px center !important;
background-repeat: no-repeat;
background-color: #808080;
background-color: #333;
}
#learning_path_main #control {

@ -142,23 +142,8 @@
font-weight:normal;
color:#fff;
text-shadow:none;
background: #175ae2; /* Old browsers */
background: -moz-linear-gradient(top, #175ae2 0%, #133aac 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#175ae2), color-stop(100%,#133aac)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, #175ae2 0%,#133aac 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #175ae2 0%,#133aac 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, #175ae2 0%,#133aac 100%); /* IE10+ */
background: linear-gradient(to bottom, #175ae2 0%,#133aac 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#175ae2', endColorstr='#133aac',GradientType=0 ); /* IE6-9 */
margin-right: 1px;
padding: 10px 0px 10px 0px;
text-decoration: none;
-webkit-border-top-left-radius: 10px;
-webkit-border-top-right-radius: 10px;
-moz-border-radius-topleft: 10px;
-moz-border-radius-topright: 10px;
border-top-left-radius: 10px;
border-top-right-radius: 10px;
}
.inner_lp_toc .scorm_item {
@ -362,7 +347,7 @@ opacity: 0.7;
.scorm_item_1,
.scorm_item_2 {
font-size: 16px;
margin-left: 10px;
margin-left: 0;
margin-right:10px;
text-decoration: none;
border-color: rgba(255, 255, 255, 0.3);
@ -376,7 +361,6 @@ opacity: 0.7;
padding: 10px 0px 10px 0px;
}
.scorm_item_2 {
border-bottom: 1px solid #CCCCCC;
color: #444444;
text-shadow: 0 1px 1px #F6F6F6;
margin-right: 1px;

@ -142,23 +142,8 @@
font-weight:normal;
color:#fff;
text-shadow:none;
background: #a0c400; /* Old browsers */
background: -moz-linear-gradient(top, #a0c400 0%, #73a000 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#a0c400), color-stop(100%,#73a000)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, #a0c400 0%,#73a000 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #a0c400 0%,#73a000 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, #a0c400 0%,#73a000 100%); /* IE10+ */
background: linear-gradient(to bottom, #a0c400 0%,#73a000 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#a0c400', endColorstr='#73a000',GradientType=0 ); /* IE6-9 */
margin-right: 1px;
padding: 10px 0px 10px 0px;
text-decoration: none;
-webkit-border-top-left-radius: 10px;
-webkit-border-top-right-radius: 10px;
-moz-border-radius-topleft: 10px;
-moz-border-radius-topright: 10px;
border-top-left-radius: 10px;
border-top-right-radius: 10px;
}
.inner_lp_toc .scorm_item {
@ -362,7 +347,7 @@ opacity: 0.7;
.scorm_item_1,
.scorm_item_2 {
font-size: 16px;
margin-left: 10px;
margin-left: 0;
margin-right:10px;
text-decoration: none;
border-color: rgba(255, 255, 255, 0.3);
@ -370,7 +355,6 @@ opacity: 0.7;
.scorm_item_1 {
border-bottom: 1px solid #CCCCCC;
color:#444;
text-shadow:0 1px 1px #f6f6f6;
background: none;
margin-right: 1px;
padding: 10px 0px 10px 0px;
@ -378,7 +362,6 @@ opacity: 0.7;
.scorm_item_2 {
border-bottom: 1px solid #CCCCCC;
color: #444444;
text-shadow: 0 1px 1px #F6F6F6;
margin-right: 1px;
padding: 10px 0px 10px 0px;
background-image:none;

@ -29,6 +29,9 @@
padding: 10px 0px 10px 0px;
text-decoration: none;
}
.inner_lp_toc .scorm_item_highlight a {
color: #ffffff;
}
.inner_lp_toc .scorm_item_highlight a {
color:#fff;
margin-right: 1px;
@ -152,13 +155,6 @@
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ff7400', endColorstr='#df3a01',GradientType=0 ); /* IE6-9 */
margin-right: 1px;
padding: 10px 0px 10px 0px;
text-decoration: none;
-webkit-border-top-left-radius: 10px;
-webkit-border-top-right-radius: 10px;
-moz-border-radius-topleft: 10px;
-moz-border-radius-topright: 10px;
border-top-left-radius: 10px;
border-top-right-radius: 10px;
}
.inner_lp_toc .scorm_item {
@ -351,7 +347,6 @@ opacity: 0.7;
margin-right: 1px;
padding-bottom: 2px;
text-decoration: none;
color: #2F3E46;
}
.inner_lp_toc .scorm_item a.chapter_module {
@ -362,15 +357,13 @@ opacity: 0.7;
.scorm_item_1,
.scorm_item_2 {
font-size: 16px;
margin-left: 10px;
margin-left: 0;
margin-right:10px;
text-decoration: none;
border-color: rgba(255, 255, 255, 0.3);
}
.scorm_item_1 {
border-bottom: 1px solid #CCCCCC;
color:#444;
text-shadow:0 1px 1px #f6f6f6;
background: none;
margin-right: 1px;
padding: 10px 0px 10px 0px;
@ -378,7 +371,6 @@ opacity: 0.7;
.scorm_item_2 {
border-bottom: 1px solid #CCCCCC;
color: #444444;
text-shadow: 0 1px 1px #F6F6F6;
margin-right: 1px;
padding: 10px 0px 10px 0px;
background-image:none;

@ -22,7 +22,6 @@
}
.inner_lp_toc .scorm_item_highlight {
font-weight:bold;
border:1px solid #cf0404;
background-color: #cf0404;
background-image:none;
margin-right: 0px;
@ -142,23 +141,6 @@
font-weight:normal;
color:#fff;
text-shadow:none;
background: #ff3019; /* Old browsers */
background: -moz-linear-gradient(top, #ff3019 0%, #cf0404 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ff3019), color-stop(100%,#cf0404)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, #ff3019 0%,#cf0404 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #ff3019 0%,#cf0404 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, #ff3019 0%,#cf0404 100%); /* IE10+ */
background: linear-gradient(to bottom, #ff3019 0%,#cf0404 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ff3019', endColorstr='#cf0404',GradientType=0 ); /* IE6-9 */
margin-right: 1px;
padding: 10px 0px 10px 0px;
text-decoration: none;
-webkit-border-top-left-radius: 10px;
-webkit-border-top-right-radius: 10px;
-moz-border-radius-topleft: 10px;
-moz-border-radius-topright: 10px;
border-top-left-radius: 10px;
border-top-right-radius: 10px;
}
.inner_lp_toc .scorm_item {
@ -351,7 +333,6 @@ opacity: 0.7;
margin-right: 1px;
padding-bottom: 2px;
text-decoration: none;
color: #2F3E46;
}
.inner_lp_toc .scorm_item a.chapter_module {
@ -362,10 +343,9 @@ opacity: 0.7;
.scorm_item_1,
.scorm_item_2 {
font-size: 16px;
margin-left: 10px;
margin-left: 0;
margin-right:10px;
text-decoration: none;
border-color: rgba(255, 255, 255, 0.3);
}
.scorm_item_1 {
border-bottom: 1px solid #CCCCCC;
@ -378,7 +358,6 @@ opacity: 0.7;
.scorm_item_2 {
border-bottom: 1px solid #CCCCCC;
color: #444444;
text-shadow: 0 1px 1px #F6F6F6;
margin-right: 1px;
padding: 10px 0px 10px 0px;
background-image:none;

@ -136,30 +136,6 @@
height: 210px;
/*padding: 10px;*/
}
.inner_lp_toc .scorm_item_section {
border:none;
background:#333;
font-weight:normal;
color:#fff;
text-shadow:none;
background: #05abe0; /* Old browsers */
background: -moz-linear-gradient(top, #05abe0 0%, #2e75a3 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#05abe0), color-stop(100%,#2e75a3)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, #05abe0 0%,#2e75a3 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #05abe0 0%,#2e75a3 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, #05abe0 0%,#2e75a3 100%); /* IE10+ */
background: linear-gradient(to bottom, #05abe0 0%,#2e75a3 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#05abe0', endColorstr='#2e75a3',GradientType=0 ); /* IE6-9 */
margin-right: 1px;
padding: 10px 0px 10px 0px;
text-decoration: none;
-webkit-border-top-left-radius: 10px;
-webkit-border-top-right-radius: 10px;
-moz-border-radius-topleft: 10px;
-moz-border-radius-topright: 10px;
border-top-left-radius: 10px;
border-top-right-radius: 10px;
}
.inner_lp_toc .scorm_item {
font-size: 13px;
@ -353,7 +329,6 @@ opacity: 0.7;
margin-right: 1px;
padding-bottom: 2px;
text-decoration: none;
color: #2F3E46;
}
.inner_lp_toc .scorm_item a.chapter_module {
@ -364,10 +339,9 @@ opacity: 0.7;
.scorm_item_1,
.scorm_item_2 {
font-size: 16px;
margin-left: 10px;
margin-left: 0;
margin-right:10px;
text-decoration: none;
border-color: rgba(255, 255, 255, 0.3);
}
.scorm_item_1 {
border-bottom: 1px solid #CCCCCC;
@ -380,7 +354,6 @@ opacity: 0.7;
.scorm_item_2 {
border-bottom: 1px solid #CCCCCC;
color: #444444;
text-shadow: 0 1px 1px #F6F6F6;
margin-right: 1px;
padding: 10px 0px 10px 0px;
background-image:none;

@ -22,8 +22,7 @@
}
.inner_lp_toc .scorm_item_highlight {
font-weight:bold;
border:1px solid #333;
background-color: #333;
background-color: #04698E;
background-image:none;
margin-right: 0px;
padding: 10px 0px 10px 0px;
@ -136,30 +135,6 @@
height: 210px;
/*padding: 10px;*/
}
.inner_lp_toc .scorm_item_section {
border:none;
background:#333;
font-weight:normal;
color:#fff;
text-shadow:none;
background: #05abe0; /* Old browsers */
background: -moz-linear-gradient(top, #05abe0 0%, #2e75a3 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#05abe0), color-stop(100%,#2e75a3)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, #05abe0 0%,#2e75a3 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #05abe0 0%,#2e75a3 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, #05abe0 0%,#2e75a3 100%); /* IE10+ */
background: linear-gradient(to bottom, #05abe0 0%,#2e75a3 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#05abe0', endColorstr='#2e75a3',GradientType=0 ); /* IE6-9 */
margin-right: 1px;
padding: 10px 0px 10px 0px;
text-decoration: none;
-webkit-border-top-left-radius: 10px;
-webkit-border-top-right-radius: 10px;
-moz-border-radius-topleft: 10px;
-moz-border-radius-topright: 10px;
border-top-left-radius: 10px;
border-top-right-radius: 10px;
}
.inner_lp_toc .scorm_item {
font-size: 13px;
@ -344,7 +319,7 @@ opacity: 0.7;
margin-right: 1px;
padding-bottom: 2px;
text-decoration: none;
color: #2F3E46;
text-shadow: none;
}
.inner_lp_toc .scorm_item a.chapter_module {
@ -355,10 +330,9 @@ opacity: 0.7;
.scorm_item_1,
.scorm_item_2 {
font-size: 16px;
margin-left: 10px;
margin-left: 0;
margin-right:10px;
text-decoration: none;
border-color: rgba(255, 255, 255, 0.3);
}
.scorm_item_1 {
border-bottom: 1px solid #CCCCCC;

@ -21,7 +21,6 @@
margin-right: 10px;
}
.inner_lp_toc .scorm_item_highlight {
font-weight:bold;
border:1px solid #fe9a2e;
background-color: #fe9a2e;
background-image:none;
@ -153,12 +152,6 @@
margin-right: 1px;
padding: 10px 0px 10px 0px;
text-decoration: none;
-webkit-border-top-left-radius: 10px;
-webkit-border-top-right-radius: 10px;
-moz-border-radius-topleft: 10px;
-moz-border-radius-topright: 10px;
border-top-left-radius: 10px;
border-top-right-radius: 10px;
}
.inner_lp_toc .scorm_item {
@ -362,10 +355,9 @@ opacity: 0.7;
.scorm_item_1,
.scorm_item_2 {
font-size: 16px;
margin-left: 10px;
margin-left: 0;
margin-right:10px;
text-decoration: none;
border-color: rgba(255, 255, 255, 0.3);
}
.scorm_item_1 {
border-bottom: 1px solid #CCCCCC;
@ -378,7 +370,6 @@ opacity: 0.7;
.scorm_item_2 {
border-bottom: 1px solid #CCCCCC;
color: #444444;
text-shadow: 0 1px 1px #F6F6F6;
margin-right: 1px;
padding: 10px 0px 10px 0px;
background-image:none;

@ -153,12 +153,6 @@
margin-right: 1px;
padding: 10px 0px 10px 0px;
text-decoration: none;
-webkit-border-top-left-radius: 10px;
-webkit-border-top-right-radius: 10px;
-moz-border-radius-topleft: 10px;
-moz-border-radius-topright: 10px;
border-top-left-radius: 10px;
border-top-right-radius: 10px;
}
.inner_lp_toc .scorm_item {
@ -166,8 +160,6 @@
margin-left: 10px;
margin-right:10px;
text-decoration: none;
border-color: rgba(255, 255, 255, 0.3);
}
.inner_lp_toc .scorm_item.scorm_item_level_1{
background: url(../img/archive.png) no-repeat;
@ -351,7 +343,7 @@ opacity: 0.7;
margin-right: 1px;
padding-bottom: 2px;
text-decoration: none;
color: #2F3E46;
text-shadow: none;
}
.inner_lp_toc .scorm_item a.chapter_module {
@ -362,10 +354,9 @@ opacity: 0.7;
.scorm_item_1,
.scorm_item_2 {
font-size: 16px;
margin-left: 10px;
margin-left: 0;
margin-right:10px;
text-decoration: none;
border-color: rgba(255, 255, 255, 0.3);
}
.scorm_item_1 {
border-bottom: 1px solid #CCCCCC;
@ -378,7 +369,6 @@ opacity: 0.7;
.scorm_item_2 {
border-bottom: 1px solid #CCCCCC;
color: #444444;
text-shadow: 0 1px 1px #F6F6F6;
margin-right: 1px;
padding: 10px 0px 10px 0px;
background-image:none;

@ -143,23 +143,6 @@
font-weight:normal;
color:#fff;
text-shadow:none;
background: #fcfcfc; /* Old browsers */
background: -moz-linear-gradient(top, #fcfcfc 0%, #e4e4e4 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#fcfcfc), color-stop(100%,#e4e4e4)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, #fcfcfc 0%,#e4e4e4 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #fcfcfc 0%,#e4e4e4 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, #fcfcfc 0%,#e4e4e4 100%); /* IE10+ */
background: linear-gradient(to bottom, #fcfcfc 0%,#e4e4e4 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#fcfcfc', endColorstr='#e4e4e4',GradientType=0 ); /* IE6-9 */
margin-right: 1px;
padding: 10px 0px 10px 0px;
text-decoration: none;
-webkit-border-top-left-radius: 10px;
-webkit-border-top-right-radius: 10px;
-moz-border-radius-topleft: 10px;
-moz-border-radius-topright: 10px;
border-top-left-radius: 10px;
border-top-right-radius: 10px;
}
.inner_lp_toc .scorm_item {
@ -352,7 +335,7 @@ opacity: 0.7;
margin-right: 1px;
padding-bottom: 2px;
text-decoration: none;
color: #2F3E46;
text-shadow: none;
}
.inner_lp_toc .scorm_item a.chapter_module {
@ -363,10 +346,9 @@ opacity: 0.7;
.scorm_item_1,
.scorm_item_2 {
font-size: 16px;
margin-left: 10px;
margin-left: 0;
margin-right:10px;
text-decoration: none;
border-color: rgba(255, 255, 255, 0.3);
}
.scorm_item_1 {
border-bottom: 1px solid #CCCCCC;

@ -136,30 +136,6 @@
height: 210px;
/*padding: 10px;*/
}
.inner_lp_toc .scorm_item_section {
border:none;
background:#333;
font-weight:normal;
color:#fff;
text-shadow:none;
background: #05abe0; /* Old browsers */
background: -moz-linear-gradient(top, #05abe0 0%, #2e75a3 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#05abe0), color-stop(100%,#2e75a3)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, #05abe0 0%,#2e75a3 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #05abe0 0%,#2e75a3 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, #05abe0 0%,#2e75a3 100%); /* IE10+ */
background: linear-gradient(to bottom, #05abe0 0%,#2e75a3 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#05abe0', endColorstr='#2e75a3',GradientType=0 ); /* IE6-9 */
margin-right: 1px;
padding: 10px 0px 10px 0px;
text-decoration: none;
-webkit-border-top-left-radius: 10px;
-webkit-border-top-right-radius: 10px;
-moz-border-radius-topleft: 10px;
-moz-border-radius-topright: 10px;
border-top-left-radius: 10px;
border-top-right-radius: 10px;
}
.inner_lp_toc .scorm_item {
font-size: 13px;
@ -351,7 +327,6 @@ opacity: 0.7;
margin-right: 1px;
padding-bottom: 2px;
text-decoration: none;
color: #2F3E46;
}
.inner_lp_toc .scorm_item a.chapter_module {
@ -362,10 +337,9 @@ opacity: 0.7;
.scorm_item_1,
.scorm_item_2 {
font-size: 16px;
margin-left: 10px;
margin-left: 0;
margin-right:10px;
text-decoration: none;
border-color: rgba(255, 255, 255, 0.3);
}
.scorm_item_1 {
border-bottom: 1px solid #CCCCCC;
@ -378,7 +352,6 @@ opacity: 0.7;
.scorm_item_2 {
border-bottom: 1px solid #CCCCCC;
color: #444444;
text-shadow: 0 1px 1px #F6F6F6;
margin-right: 1px;
padding: 10px 0px 10px 0px;
background-image:none;

@ -133,7 +133,23 @@ class CalculatedAnswer extends Question
$form->addElement('label', null, get_lang('IfYouWantOnlyIntegerValuesWriteBothLimitsWithoutDecimals'));
$form->addElement('html', '<div id="blanks_weighting"></div>');
$form->addElement('label', null, get_lang('FormulaExample').': &radic;<span style="text-decoration:overline;">&nbsp;x &divide y&nbsp;</span> &times e <sup>(ln(pi))</sup> = sqrt([x]/[y])*(e^(ln(pi)))');
$notationListButton = Display::url(
get_lang('NotationList'),
api_get_path(WEB_PATH).'main/exercice/evalmathnotation.php',
array(
'class' => 'btn ajax',
'_target' => '_blank'
)
);
$form->addElement(
'html',
'<div class="control-group">
<label class="control-label"></label>
<div class="controls">'.$notationListButton.'</div>
</div>');
$form->addElement('label', null, get_lang('FormulaExample'));
$form->addElement('text', 'formula', get_lang('Formula'), array('id' => 'formula', 'class' => 'span4'));
$form->addRule('formula', get_lang('GiveFormula'), 'required');
@ -163,50 +179,62 @@ class CalculatedAnswer extends Question
*/
function processAnswersCreation($form)
{
global $charset;
$answer = $form->getSubmitValue('answer');
$formula = $form->getSubmitValue('formula');
$lowestValues = $form->getSubmitValue('lowestValue');
$highestValues = $form->getSubmitValue('highestValue');
$answerVariations = $form->getSubmitValue('answerVariations');
$this->weighting = $form->getSubmitValue('weighting');
//Remove previous answers
Database::delete("c_quiz_answer", array('question_id = ?' => $this->id));
// Create as many answers as $answerVariations
for ($j=0 ; $j < $answerVariations; $j++) {
$auxAnswer = $answer;
$auxFormula = $formula;
$nb = preg_match_all('/\[[^\]]*\]/', $auxAnswer, $blanks);
if ($nb > 0) {
for ($i=0 ; $i < $nb; ++$i) {
$blankItem = $blanks[0][$i];
$replace = array("[", "]");
$newBlankItem = str_replace($replace, "", $blankItem);
$newBlankItem = "[".trim($newBlankItem)."]";
$randomValue = mt_rand($lowestValues[$i],$highestValues[$i]);
//$randomValue = mt_rand($lowestValues[$i]*100,$highestValues[$i]*100)/100;
$auxAnswer = str_replace($blankItem, $randomValue, $auxAnswer);
$auxFormula = str_replace($blankItem, $randomValue, $auxFormula);
}
require_once(api_get_path(LIBRARY_PATH).'evalmath.class.php');
$math = new EvalMath();
$result = $math->evaluate($auxFormula);
$result = number_format($result, 2, ".", "");
// Remove decimal trailing zeros
$result = rtrim($result, "0");
// If it is an integer (ends in .00) remove the decimal point
if (mb_substr($result, -1) === ".") {
$result = str_replace(".", "", $result);
if (!self::isAnswered()) {
$table = Database::get_course_table(TABLE_QUIZ_ANSWER);
Database::delete(
$table,
array(
'c_id = ? AND question_id = ?' => array(
$this->course['real_id'],
$this->id
)
)
);
$answer = $form->getSubmitValue('answer');
$formula = $form->getSubmitValue('formula');
$lowestValues = $form->getSubmitValue('lowestValue');
$highestValues = $form->getSubmitValue('highestValue');
$answerVariations = $form->getSubmitValue('answerVariations');
$this->weighting = $form->getSubmitValue('weighting');
// Create as many answers as $answerVariations
for ($j=0 ; $j < $answerVariations; $j++) {
$auxAnswer = $answer;
$auxFormula = $formula;
$nb = preg_match_all('/\[[^\]]*\]/', $auxAnswer, $blanks);
if ($nb > 0) {
for ($i=0 ; $i < $nb; ++$i) {
$blankItem = $blanks[0][$i];
$replace = array("[", "]");
$newBlankItem = str_replace($replace, "", $blankItem);
$newBlankItem = "[".trim($newBlankItem)."]";
// take random float values when one or both edge values have a decimal point
$randomValue =
(strpos($lowestValues[$i],'.') !== false ||
strpos($highestValues[$i],'.') !== false) ?
mt_rand($lowestValues[$i]*100,$highestValues[$i]*100)/100 :
mt_rand($lowestValues[$i],$highestValues[$i]);
$auxAnswer = str_replace($blankItem, $randomValue, $auxAnswer);
$auxFormula = str_replace($blankItem, $randomValue, $auxFormula);
}
require_once(api_get_path(LIBRARY_PATH).'evalmath.class.php');
$math = new EvalMath();
$result = $math->evaluate($auxFormula);
$result = number_format($result, 2, ".", "");
// Remove decimal trailing zeros
$result = rtrim($result, "0");
// If it is an integer (ends in .00) remove the decimal point
if (mb_substr($result, -1) === ".") {
$result = str_replace(".", "", $result);
}
// Attach formula
$auxAnswer .= " [".$result."]@@".$formula;
}
// Attach formula
$auxAnswer .= " [".$result."]@@".$formula;
$this->save();
$objAnswer = new answer($this->id);
$objAnswer->createAnswer($auxAnswer, 1, '', $this->weighting, null);
$objAnswer->position = array();
$objAnswer->save();
}
$this->save();
$objAnswer = new answer($this->id);
$objAnswer->createAnswer($auxAnswer, 1, '', $this->weighting, array());
$objAnswer->position = array();
$objAnswer->save();
}
}
@ -225,4 +253,26 @@ class CalculatedAnswer extends Question
</tr>';
return $header;
}
/**
* Returns true if the current question has been attempted to be answered
* @return boolean
*/
public function isAnswered()
{
$table = Database::get_main_table(TABLE_STATISTIC_TRACK_E_ATTEMPT);
$result = Database::select(
'question_id',
$table,
array(
'where' => array(
'question_id = ? AND course_code = ?' => array(
$this->id,
$this->course['code']
)
)
)
);
return empty($result) ? false : true;
}
}

@ -0,0 +1,38 @@
<?php
/* For licensing terms, see /license.txt */
require_once "../inc/global.inc.php";
echo "<pre>".
get_lang('SummationPlus')."\n".
get_lang('SubstractionMinus')."\n".
get_lang('MultiplicationStar')."\n".
get_lang('DivisionSlash')."\n".
get_lang('ExponentiationCircumflex')."\n".
"\n".
get_lang('SquareRootSqrt')."\n".
get_lang('AbsoluteValueAbs')."\n".
get_lang('NaturalLogarithmLn')."\n".
get_lang('LogarithmLog')."\n".
get_lang('ENumberE')."\n".
get_lang('PiNumberPi')."\n".
"\n".
get_lang('SineSin')."\n".
get_lang('HyperbolicSineSinh')."\n".
get_lang('ArcsineArcsin')."\n".
get_lang('InverseSineAsin')."\n".
get_lang('HyperbolicArcsineArcsinh')."\n".
get_lang('InverseHyperbolicSineAsinh')."\n".
"\n".
get_lang('CosineCos')."\n".
get_lang('HyperbolicCosineCosh')."\n".
get_lang('ArccosineArccos')."\n".
get_lang('InverseCosineAcos')."\n".
get_lang('HyperbolicArccosineArccosh')."\n".
get_lang('InverseHyperbolicCosineAcosh')."\n".
"\n".
get_lang('TangentTan')."\n".
get_lang('HyperbolicTangentTanh')."\n".
get_lang('ArctangentArctan')."\n".
get_lang('InverseTangentAtan')."\n".
get_lang('HyperbolicArctangentArctanh')."\n".
get_lang('InverseHyperbolicTangentAtanh').
"</pre>";

@ -170,7 +170,27 @@ if (!$inATest) {
$question_class = get_class($objQuestionTmp);
$clone_link = '<a href="'.api_get_self().'?'.api_get_cidreq().'&clone_question='.$id.'">'.Display::return_icon('cd.gif',get_lang('Copy'), array(), ICON_SIZE_SMALL).'</a>';
$edit_link = '<a href="'.api_get_self().'?'.api_get_cidreq().'&type='.$objQuestionTmp->selectType().'&myid=1&editQuestion='.$id.'">'.Display::return_icon('edit.png',get_lang('Modify'), array(), ICON_SIZE_SMALL).'</a>';
/*$edit_link = '<a href="'.api_get_self().'?'.api_get_cidreq().'&type='.$objQuestionTmp->selectType().'&myid=1&editQuestion='.$id.'">'.Display::return_icon('edit.png',get_lang('Modify'), array(), ICON_SIZE_SMALL).'</a>';
if ($objQuestionTmp->type == CALCULATED_ANSWER && $objQuestionTmp->isAnswered()) {
$edit_link = '<a>'.Display::return_icon('edit_na.png',get_lang('Modify'), array(), ICON_SIZE_SMALL).'</a>';
}*/
$edit_link = ($objQuestionTmp->type == CALCULATED_ANSWER && $objQuestionTmp->isAnswered()) ?
'<a>'.Display::return_icon(
'edit_na.png',
get_lang('QuestionEditionNotAvailableBecauseItIsAlreadyAnsweredHoweverYouCanCopyItAndModifyTheCopy'),
array(),
ICON_SIZE_SMALL
).'</a>' :
'<a href="'.api_get_self().'?'.api_get_cidreq().'&type='.
$objQuestionTmp->selectType().'&myid=1&editQuestion='.$id.'">'.
Display::return_icon(
'edit.png',
get_lang('Modify'),
array(),
ICON_SIZE_SMALL
).'</a>';
if ($objExercise->edit_exercise_in_lp == true) {
$delete_link = '<a id="delete_'.$id.'" class="opener" href="'.api_get_self().'?'.api_get_cidreq().'&exerciseId='.$exerciseId.'&deleteQuestion='.$id.'" >'.Display::return_icon('delete.png',get_lang('RemoveFromTest'), array(), ICON_SIZE_SMALL).'</a>';

@ -929,6 +929,8 @@ class Autoload
$result['Utf8'] = '/main/inc/lib/system/text/utf8.class.php';
$result['Utf8Decoder'] = '/main/inc/lib/system/text/utf8_decoder.class.php';
$result['Utf8Encoder'] = '/main/inc/lib/system/text/utf8_encoder.class.php';
$result['WebService'] = '/main/inc/lib/webservices/WebService.class.php';
$result['MessagesWebService'] = '/main/inc/lib/webservices/MessagesWebService.class.php';
$result['Wiki'] = '/main/coursecopy/classes/wiki.class.php';
$result['Work\Access'] = '/main/work/access.class.php';
$result['Work\AjaxController'] = '/main/work/ajax_controller.class.php';

@ -1661,7 +1661,7 @@ class Display
$second_title = Security::remove_XSS($second_title);
$title .= "<small> $second_title<small>";
}
return '<div class="page-header"><h2>'.Security::remove_XSS($title).'</h2></div>';
return '<h3>'.Security::remove_XSS($title).'</h3>';
}
public static function page_subheader2($title, $second_title = null)

@ -7140,7 +7140,7 @@ function api_get_password_checker_js($usernameInputId, $passwordInputid)
var verdicts = ['".implode("','", $verdicts)."'];
var errorMessages = {
password_to_short : '".get_lang('PasswordIsTooShort')."',
same_as_username : '".get_lang('YourPasswordCannotBeTheSameAsYourUsername')."',
same_as_username : '".get_lang('YourPasswordCannotBeTheSameAsYourUsername')."'
};
$(document).ready(function() {
@ -7154,7 +7154,7 @@ function api_get_password_checker_js($usernameInputId, $passwordInputid)
},
errorMessages : errorMessages,
viewports: {
progress: '#password_progress',
progress: '#password_progress'
//verdict: undefined,
//errors: undefined
},

@ -1508,4 +1508,112 @@ class MessageManager
$html .= $table->return_table();
return $html;
}
/**
* Get the count of the last received messages for a user
* @param int $userId The user id
* @param int $lastId The id of the last received message
* @return int The count of new messages
*/
public static function countMessagesFromLastReceivedMessage($userId, $lastId = 0)
{
$userId = intval($userId);
$lastId = intval($lastId);
if (empty($userId)) {
return 0;
}
$messagesTable = Database::get_main_table(TABLE_MESSAGE);
$conditions = array(
'where' => array(
'user_receiver_id = ?' => $userId,
'AND msg_status = ?' => MESSAGE_STATUS_UNREAD,
'AND id > ?' => $lastId
)
);
$result = Database::select('COUNT(1) AS qty', $messagesTable, $conditions);
if (!empty($result)) {
$row = current($result);
return $row['qty'];
}
return 0;
}
/**
* Get the data of the last received messages for a user
* @param int $userId The user id
* @param int $lastId The id of the last received message
* @return int The count of new messages
*/
public static function getMessagesFromLastReceivedMessage($userId, $lastId = 0)
{
$userId = intval($userId);
$lastId = intval($lastId);
if (empty($userId)) {
return 0;
}
$messagesTable = Database::get_main_table(TABLE_MESSAGE);
$userTable = Database::get_main_table(TABLE_MAIN_USER);
$messages = array();
$sql = "SELECT m.*, u.user_id, u.lastname, u.firstname "
. "FROM $messagesTable as m "
. "INNER JOIN $userTable as u "
. "ON m.user_receiver_id = u.user_id "
. "WHERE u.user_id = $userId "
. "AND m.msg_status = " . MESSAGE_STATUS_UNREAD . " "
. "AND m.id > $lastId";
$result = Database::query($sql);
if ($result !== false) {
while ($row = Database::fetch_assoc($result)) {
$messages[] = $row;
}
}
return $messages;
}
/**
* Check whether a message has attachments
* @param int $messageId The message id
* @return boolean Whether the message has attachments return true. Otherwise return false
*/
public static function hasAttachments($messageId)
{
$messageId = intval($messageId);
if (empty($messageId)) {
return false;
}
$messageAttachmentTable = Database::get_main_table(TABLE_MESSAGE_ATTACHMENT);
$conditions = array(
'where' => array(
'message_id = ?' => $messageId
)
);
$result = Database::select('COUNT(1) AS qty', $messageAttachmentTable, $conditions, 'first');
if (!empty($result)) {
if ($result['qty'] > 0) {
return true;
}
}
return false;
}
}

@ -0,0 +1,128 @@
<?php
/* For licensing terms, see /license.txt */
/**
* Class for manage the messages web service
* @author Angel Fernando Quiroz Campos <angel.quiroz@beeznest.com>
* @package chamilo.webservices.messages
*/
class MessagesWebService extends WebService
{
const SERVICE_NAME = 'MsgREST';
/**
* Generate the api key for a user
* @param int $userId The user id
* @return string The api key
*/
public function generateApiKey($userId)
{
$apiKey = UserManager::get_api_keys($userId, self::SERVICE_NAME);
if (empty($apiKey)) {
UserManager::add_api_key($userId, self::SERVICE_NAME);
$apiKey = UserManager::get_api_keys($userId, self::SERVICE_NAME);
}
return current($apiKey);
}
/**
* Get the user api key
* @param string $username The user name
* @return string The api key
*/
public function getApiKey($username)
{
$userInfo = api_get_user_info_from_username($username);
$userId = $userInfo['user_id'];
if ($this->apiKey !== null) {
return $this->apiKey;
} else {
$this->apiKey = $this->generateApiKey($userId);
return $this->apiKey;
}
}
/**
* Check if the api is valid for a user
* @param string $username The username
* @param string $apiKeyToValidate The api key
* @return boolean Whether the api belongs to the user return true. Otherwise return false
*/
public static function isValidApiKey($username, $apiKeyToValidate)
{
$userInfo = api_get_user_info_from_username($username);
$userId = $userInfo['user_id'];
$apiKeys = UserManager::get_api_keys($userId, self::SERVICE_NAME);
if (!empty($apiKeys)) {
$apiKey = current($apiKeys);
if ($apiKey == $apiKeyToValidate) {
return true;
}
}
return false;
}
/**
* Get the count of new messages for a user
* @param string $username The username
* @param int $lastId The id of the last received message
* @return int The count fo new messages
*/
public function countNewMessages($username, $lastId = 0)
{
$userInfo = api_get_user_info_from_username($username);
$userId = $userInfo['user_id'];
return MessageManager::countMessagesFromLastReceivedMessage($userId, $lastId);
}
/**
* Get the list of new messages for a user
* @param string $username The username
* @param int $lastId The id of the last received message
* @return array the new message list
*/
public function getNewMessages($username, $lastId = 0)
{
$messages = array();
$userInfo = api_get_user_info_from_username($username);
$userId = $userInfo['user_id'];
$lastMessages = MessageManager::getMessagesFromLastReceivedMessage($userId, $lastId);
foreach ($lastMessages as $message) {
$hasAttachments = MessageManager::hasAttachments($message['id']);
$messages[] = array(
'id' => $message['id'],
'title' => $message['title'],
'sender' => array(
'id' => $message['user_id'],
'lastname' => $message['lastname'],
'firstname' => $message['firstname'],
'completeName' => api_get_person_name($message['firstname'], $message['lastname']),
),
'content' => $message['content'],
'hasAttachments' => $hasAttachments,
'platform' => array(
'website' => api_get_path(WEB_PATH),
'messagingTool' => api_get_path(WEB_PATH) . 'main/messages/inbox.php'
)
);
}
return $messages;
}
}

@ -0,0 +1,72 @@
<?php
/* For licensing terms, see /license.txt */
/**
* Base class for Web Services
* @author Angel Fernando Quiroz Campos <angel.quiroz@beeznest.com>
* @package chamilo.webservices
*/
abstract class WebService
{
protected $apiKey;
/**
* Class constructor
*/
public function __construct()
{
$this->apiKey = null;
}
/**
* Set the api key
* @param string $apiKey The api key
*/
public function setApiKey($apiKey)
{
$this->apiKey = $apiKey;
}
/**
* @abstract
*/
abstract public function getApiKey($username);
/**
* Check whether the username and password are valid
* @param string $username The username
* @param string $password the password
* @return boolean Whether the password belongs to the username return true. Otherwise return false
*/
public static function isValidUser($username, $password)
{
if (empty($username) || empty($password)) {
return false;
}
$userTable = Database::get_main_table(TABLE_MAIN_USER);
$whereConditions = array(
"username = '?' " => $username,
"AND password = '?'" => sha1($password)
);
$conditions = array(
'where' => $whereConditions
);
$table = Database::select('count(1) as qty', $userTable, $conditions);
if ($table != false) {
$row = current($table);
if ($row['qty'] > 0) {
return true;
}
}
return false;
}
}

@ -2,6 +2,7 @@
/*
for more information: see languages.txt in the lang folder.
*/
$QuestionEditionNotAvailableBecauseItIsAlreadyAnsweredHoweverYouCanCopyItAndModifyTheCopy = "Question edition is not available because the question has been already answered. However, you can copy and modify it.";
$SelectADateOnTheCalendar = "Select a date from the calendar";
$AreYouSureDeleteTestResultBeforeDateD = "Are you sure you want to clean results for this test before the selected date ?";
$CleanStudentsResultsBeforeDate = "Clean all results before a selected date";

@ -2,6 +2,7 @@
/*
for more information: see languages.txt in the lang folder.
*/
$AssignedCourses = "Assigned courses";
$SleepingStudents = "Students with no activity during the last few days";
$SleepingTeachers = "Teachers with no activity in the last few days";
$InactiveUsers = "Users who's account has been disabled";

@ -2,6 +2,38 @@
/*
for more information: see languages.txt in the lang folder.
*/
$ActivateAudioRecorder = "Activate audio recorder";
$StartSpeaking = "Start speaking";
$InverseHyperbolicTangentAtanh = "Inverse hyperbolic tangent:\tatanh(x)";
$HyperbolicArctangentArctanh = "Hyperbolic arctangent:\t\tarctanh(x)";
$InverseTangentAtan = "Inverse tangent:\t\tatan(x)";
$ArctangentArctan = "Arctangent:\t\t\tarctan(x)";
$HyperbolicTangentTanh = "Hyperbolic tangent:\t\ttanh(x)";
$TangentTan = "Tangent:\t\t\ttan(x)";
$InverseHyperbolicCosineAcosh = "Inverse hyperbolic cosine:\tacosh(x)";
$HyperbolicArccosineArccosh = "Hyperbolic arccosine:\t\tarccosh(x)";
$InverseCosineAcos = "Inverse cosine:\t\t\tacos(x)";
$ArccosineArccos = "Arccosine:\t\t\tarccos(x)";
$HyperbolicCosineCosh = "Hyperbolic cosine:\t\tcosh(x)";
$CosineCos = "Cosine:\t\t\t\tcos(x)";
$InverseHyperbolicSineAsinh = "Inverse hyperbolic sine:\tasinh(x)";
$HyperbolicArcsineArcsinh = "Hyperbolic arcsine:\t\tarcsinh(x)";
$InverseSineAsin = "Inverse sine:\t\t\tasin(x)";
$ArcsineArcsin = "Arcsine:\t\t\tarcsin(x)";
$HyperbolicSineSinh = "Hyperbolic sine:\t\tsinh(x)";
$SineSin = "Sine:\t\t\t\tsin(x)";
$PiNumberPi = "Pi number:\t\t\tpi";
$ENumberE = "E number:\t\t\te";
$LogarithmLog = "Logarithm:\t\t\tlog(x)";
$NaturalLogarithmLn = "Natural logarithm:\t\tln(x)";
$AbsoluteValueAbs = "Absolute value:\t\t\tabs(x)";
$SquareRootSqrt = "Square root:\t\t\tsqrt(x)";
$ExponentiationCircumflex = "Exponentiation:\t\t\t^";
$DivisionSlash = "Division:\t\t\t/";
$MultiplicationStar = "Multiplication:\t\t\t*";
$SubstractionMinus = "Substraction:\t\t\t-";
$SummationPlus = "Summation:\t\t\t+";
$NotationList = "Formula notation";
$SubscribeToSessionRequest = "Request for subscription to a session";
$PleaseSubscribeMeToSession = "Please consider subscribing me to session";
$SearchActiveSessions = "Search active sessions";
@ -11,7 +43,7 @@ $GiveAnswerVariations = "Please, write how many question variations you want";
$AnswerVariations = "Question variations";
$GiveFormula = "Please, write the formula";
$Formula = "Formula";
$FormulaExample = "Formula sample";
$FormulaExample = "Formula sample: sqrt( [x] / [y] ) * ( e ^ ( ln(pi) ) )";
$VariableRanges = "Variable ranges";
$ExampleValue = "Range value";
$CalculatedAnswer = "Calculated question";
@ -1643,4 +1675,4 @@ $DataTableSearch = "Search";
$HideColumn = "Hide column";
$DisplayColumn = "Show column";
$LegalAgreementAccepted = "Legal agreement accepted";
?>
?>

@ -2,6 +2,7 @@
/*
for more information: see languages.txt in the lang folder.
*/
$QuestionEditionNotAvailableBecauseItIsAlreadyAnsweredHoweverYouCanCopyItAndModifyTheCopy = "L'édition de cette question est désactivée parce qu'elle a déjà été utilisée par au moins un étudiant dans un test. Cependant, vous pouvez la copier et modifier la copie.";
$SelectADateOnTheCalendar = "Sélectionnez une date";
$AreYouSureDeleteTestResultBeforeDateD = "Êtes vous sur de vouloir supprimer toutes les tentatives antérieures à la date sélectionnée ?";
$CleanStudentsResultsBeforeDate = "Supprimer les tentatives antérieures à une date donnée";

@ -2,6 +2,7 @@
/*
for more information: see languages.txt in the lang folder.
*/
$AssignedCourses = "Cours assignés";
$SleepingStudents = "Apprenants sans activité durant les derniers jours";
$SleepingTeachers = "Enseignants sans activité durant les derniers jours";
$InactiveUsers = "Utilisateurs au compte désactivé";

@ -2,6 +2,40 @@
/*
for more information: see languages.txt in the lang folder.
*/
$ActivateAudioRecorder = "Activer l'enregistreur audio";
$StartSpeaking = "Parlez maintenant";
$InverseHyperbolicTangentAtanh = "Tangente hyperbolique inverse:\tatanh(x)";
$HyperbolicArctangentArctanh = "Arctangente hyperbolique:\t\tarctanh(x)";
$InverseTangentAtan = "Tangente inverse:\t\tatan(x)";
$ArctangentArctan = "Arctangente:\t\t\tarctan(x)";
$HyperbolicTangentTanh = "Tangente hyperbolique:\t\ttanh(x)";
$TangentTan = "Tangente:\t\t\ttan(x)";
$InverseHyperbolicCosineAcosh = "Cosinus hyperbolique inverse:\tacosh(x)";
$HyperbolicArccosineArccosh = "Arcosinus hyperbolique:\t\tarccosh(x)";
$InverseCosineAcos = "Cosinus inverse:\t\t\tacos(x)";
$ArccosineArccos = "Arccosinus:\t\t\tarccos(x)";
$HyperbolicCosineCosh = "Cosinus hyperbolique:\t\tcosh(x)";
$CosineCos = "Cosinus:\t\t\t\tcos(x)";
$InverseHyperbolicSineAsinh = "Sinus hyperbolique inverse:\tasinh(x)";
$HyperbolicArcsineArcsinh = "Arcsinus hyperbolique:\t\tarcsinh(x)";
$InverseSineAsin = "Sinus inverse:\t\t\tasin(x)";
$ArcsineArcsin = "Arcsinus:\t\t\tarcsin(x)";
$HyperbolicSineSinh = "Sinus hyperbolique:\tsinh(x)";
$SineSin = "Sinus:\t\t\t\tsin(x)";
$PiNumberPi = "Nombre Pi:\t\t\tpi";
$ENumberE = "Nombre e:\t\t\te";
$LogarithmLog = "Logarithme:\t\t\tlog(x)";
$NaturalLogarithmLn = "Logarithme naturel:\t\tln(x)";
$AbsoluteValueAbs = "Valeur absolue:\t\t\tabs(x)";
$SquareRootSqrt = "Racine carrée:\t\t\tsqrt(x)";
$ExponentiationCircumflex = "Exponentiation:\t\t\t^";
$DivisionSlash = "Division:\t\t\t/";
$MultiplicationStar = "Multiplication:\t\t\t*";
$SubstractionMinus = "Soustraction:\t\t\t-";
$SummationPlus = "Somme:\t\t\t\t+";
$NotationList = "Syntaxe de formules";
$SubscribeToSessionRequest = "Requête d'inscription à une session";
$PleaseSubscribeMeToSession = "Merci de bien vouloir considérer mon inscription à la session";
$SearchActiveSessions = "Recherche sessions actives";
$UserNameHasDash = "Le nom d'utilisateur ne peut pas contenir de tirets (-)";
$IfYouWantOnlyIntegerValuesWriteBothLimitsWithoutDecimals = "Si vous souhaitez seulement des nombres entiers, indiquez les deux limites sans décimales";

@ -2,6 +2,7 @@
/*
for more information: see languages.txt in the lang folder.
*/
$QuestionEditionNotAvailableBecauseItIsAlreadyAnsweredHoweverYouCanCopyItAndModifyTheCopy = "No puede editar la pregunta porque alguien ya la respondió. Sin embargo, puede copiarla y modificar dicha copia.";
$SelectADateOnTheCalendar = "Seleccione una fecha del calendario";
$AreYouSureDeleteTestResultBeforeDateD = "¿Está seguro que desea eliminar los resultados de este ejercicio antes de la fecha seleccionada?";
$CleanStudentsResultsBeforeDate = "Eliminar todos los resultados antes de la fecha selecionada";

@ -2,6 +2,7 @@
/*
for more information: see languages.txt in the lang folder.
*/
$AssignedCourses = "Cursos asignados";
$SleepingStudents = "Alumnos inactivos desde unos días";
$SleepingTeachers = "Docentes inactivos desde algunos días";
$InactiveUsers = "Usuarios desactivados";

@ -2,6 +2,40 @@
/*
for more information: see languages.txt in the lang folder.
*/
$ActivateAudioRecorder = "Activar la grabación de voz";
$StartSpeaking = "Hable ahora";
$InverseHyperbolicTangentAtanh = "Tangente hiperbólica inversa:\tatanh(x)";
$HyperbolicArctangentArctanh = "Arcotangente hiperbólica:\tarctanh(x)";
$InverseTangentAtan = "Tangente inversa:\t\tatan(x)";
$ArctangentArctan = "Arcotangente:\t\t\tarctan(x)";
$HyperbolicTangentTanh = "Tangente hiperbólica:\t\ttanh(x)";
$TangentTan = "Tangente:\t\t\ttan(x)";
$InverseHyperbolicCosineAcosh = "Coseno hiperbólico inverso:\tacosh(x)";
$HyperbolicArccosineArccosh = "Arcocoseno hiperbólico:\t\tarccosh(x)";
$InverseCosineAcos = "Coseno inverso:\t\t\tacos(x)";
$ArccosineArccos = "Arcocoseno:\t\t\tarccos(x)";
$HyperbolicCosineCosh = "Coseno hiperbólico:\t\tcosh(x)";
$CosineCos = "Coseno:\t\t\t\tcos(x)";
$InverseHyperbolicSineAsinh = "Seno hiperbólico inverso:\tasinh(x)";
$HyperbolicArcsineArcsinh = "Arcoseno hiperbólico:\t\tarcsinh(x)";
$InverseSineAsin = "Seno inverso:\t\t\tasin(x)";
$ArcsineArcsin = "Arcoseno:\t\t\tarcsin(x)";
$HyperbolicSineSinh = "Seno hiperbólico:\t\tsinh(x)";
$SineSin = "Seno:\t\t\t\tsin(x)";
$PiNumberPi = "Número pi:\t\t\tpi";
$ENumberE = "Número e:\t\t\te";
$LogarithmLog = "Logaritmo:\t\t\tlog(x)";
$NaturalLogarithmLn = "Logaritmo natural:\t\tln(x)";
$AbsoluteValueAbs = "Valor absoluto:\t\t\tabs(x)";
$SquareRootSqrt = "Raíz cuadrada:\t\t\tsqrt(x)";
$ExponentiationCircumflex = "Potencia:\t\t\t^";
$DivisionSlash = "División:\t\t\t/";
$MultiplicationStar = "Multiplicación:\t\t\t*";
$SubstractionMinus = "Resta:\t\t\t\t-";
$SummationPlus = "Suma:\t\t\t\t+";
$NotationList = "Notación para fórmula";
$SubscribeToSessionRequest = "Solicitud de inscripción a una sesión";
$PleaseSubscribeMeToSession = "Por favor suscribirme a la sesión";
$SearchActiveSessions = "Buscar sesiones activas";
$UserNameHasDash = "El nombre de usuario no puede contener el caracter '-'";
$IfYouWantOnlyIntegerValuesWriteBothLimitsWithoutDecimals = "Si desea sólo números enteros escriba ambos límites sin decimales";
@ -9,7 +43,7 @@ $GiveAnswerVariations = "Por favor, escriba cuántos problemas desea generar";
$AnswerVariations = "Problemas a generar";
$GiveFormula = "Por favor, escriba la fórmula";
$Formula = "Fórmula";
$FormulaExample = "Ejemplo de fórmula";
$FormulaExample = "Ejemplo de fórmula: sqrt( [x] / [y] ) * ( e ^ ( ln(pi) ) )";
$VariableRanges = "Rangos de las variables";
$ExampleValue = "Valor del rango";
$CalculatedAnswer = "Pregunta calculada";
@ -1545,7 +1579,7 @@ $HottestCourses = "Cursos más populares";
$SentAtX = "Enviado el: %s";
$dateTimeFormatShort = "%d %b %Y a las %I:%M %p";
$dateTimeFormatShortTimeFirst = "%I:%M %p, %d %b %Y";
$LoginToVote = "Para votar hay que estar indentificado";
$LoginToVote = "Debe estar conectado para poder votar";
$DoNotShow = "No mostrar";
$ShowToAdminsOnly = "Mostrar solo a los administradores";
$ShowToAdminsAndTeachers = "Mostrar a los administradores y profesores";
@ -1646,4 +1680,4 @@ $DataTableSearch = "Buscar";
$HideColumn = "Ocultar columna";
$DisplayColumn = "Mostrar columna";
$LegalAgreementAccepted = "Condiciones legales aceptadas";
?>
?>

@ -159,7 +159,7 @@ $GroupInvitationWasDeny = "Invitación de grupo fue rechazada";
$UserIsSubscribedToThisGroup = "Ahora ya forma parte del grupo";
$DeleteFromGroup = "Dar de baja en el grupo";
$GroupMembers = "Miembros del grupo";
$Subscribe = "Quiero formar parte de este grupo";
$Subscribe = "Inscribirme";
$YouAreInvitedToGroupContent = "Queda invitado/a a acceder al contenido del grupo";
$YouAreInvitedToGroup = "Invitación para unirse al grupo";
$ToSubscribeClickInTheLinkBelow = "Para unirse haga clic en el siguiente enlace";

@ -439,6 +439,7 @@ if ($is_allowed_to_edit) {
<!-- right zone -->
<div id="learning_path_right_zone" style="margin-left:<?php echo $margin_left;?>;height:100%">
<?php
$src = !empty($src) ? str_replace('&amp;', '&', $src) : '';
// hub 26-05-2010 Fullscreen or not fullscreen
$height = '100%';
if ($_SESSION['oLP']->mode == 'fullscreen') {

@ -94,7 +94,9 @@ if (is_array($_GET) && count($_GET)>0) {
$social_avatar_block = SocialManager::show_social_avatar_block('invitations');
$social_menu_block = SocialManager::show_social_menu('invitations');
$social_right_content = '<div id="id_response" align="center"></div>';
$social_right_content = '<div class="span9">
<div id="id_response" align="center"></div>
</div></div>';
$user_id = api_get_user_id();
$list_get_invitation = SocialManager::get_list_invitation_of_friends_by_user_id($user_id);
@ -105,15 +107,15 @@ $number_loop = count($list_get_invitation);
$total_invitations = $number_loop + count($list_get_invitation_sent) + count($pending_invitations);
if ($total_invitations == 0 && count($_GET) <= 0) {
$social_right_content .= '<div class="span8"><a class="btn" href="search.php">'.get_lang('TryAndFindSomeFriends').'</a></div>';
$social_right_content .= '<div class="row"><div class="span9"><a class="btn" href="search.php">'.get_lang('TryAndFindSomeFriends').'</a></div></div>';
}
if ($number_loop != 0) {
$social_right_content .= '<div class="span8">'.Display::page_subheader(get_lang('InvitationReceived')).'</div>';
$social_right_content .= '<div class="row"><div class="span9">'.Display::page_subheader(get_lang('InvitationReceived')).'</div></div>';
foreach ($list_get_invitation as $invitation) {
$sender_user_id = $invitation['user_sender_id'];
$social_right_content .= '<div id="id_'.$sender_user_id.'" class="invitation_confirm span8">';
$social_right_content .= '<div id="id_'.$sender_user_id.'" class="row invitation-clear">';
$picture = UserManager::get_user_picture_path_by_id($sender_user_id, 'web', false, true);
$friends_profile = SocialManager::get_picture_user($sender_user_id, $picture['file'], 92);
@ -123,20 +125,20 @@ if ($number_loop != 0) {
$date = api_convert_and_format_date($invitation['send_date'], DATE_TIME_FORMAT_LONG);
$social_right_content .= '<div class="span2">
<a class="thumbnail" href="profile.php?u='.$sender_user_id.'">
<img src="'.$friends_profile['file'].'" /></a>
</div>
<div class="span3">
<a href="profile.php?u='.$sender_user_id.'">'.api_get_person_name($user_info['firstName'], $user_info['lastName']).'</a> :
'.$content.'
<div>
<a class="thumbnail" href="profile.php?u='.$sender_user_id.'">
<img src="'.$friends_profile['file'].'" /></a></div>
<div class="span7"><div class="title-profile">
<a href="profile.php?u='.$sender_user_id.'">
'.api_get_person_name($user_info['firstName'], $user_info['lastName']).'</a>:
</div><div class="content-invitation">'.$content.'</div><div class="alert date-invitation">
'.get_lang('DateSend').' : '.$date.'
</div>
<div class="buttons">
<button class="save" name="btn_accepted" type="submit" id="btn_accepted_'.$sender_user_id.'" value="'.get_lang('Accept').' "onclick="javascript:register_friend(this)">
'.get_lang('Accept').'</button>
<button class="cancel" name="btn_denied" type="submit" id="btn_deniedst_'.$sender_user_id.' " value="'.get_lang('Deny').' " onclick="javascript:denied_friend(this)" >
'.get_lang('Deny').'</button>
<button class="btn btn-success" name="btn_accepted" type="submit" id="btn_accepted_'.$sender_user_id.'" value="'.get_lang('Accept').' "onclick="javascript:register_friend(this)">
'.get_lang('AcceptInvitation').'</button>
<button class="btn btn-danger" name="btn_denied" type="submit" id="btn_deniedst_'.$sender_user_id.' " value="'.get_lang('Deny').' " onclick="javascript:denied_friend(this)" >
'.get_lang('DenyInvitation').'</button>
</div>
</div>
</div>';
@ -144,11 +146,11 @@ if ($number_loop != 0) {
}
if (count($list_get_invitation_sent) > 0) {
$social_right_content .= '<div class="span8">'.Display::page_subheader(get_lang('InvitationSent')).'</div>';
$social_right_content .= '<div class="row"><div class="span9">'.Display::page_subheader(get_lang('InvitationSent')).'</div></div>';
foreach ($list_get_invitation_sent as $invitation) {
$sender_user_id = $invitation['user_receiver_id'];
$social_right_content .= '<div id="id_'.$sender_user_id.'" class="invitation_confirm span8">';
$social_right_content .= '<div id="id_'.$sender_user_id.'" class="row invitation-clear">';
$picture = UserManager::get_user_picture_path_by_id($sender_user_id, 'web', false, true);
$friends_profile = SocialManager::get_picture_user($sender_user_id, $picture['file'], 92);
@ -162,7 +164,7 @@ if (count($list_get_invitation_sent) > 0) {
<a class="thumbnail" href="profile.php?u='.$sender_user_id.'">
<img src="'.$friends_profile['file'].'" /></a>
</div>
<div class="span3">
<div class="span7">
<a class="profile_link" href="profile.php?u='.$sender_user_id.'">'.api_get_person_name($user_info['firstName'], $user_info['lastName']).'</a>
<div>
'. $title.' : '.$content.'
@ -176,21 +178,28 @@ if (count($list_get_invitation_sent) > 0) {
}
if (count($pending_invitations) > 0) {
$social_right_content .= Display::page_subheader(get_lang('GroupsWaitingApproval'));
$social_right_content .= '<div class="row"><div class="span9">'.Display::page_subheader(get_lang('GroupsWaitingApproval')).'</div></div>';
$new_invitation = array();
foreach ($pending_invitations as $invitation) {
$picture = GroupPortalManager::get_picture_group($invitation['id'], $invitation['picture_uri'],80);
$img = '<img class="social-groups-image" src="'.$picture['file'].'" hspace="4" height="50" border="2" align="left" width="50" />';
$img = '<img class="social-groups-image" src="'.$picture['file'].'" />';
$invitation['picture_uri'] = '<a href="groups.php?id='.$invitation['id'].'">'.$img.'</a>';
$invitation['name'] = '<a href="groups.php?id='.$invitation['id'].'">'.cut($invitation['name'],120,true).'</a>';
$invitation['join'] = '<a href="invitations.php?accept='.$invitation['id'].'">'.
Display::return_icon('accept_invitation.png', get_lang('AcceptInvitation')).'&nbsp;&nbsp;'.get_lang('AcceptInvitation').'</a>';
$invitation['deny'] = '<a href="invitations.php?deny='.$invitation['id'].'">'.
Display::return_icon('denied_invitation.png', get_lang('DenyInvitation')).'&nbsp;&nbsp;'.get_lang('DenyInvitation').'</a>';
$invitation['name'] = '<div class="title-group"><a href="groups.php?id='.$invitation['id'].'">'.cut($invitation['name'],120,true).'</a></div>';
$invitation['join'] = '<a class="btn btn-success" href="invitations.php?accept='.$invitation['id'].'">'.get_lang('AcceptInvitation').'</a>';
$invitation['deny'] = '<a class="btn btn-danger" href="invitations.php?deny='.$invitation['id'].'">'.get_lang('DenyInvitation').'</a>';
$invitation['description'] = cut($invitation['description'],220,true);
$new_invitation[]=$invitation;
$social_right_content .= '<div class="row invitation-clear">
<div class="span2"><div class="thumbnail">'.$invitation['picture_uri'].'</div></div>
<div class="span7">'
.$invitation['name'].'<div class="description-group">'.$invitation['description'].'</div>
<div class="buttons">'.$invitation['join'].' '.$invitation['deny'].'</div>
</div>
</div>
';
}
$social_right_content .= Display::return_sortable_grid(
/*$social_right_content .= Display::return_sortable_grid(
'waiting_user',
array(),
$new_invitation,
@ -198,7 +207,7 @@ if (count($pending_invitations) > 0) {
array(),
false,
array(true, true, true, false, false, true, true, true, true)
);
);*/
}
$tpl = new Template(null);

@ -59,16 +59,17 @@
&nbsp;
</div>
<div id="header_right" class="span5">
<ul id="notifications" class="nav nav-pills pull-right">
{{ notification_menu }}
</ul>
{# plugin_header right #}
{% if plugin_header_right is not null %}
<div id="plugin_header_right">
{{ plugin_header_right }}
</div>
<div id="plugin_header_right">
{{ plugin_header_right }}
</div>
{% endif %}
&nbsp;
<div class="section-notifications">
<ul id="notifications" class="nav nav-pills pull-right">
{{ notification_menu }}
</ul>
</div>
</div>
</div>
{% if plugin_header_main %}

@ -10,8 +10,13 @@
</div>
<div class="span9">
<div class="row">
<span id="message_ajax_reponse" class="span9"></span>
<div class="span9">
<div id="message_ajax_reponse" class=""></div>
</div>
</div>
<div class="row">
{{ social_right_content}}
</div>
<div id="display_response_id" class="span9"></div>
</div>
</div>

@ -10,10 +10,6 @@
"elementSelector": ".navbar",
"message": "TheNavbarStep"
},
{
"elementSelector": "div.span3:nth-child(1)",
"message": "TheRightPanelStep"
},
{
"elementSelector": "#user_image_block",
"message": "TheUserImageBlock"
@ -118,4 +114,4 @@
}
]
}
]
]

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

After

Width:  |  Height:  |  Size: 264 KiB

File diff suppressed because it is too large Load Diff

After

Width:  |  Height:  |  Size: 278 KiB

File diff suppressed because it is too large Load Diff

After

Width:  |  Height:  |  Size: 261 KiB

File diff suppressed because it is too large Load Diff

After

Width:  |  Height:  |  Size: 260 KiB

File diff suppressed because it is too large Load Diff

After

Width:  |  Height:  |  Size: 261 KiB

File diff suppressed because it is too large Load Diff

After

Width:  |  Height:  |  Size: 262 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

@ -44,8 +44,8 @@
});
$btnStart = $('<button>', {
class: 'btn btn-primary btn-large',
text: '{{ 'StartButtonText' | get_lang }}',
class: 'tour-warning',
html: '<img src="{{ _p.web }}/plugin/tour/resources/tour-chamilo.png">{{ 'StartButtonText' | get_lang }}',
click: function(e) {
e.preventDefault();

@ -0,0 +1,79 @@
<?php
/* For licensing terms, see /license.txt */
/**
* Controller for REST request
* @author Angel Fernando Quiroz Campos <angel.quiroz@beeznest.com>
* @package chamilo.plugin.tour
*/
/* Require libs and classes */
require_once '../main/inc/global.inc.php';
/* Manage actions */
$json = array();
$action = isset($_REQUEST['action']) ? $_REQUEST['action'] : 'nothing';
$username = isset($_POST['username']) ? Security::remove_XSS($_POST['username']) : null;
$apiKey = isset($_POST['api_key']) ? Security::remove_XSS($_POST['api_key']) : null;
switch ($action) {
case 'loginNewMessages':
$password = isset($_POST['password']) ? Security::remove_XSS($_POST['password']) : null;
if (MessagesWebService::isValidUser($username, $password)) {
$webService = new MessagesWebService();
$apiKey = $webService->getApiKey($username);
$json = array(
'status' => true,
'apiKey' => $apiKey
);
} else {
$json = array(
'status' => false
);
}
break;
case 'countNewMessages':
if (MessagesWebService::isValidApiKey($username, $apiKey)) {
$webService = new MessagesWebService();
$webService->setApiKey($apiKey);
$lastId = isset($_POST['last']) ? $_POST['last'] : 0;
$count = $webService->countNewMessages($username, $lastId);
$json = array(
'status' => true,
'count' => $count
);
} else {
$json = array(
'status' => false
);
}
break;
case 'getNewMessages':
if (MessagesWebService::isValidApiKey($username, $apiKey)) {
$webService = new MessagesWebService();
$webService->setApiKey($apiKey);
$lastId = isset($_POST['last']) ? $_POST['last'] : 0;
$messages = $webService->getNewMessages($username, $lastId);
$json = array(
'status' => true,
'messages' => $messages
);
} else {
$json = array(
'status' => false
);
}
break;
default:
}
/* View */
echo json_encode($json);
Loading…
Cancel
Save