Эх сурвалжийг харах

Merge branch 'ofaj' of github.com:chamilo/chamilo-lms into ofaj

jmontoyaa 8 жил өмнө
parent
commit
5d30bea536

+ 31 - 3
app/Resources/public/css/themes/rainbow/default.css

@@ -33,6 +33,34 @@ a:focus {
     margin-bottom: 30px;
     margin-top: 10px;
 }
+.home-information{
+    margin-top: 20px;
+    padding-top: 20px;
+    margin-bottom: 20px;
+    padding-bottom: 20px;
+}
+.home-information .title{
+    position: static;
+    font-size: 16px;
+    margin-top: 20px;
+    margin-bottom: 12px;
+    font-weight: bold;
+    color: #07578A;
+}
+.home-information .item-icon{
+    text-align: center;
+}
+.home-information .item-icon .circle .fa{
+    color: #FFF;
+}
+.home-information .item-icon .circle{
+    width: 75px;
+    height: 75px;
+    line-height: 90px;
+    border-radius: 50%;
+    background: #162A83;
+    display: inline-block;
+}
 .title{
     position: static;
     font-size: 25px;
@@ -186,7 +214,7 @@ a:focus {
     color: #96BD0D;
 }
 .statistics .number{
-    color: #E2007A;
+    color: #96BD0D;
     font-weight: 700;
 }
 .statistics .text{
@@ -387,7 +415,7 @@ a:focus {
 }
 /* End Jquery UI */
 footer{
-  background-color:#009EE0;
+  background-color:#162A83;
 }
 footer{
   color: #ffffff;
@@ -442,4 +470,4 @@ legend{
 
 /* .red_underline {
    color: red;
-} */
+} */

+ 10 - 1
app/Resources/public/css/themes/rainbow/learnpath.css

@@ -4,6 +4,15 @@
 #learning_path_breadcrumb_zone .breadcrumb a{
     color: #000;
 }
+.scorm_item_level_1{
+ padding: 0 2.5em 0 1.5em;   
+}
+.scorm_item_level_0{
+ padding: 0 2.5em 0 0; 
+}
+.scorm_item_level_2{
+ padding: 0 2.5em 0 3em;   
+}
 .expand .fa{
     background-color: #96BD0D;
 }
@@ -248,4 +257,4 @@ table.lp_overview img {
 }
 .scorm_type_quiz{
     background: url('images/pencil.png') no-repeat right 0;
-}
+}

+ 11 - 8
main/auth/sso/sso.TCC.class.php

@@ -96,9 +96,10 @@ class ssoTCC
         $loginFailed = false;
 
         //change the way we recover the cookie depending on how it is formed
-        $sso = $this->decode_cookie($_GET['sso_cookie']);
+        $sso = $this->decode_cookie($_REQUEST['sso_cookie']);
 
         $value = explode(';;', $sso);
+        $ssoSecret = substr($value[1], 0, 5);
         $value = $value[0];
 
         $userExtraFieldValue = new ExtraFieldValue('user');
@@ -108,7 +109,7 @@ class ssoTCC
         );
 
         if ($userData) {
-            $userId = $userData['value'];
+            $userId = $userData['item_id'];
         } else {
             return false;
         }
@@ -131,9 +132,9 @@ class ssoTCC
             $uData = Database::fetch_array($result);
             //Check the user's password
             if ($uData['auth_source'] == PLATFORM_AUTH_SOURCE) {
-                if ($sso['secret'] === sha1($uData['username'].$sso_challenge.api_get_security_key())&&
-                    ($sso['username'] == $uData['username'])
-                ) {
+                $secret = substr(api_get_security_key(), 0, 5);
+                // Check if secret sent in sso is correct
+                if ((string) $ssoSecret == (string) $secret)  {
                     //Check if the account is active (not locked)
                     if ($uData['active']=='1') {
                         // check if the expiration date has not been reached
@@ -236,7 +237,7 @@ class ssoTCC
                         exit;
                     }
                 } else {
-                    //SHA1 of password is wrong
+                    //Secret sent through SSO is incorrect
                     $loginFailed = true;
                     Session::erase('_uid');
                     header('Location: '.api_get_path(WEB_PATH).'index.php?loginFailed=1&error=wrong_password');
@@ -271,7 +272,7 @@ class ssoTCC
     {
         $key = substr(api_get_security_key(), 0, 16);
         $ivsize = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_ECB);
-        $iv = mcrypt_create_iv($ivsize);
+        $iv = mcrypt_create_iv($ivsize, MCRYPT_RAND);
         $valuedecode = base64_decode($value);
 
         return mcrypt_decrypt(
@@ -310,7 +311,7 @@ class ssoTCC
         }
         // If the user doesn't match a Drupal user, give the normal profile
         // link
-        if ($drupalUserIdData === false) {
+/*        if ($drupalUserIdData === false) {
             return api_get_path(WEB_CODE_PATH) . 'auth/profile.php';
         }
         // In all other cases, generate a link to the Drupal profile edition
@@ -318,6 +319,8 @@ class ssoTCC
         $url = "{$this->protocol}{$this->domain}/user/{$drupalUserId}/edit";
 
         return $url;
+*/
+        return api_get_path(WEB_CODE_PATH) . 'auth/profile.php';
     }
 
 }

+ 0 - 1
main/inc/lib/certificate.lib.php

@@ -250,7 +250,6 @@ class Certificate extends Model
                         }
                     }
                 }
-            }
         } else {
             // General certificate
 

+ 3 - 3
main/inc/local.inc.php

@@ -611,13 +611,13 @@ if (!empty($_SESSION['_user']['user_id']) && !($login || $logout)) {
             if ($redirectToMasterConditions) {
                 // Redirect to master server
                 $osso->ask_master();
-            } elseif (isset($_GET['sso_cookie'])) {
+            } elseif (isset($_REQUEST['sso_cookie'])) {
 
                 // Here we are going to check the origin of
                 // what the call says should be used for
                 // authentication, and ensure  we know it
                 $matches_domain = false;
-                if (isset($_GET['sso_referer'])) {
+                if (isset($_REQUEST['sso_referer'])) {
                     $protocol = api_get_setting('sso_authentication_protocol');
 
                     // sso_authentication_domain can list
@@ -633,7 +633,7 @@ if (!empty($_SESSION['_user']['user_id']) && !($login || $logout)) {
                             //  then skip other possibilities
                             // Do NOT compare the whole referer, as this might cause confusing errors with friendly urls,
                             // like in Drupal /?q=user& vs /user?
-                            $referrer = substr($_GET['sso_referer'], 0, strrpos($_GET['sso_referer'], '/'));
+                            $referrer = substr($_REQUEST['sso_referer'], 0, strrpos($_REQUEST['sso_referer'], '/'));
                             if ($protocol.trim($mu) === $referrer) {
                                 $matches_domain = true;
                                 break;

+ 2 - 2
main/template/rainbow/layout/header.js.tpl

@@ -194,12 +194,12 @@ $(document).ready(function(){
         return false;
     });
 
-    // old jquery.menu.js
+   // old jquery.menu.js
     $('#navigation a').stop().animate({
         'marginLeft':'50px'
     },1000);
 
-    $('#navigation > li').hover(
+    $('#navigation div').hover(
         function () {
             $('a',$(this)).stop().animate({
                 'marginLeft':'1px'

+ 57 - 1
main/template/rainbow/layout/layout_2_col.tpl

@@ -32,7 +32,63 @@
                 {{ home_page_block }}
             </section>
             {% endif %}
-
+            <div class="home-information">
+                <div class="row">
+                    <div class="col-md-3">
+                        <div class="item-icon">
+                            <span class="circle">
+                                <i class="fa fa-question-circle fa-3x" aria-hidden="true"></i>
+                            </span> 
+                        </div>
+                        <h4 class="title">Objectifs de la plate-forme</h4>
+                        <p>
+                            Lorem ipsum dolor sit amet, consectetur adipiscing elit,
+                            sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
+                            Ut enim ad minim veniam.
+                        </p> 
+                    </div>
+                    <div class="col-md-3">
+                        <div class="item-icon">
+                            <span class="circle">
+                                <i class="fa fa-users fa-3x" aria-hidden="true"></i>
+                            </span>
+                        </div>
+                        <h4 class="title">Public cible</h4>
+                        <p>
+                            Lorem ipsum dolor sit amet, consectetur adipiscing elit,
+                            sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
+                            Ut enim ad minim veniam.
+                            
+                        </p> 
+                    </div>
+                    <div class="col-md-3">
+                        <div class="item-icon">
+                            <span class="circle">
+                                <i class="fa fa-graduation-cap fa-3x" aria-hidden="true"></i>
+                            </span>
+                        </div>
+                        <h4 class="title">Praxes: informations sur le programme</h4>
+                        <p>
+                            Lorem ipsum dolor sit amet, consectetur adipiscing elit,
+                            sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
+                            Ut enim ad minim veniam.
+                        </p> 
+                    </div>
+                    <div class="col-md-3">
+                        <div class="item-icon">
+                            <span class="circle">
+                                <i class="fa fa-university fa-3x" aria-hidden="true"></i>
+                            </span>
+                        </div>
+                        <h4 class="title">Conditions de participation</h4>
+                        <p>
+                            Lorem ipsum dolor sit amet, consectetur adipiscing elit,
+                            sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
+                            Ut enim ad minim veniam.
+                        </p> 
+                    </div>
+                </div>
+            </div>
             <!-- block statistics -->
             <div class="statistics">
                 <div class="row">

+ 3 - 5
main/template/rainbow/layout/main_header.tpl

@@ -38,12 +38,10 @@
 {% if show_header == true %}
 
 <div id="page-wrap"><!-- page section -->
-    {% block help_notifications %}
-    <ul id="navigation" class="notification-panel">
+    <div id="navigation" class="notification-panel">
         {{ help_content }}
-        {{ bug_notification_link }}
-    </ul>
-    {% endblock %}
+        {{ bug_notification }}
+    </div>
     {% block topbar %}
         {% include template ~ "/layout/topbar.tpl" %}
         {% if show_toolbar == 1 %}

+ 0 - 1
main/template/rainbow/layout/show_header.tpl

@@ -1,5 +1,4 @@
 {% include template ~ "/layout/main_header.tpl" %}
-
 {% if show_header == true %}
     {% if plugin_content_top is not null %}
         <div id="plugin_content_top" class="col-md-12">

+ 3 - 0
src/Chamilo/CoreBundle/Resources/translations/messages.de.po

@@ -36,3 +36,6 @@ msgstr "Registrierung"
 
 msgid "My certificates"
 msgstr "Meine Zertifikate"
+
+msgid "Latest blocks"
+msgstr "Neueste Blöcke"

+ 2 - 0
src/Chamilo/CoreBundle/Resources/translations/messages.fr.po

@@ -34,3 +34,5 @@ msgstr "Inscription"
 msgid "My certificates"
 msgstr "Mes certificats"
 
+msgid "Latest blocks"
+msgstr "Derniers blocks"