Pārlūkot izejas kodu

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

Angel Fernando Quiroz Campos 7 gadi atpakaļ
vecāks
revīzija
1c70fcf197

+ 3 - 3
app/Migrations/Schema/V111/Version20160907140300.php

@@ -19,6 +19,7 @@ class Version20160907140300 extends AbstractMigrationChamilo
      */
     public function up(Schema $schema)
     {
+        error_log('Version20160907140300');
         $data = [
             'career' => [
                 'created_at',
@@ -213,6 +214,7 @@ class Version20160907140300 extends AbstractMigrationChamilo
         // to NULL, then change the field back to DATETIME
         foreach ($data as $table => $fields) {
             foreach ($fields as $field) {
+                error_log("$table . $field");
                 $this->addSql("ALTER TABLE $table CHANGE $field $field char(19)");
                 $this->addSql("UPDATE $table SET $field = NULL WHERE $field = '0000-00-00 00:00:00'");
                 $this->addSql("UPDATE $table SET $field = NULL WHERE $field = '0000-00-00 23:59:59'");
@@ -227,17 +229,15 @@ class Version20160907140300 extends AbstractMigrationChamilo
         ];
         foreach ($data as $table => $fields) {
             foreach ($fields as $field) {
+                error_log("$table . $field");
                 $this->addSql("ALTER TABLE $table CHANGE $field $field char(10)");
                 $this->addSql("UPDATE $table SET $field = NULL WHERE $field = '0000-00-00'");
                 $this->addSql("ALTER TABLE $table CHANGE $field $field DATE");
             }
         }
-
-
     }
 
     public function down(Schema $schema)
     {
-
     }
 }

+ 4 - 2
app/Migrations/Schema/V111/Version20160907150300.php

@@ -188,12 +188,14 @@ class Version20160907150300 extends AbstractMigrationChamilo
      */
     public function up(Schema $schema)
     {
+        error_log('Version20160907150300');
         foreach ($this->names as $name) {
             if (!$schema->hasTable($name)) {
                 continue;
             }
-
-            $this->addSql("ALTER TABLE $name ENGINE=InnoDB");
+            $sql = "ALTER TABLE $name ENGINE=InnoDB";
+            $this->addSql($sql);
+            error_log($sql);
         }
     }
 

+ 239 - 180
app/Resources/public/css/base.css

@@ -6857,213 +6857,272 @@ input.form-control[type="color"] {
 }
 
 /* CSS FormValidator loader */
-.cssload-loader-walk {
-    width: 97px;
-    height: 39px;
-    position: absolute;
-    left: 50%;
-    top: 100px;
-    transform: translate(-50%, -50%);
-    -o-transform: translate(-50%, -50%);
-    -ms-transform: translate(-50%, -50%);
-    -webkit-transform: translate(-50%, -50%);
-    -moz-transform: translate(-50%, -50%);
-}
-.cssload-loader-walk > div {
-    content: "";
-    width: 19px;
-    height: 19px;
-    background: rgb(51,121,183);
-    border-radius: 100%;
-    position: absolute;
-    animation: cssload-animate 2.3s linear infinite;
-    -o-animation: cssload-animate 2.3s linear infinite;
-    -ms-animation: cssload-animate 2.3s linear infinite;
-    -webkit-animation: cssload-animate 2.3s linear infinite;
-    -moz-animation: cssload-animate 2.3s linear infinite;
-}
-.cssload-loader-walk > div:nth-of-type(1) {
-    animation-delay: -0.46s;
-    -o-animation-delay: -0.46s;
-    -ms-animation-delay: -0.46s;
-    -webkit-animation-delay: -0.46s;
-    -moz-animation-delay: -0.46s;
-}
-.cssload-loader-walk > div:nth-of-type(2) {
-    animation-delay: -0.92s;
-    -o-animation-delay: -0.92s;
-    -ms-animation-delay: -0.92s;
-    -webkit-animation-delay: -0.92s;
-    -moz-animation-delay: -0.92s;
-}
-.cssload-loader-walk > div:nth-of-type(3) {
-    animation-delay: -1.38s;
-    -o-animation-delay: -1.38s;
-    -ms-animation-delay: -1.38s;
-    -webkit-animation-delay: -1.38s;
-    -moz-animation-delay: -1.38s;
-}
-.cssload-loader-walk > div:nth-of-type(4) {
-    animation-delay: -1.84s;
-    -o-animation-delay: -1.84s;
-    -ms-animation-delay: -1.84s;
-    -webkit-animation-delay: -1.84s;
-    -moz-animation-delay: -1.84s;
-}
-
-
-
-@keyframes cssload-animate {
+@-moz-keyframes wobblebar-loader {
     0% {
-        left: 97px;
-        top: 0;
+        left: 4px;
     }
-    80% {
-        left: 0;
-        top: 0;
+    3% {
+        left: 204px;
     }
-    85% {
-        left: 0;
-        top: -19px;
-        width: 19px;
-        height: 19px;
+    6% {
+        left: 4px;
     }
-    90% {
-        width: 39px;
-        height: 15px;
+    9% {
+        left: 204px;
     }
-    95% {
-        left: 97px;
-        top: -19px;
-        width: 19px;
-        height: 19px;
+    12% {
+        left: 4px;
     }
-    100% {
-        left: 97px;
-        top: 0;
+    15% {
+        left: 204px;
     }
-}
-
-@-o-keyframes cssload-animate {
-    0% {
-        left: 97px;
-        top: 0;
+    18% {
+        left: 32px;
+    }
+    27% {
+        left: 32px;
+    }
+    30% {
+        left: 204px;
+    }
+    33% {
+        left: 4px;
+    }
+    36% {
+        left: 204px;
     }
-    80% {
-        left: 0;
-        top: 0;
+    39% {
+        left: 4px;
+    }
+    42% {
+        left: 204px;
+    }
+    45% {
+        left: 4px;
+    }
+    48% {
+        left: 204px;
+    }
+    51% {
+        left: 152px;
+    }
+    63% {
+        left: 152px;
+    }
+    66% {
+        left: 4px;
+    }
+    69% {
+        left: 204px;
+    }
+    72% {
+        left: 4px;
+    }
+    75% {
+        left: 204px;
+    }
+    78% {
+        left: 4px;
     }
-    85% {
-        left: 0;
-        top: -19px;
-        width: 19px;
-        height: 19px;
+    81% {
+        left: 204px;
     }
-    90% {
-        width: 39px;
-        height: 15px;
+    84% {
+        left: 72px;
     }
-    95% {
-        left: 97px;
-        top: -19px;
-        width: 19px;
-        height: 19px;
+    94% {
+        left: 72px;
     }
-    100% {
-        left: 97px;
-        top: 0;
+    97% {
+        left: 204px;
     }
 }
-
-@-ms-keyframes cssload-animate {
+@-webkit-keyframes wobblebar-loader {
     0% {
-        left: 97px;
-        top: 0;
+        left: 4px;
+    }
+    3% {
+        left: 204px;
+    }
+    6% {
+        left: 4px;
+    }
+    9% {
+        left: 204px;
+    }
+    12% {
+        left: 4px;
+    }
+    15% {
+        left: 204px;
+    }
+    18% {
+        left: 32px;
+    }
+    27% {
+        left: 32px;
+    }
+    30% {
+        left: 204px;
+    }
+    33% {
+        left: 4px;
+    }
+    36% {
+        left: 204px;
+    }
+    39% {
+        left: 4px;
+    }
+    42% {
+        left: 204px;
+    }
+    45% {
+        left: 4px;
+    }
+    48% {
+        left: 204px;
+    }
+    51% {
+        left: 152px;
+    }
+    63% {
+        left: 152px;
+    }
+    66% {
+        left: 4px;
+    }
+    69% {
+        left: 204px;
     }
-    80% {
-        left: 0;
-        top: 0;
+    72% {
+        left: 4px;
     }
-    85% {
-        left: 0;
-        top: -19px;
-        width: 19px;
-        height: 19px;
+    75% {
+        left: 204px;
     }
-    90% {
-        width: 39px;
-        height: 15px;
+    78% {
+        left: 4px;
     }
-    95% {
-        left: 97px;
-        top: -19px;
-        width: 19px;
-        height: 19px;
+    81% {
+        left: 204px;
     }
-    100% {
-        left: 97px;
-        top: 0;
+    84% {
+        left: 72px;
+    }
+    94% {
+        left: 72px;
+    }
+    97% {
+        left: 204px;
     }
 }
-
-@-webkit-keyframes cssload-animate {
+@keyframes wobblebar-loader {
     0% {
-        left: 97px;
-        top: 0;
+        left: 4px;
+    }
+    3% {
+        left: 204px;
+    }
+    6% {
+        left: 4px;
+    }
+    9% {
+        left: 204px;
+    }
+    12% {
+        left: 4px;
+    }
+    15% {
+        left: 204px;
+    }
+    18% {
+        left: 32px;
+    }
+    27% {
+        left: 32px;
+    }
+    30% {
+        left: 204px;
+    }
+    33% {
+        left: 4px;
+    }
+    36% {
+        left: 204px;
+    }
+    39% {
+        left: 4px;
+    }
+    42% {
+        left: 204px;
+    }
+    45% {
+        left: 4px;
     }
-    80% {
-        left: 0;
-        top: 0;
+    48% {
+        left: 204px;
+    }
+    51% {
+        left: 152px;
+    }
+    63% {
+        left: 152px;
     }
-    85% {
-        left: 0;
-        top: -19px;
-        width: 19px;
-        height: 19px;
+    66% {
+        left: 4px;
     }
-    90% {
-        width: 39px;
-        height: 15px;
+    69% {
+        left: 204px;
     }
-    95% {
-        left: 97px;
-        top: -19px;
-        width: 19px;
-        height: 19px;
+    72% {
+        left: 4px;
     }
-    100% {
-        left: 97px;
-        top: 0;
+    75% {
+        left: 204px;
+    }
+    78% {
+        left: 4px;
+    }
+    81% {
+        left: 204px;
+    }
+    84% {
+        left: 72px;
+    }
+    94% {
+        left: 72px;
+    }
+    97% {
+        left: 204px;
     }
 }
-
-@-moz-keyframes cssload-animate {
-    0% {
-        left: 97px;
-        top: 0;
-    }
-    80% {
-        left: 0;
-        top: 0;
-    }
-    85% {
-        left: 0;
-        top: -19px;
-        width: 19px;
-        height: 19px;
-    }
-    90% {
-        width: 39px;
-        height: 15px;
-    }
-    95% {
-        left: 97px;
-        top: -19px;
-        width: 19px;
-        height: 19px;
-    }
-    100% {
-        left: 97px;
-        top: 0;
-    }
-}
+/* :not(:required) hides this rule from IE9 and below */
+.wobblebar-loader:not(:required) {
+    background: #2E6DA4;
+    -moz-border-radius: 10.66667px;
+    -webkit-border-radius: 10.66667px;
+    border-radius: 10.66667px;
+    display: inline-block;
+    overflow: hidden;
+    text-indent: -9999px;
+    width: 228px;
+    height: 21.33333px;
+    position: relative;
+}
+.wobblebar-loader:not(:required)::after {
+    -moz-animation: wobblebar-loader 15000ms infinite ease;
+    -webkit-animation: wobblebar-loader 15000ms infinite ease;
+    animation: wobblebar-loader 15000ms infinite ease;
+    background: white;
+    display: block;
+    -moz-border-radius: 7.11111px;
+    -webkit-border-radius: 7.11111px;
+    border-radius: 7.11111px;
+    content: '';
+    position: absolute;
+    top: 3.55556px;
+    left: 4px;
+    width: 21.33333px;
+    height: 14.22222px;
+}

+ 1 - 1
main/auth/resend_confirmation_mail.php

@@ -16,7 +16,7 @@ if ($form->validate()) {
     $thisUser = Database::getManager()->getRepository('ChamiloUserBundle:User')->findBy(['username' => $values['user']]);
 
     UserManager::sendUserConfirmationMail($thisUser);
-    Display::addFlash(Display::return_message(get_lang('EmailSend')));
+    Display::addFlash(Display::return_message(get_lang('EmailSent')));
     header('Location: '.api_get_path(WEB_PATH));
     exit;
 }

+ 1 - 3
main/inc/lib/formvalidator/FormValidator.class.php

@@ -1160,9 +1160,7 @@ EOT;
             $returnValue .= '<br />
 
             <div id="loading_div_'.$id.'" class="loading_div" style="display:none;margin-left:40%; margin-top:10px; height:50px;">
-                <div class="cssload-loader-walk">
-                    <div></div><div></div><div></div><div></div><div></div>
-                </div>
+                <div class="wobblebar-loader"></div>
             </div>
             ';
         }

+ 1 - 1
main/inc/lib/template.lib.php

@@ -1404,7 +1404,7 @@ class Template
 
                     if (api_get_setting('allow_registration') === 'confirmation') {
                         $message = sprintf(
-                            get_lang('YourAccountIsInactiveBecauseYouDoesntConfirmItCheckYourMailAndFollowTheInstructionsOrClickHereToReSendEmail'),
+                            get_lang('YourAccountIsInactiveBecauseYouDoesntConfirmItCheckYourEmailAndFollowTheInstructionsOrClickTheFollowingLinkXToReSendTheEmail'),
                             Display::url(get_lang('ReSendConfirmationMail'), api_get_path(WEB_PATH) . 'main/auth/resend_confirmation_mail.php'));
                     }
                     break;

+ 15 - 13
main/inc/lib/usergroup.lib.php

@@ -726,26 +726,28 @@ class UserGroup extends Model
         // Deleting items.
         if (!empty($delete_items)) {
             $user_list = self::get_users_by_usergroup($usergroup_id);
-            if (!empty($user_list)) {
-                foreach ($delete_items as $course_id) {
-                    $course_info = api_get_course_info_by_id($course_id);
-                    if ($course_info) {
+
+            foreach ($delete_items as $course_id) {
+                $course_info = api_get_course_info_by_id($course_id);
+                if ($course_info) {
+                    if (!empty($user_list)) {
                         foreach ($user_list as $user_id) {
                             CourseManager::unsubscribe_user(
                                 $user_id,
                                 $course_info['code']
                             );
                         }
-                        Database::delete(
-                            $this->usergroup_rel_course_table,
-                            array(
-                                'usergroup_id = ? AND course_id = ?' => array(
-                                    $usergroup_id,
-                                    $course_id
-                                )
-                            )
-                        );
                     }
+
+                    Database::delete(
+                        $this->usergroup_rel_course_table,
+                        array(
+                            'usergroup_id = ? AND course_id = ?' => array(
+                                $usergroup_id,
+                                $course_id
+                            )
+                        )
+                    );
                 }
             }
         }

+ 2 - 2
main/inc/lib/usermanager.lib.php

@@ -5728,9 +5728,9 @@ SQL;
         Database::getManager()->flush();
 
         $url = api_get_path(WEB_CODE_PATH).'auth/user_mail_confirmation.php?token='.$uniqueId;
-        $mailSubject = get_lang('InscriptionConfirmation');
+        $mailSubject = get_lang('RegistrationConfirmation');
         $mailBody = sprintf(
-            get_lang('ToCompleteYourPlatformInscriptionYouNeedToConfirmYourAccountClickingTheFollowingLink'),
+            get_lang('ToCompleteYourPlatformRegistrationYouNeedToConfirmYourAccountByClickingTheFollowingLinkX'),
             $url
         );
 

+ 2 - 3
main/install/index.php

@@ -19,6 +19,8 @@ use ChamiloSession as Session;
 
 ini_set('display_errors', '1');
 ini_set('log_errors', '1');
+ini_set('memory_limit', -1);
+ini_set('max_execution_time', 0);
 error_reporting(-1);
 
 require_once __DIR__.'/../../vendor/autoload.php';
@@ -213,7 +215,6 @@ if ($installType == 'update' && in_array($my_old_version, $update_from_version_8
     }
 }
 
-
 $session_lifetime = 360000;
 
 if (!isset($_GET['running'])) {
@@ -730,8 +731,6 @@ if (@$_POST['step2']) {
     }
 
     if ($installType == 'update') {
-        remove_memory_and_time_limits();
-
         $manager = connectToDatabase(
             $dbHostForm,
             $dbUsernameForm,

+ 0 - 4
main/messages/inbox.php

@@ -25,7 +25,6 @@ if (isset($_GET['messages_page_nr'])) {
     }
 }
 
-
 $nameTools = get_lang('Messages');
 $show_message = null;
 if (isset($_GET['form_reply']) || isset($_GET['form_delete'])) {
@@ -111,9 +110,6 @@ $actions = '';
 
 // Comes from normal profile
 if ($allowSocial == false && $allowMessage) {
-    $actions .= '<a href="'.api_get_path(WEB_PATH).'main/social/profile.php">'.
-        Display::return_icon('shared_profile.png', get_lang('ViewSharedProfile')).'</a>';
-
     $actions .= '<a href="'.api_get_path(WEB_PATH).'main/messages/new_message.php">'.
         Display::return_icon('message_new.png', get_lang('ComposeMessage')).'</a>';
     $actions .= '<a href="'.api_get_path(WEB_PATH).'main/messages/inbox.php">'.

+ 0 - 4
main/messages/new_message.php

@@ -318,10 +318,6 @@ if ($group_id != 0) {
     if ($allowSocial) {
     } else {
         $social_right_content .= '<div class=actions>';
-        if ($allowSocial && api_get_setting('allow_message_tool') === 'true') {
-            $social_right_content .= '<a href="'.api_get_path(WEB_PATH).'main/social/profile.php">'.
-                Display::return_icon('shared_profile.png', get_lang('ViewSharedProfile')).'</a>';
-        }
         if (api_get_setting('allow_message_tool') === 'true') {
             $social_right_content .= '<a href="'.api_get_path(WEB_PATH).'main/messages/new_message.php">'.
                 Display::return_icon('message_new.png', get_lang('ComposeMessage')).'</a>';

+ 0 - 6
main/messages/outbox.php

@@ -41,12 +41,6 @@ $interbreadcrumb[] = array(
 );
 
 $actions = '';
-
-if ($allowSocial && $allowMessage) {
-    $actions .= '<a href="'.api_get_path(WEB_PATH).'main/social/profile.php">'.
-        Display::return_icon('shared_profile.png', get_lang('ViewSharedProfile')).'</a>';
-}
-
 if ($allowMessage) {
     $actions .= '<a href="'.api_get_path(WEB_PATH).'main/messages/new_message.php">'.
         Display::return_icon('message_new.png', get_lang('ComposeMessage')).'</a>';

+ 0 - 4
main/messages/view_message.php

@@ -24,10 +24,6 @@ if ($allowSocial) {
 $interbreadcrumb[] = array('url' => 'inbox.php', 'name' => get_lang('Messages'));
 
 $social_right_content = '<div class="actions">';
-if ($allowSocial && $allowMessage) {
-    $social_right_content .= '<a href="'.api_get_path(WEB_PATH).'main/social/profile.php">'.
-        Display::return_icon('shared_profile.png', get_lang('ViewSharedProfile')).'</a>';
-}
 if (api_get_setting('allow_message_tool') === 'true') {
     $social_right_content .= '<a href="'.api_get_path(WEB_PATH).'main/messages/new_message.php">'.
         Display::return_icon('new-message.png', get_lang('ComposeMessage')).'</a>';