diff --git a/README.md b/README.md index d746b95697..431ba75e10 100644 --- a/README.md +++ b/README.md @@ -168,7 +168,7 @@ php bin/doctrine.php migrations:execute 20150527120703 --up --configuration=app/ You can also print the differences between your database and what it should be by issuing the following command from the Chamilo base folder: ``` -php bin/doctrine.php orm:schema:update --dump-sql +php bin/doctrine.php orm:schema-tool:update --dump-sql ``` ## Contributing diff --git a/documentation/optimization.html b/documentation/optimization.html index 6cb09dba92..b9cfbc9a77 100755 --- a/documentation/optimization.html +++ b/documentation/optimization.html @@ -342,7 +342,7 @@ ALTER TABLE user_rel_tag ADD INDEX idx_user_rel_tag_user (user_id); In Chamilo 1.10.0 (the first version of the serie), many indexes were forgotten, so you can boost your database by adding the following indexes:
 alter table extra_field_values add index idx_extra_field_values (field_id, item_id);
-alter table usergroup_rel_user add index idx_usergroup_ru (group_id);
+alter table usergroup_rel_user add index idx_usergroup_ru (usergroup_id);
 alter table usergroup_rel_user add index idx_usergroup_ru_u (user_id);
 alter table c_student_publication add index idxstudpub_cid (c_id);
 alter table c_student_publication add index idxstudpub_uid (user_id);
@@ -558,23 +558,23 @@ This is easy, doesn't require a server reload and you should see the results pre
     you should avoid using this technique.
 

-You can also mitigate the risk by disabling permissions check only +You can also mitigate the risk by disabling permissions check only for some static resource like css,js and fonts files.
-For that is required to load header module +For that is required to load header module in apache (check with a2enmod in your favorite root terminal)
add theses line after RewriteBase /courses/:

 <IfModule mod_headers.c>
     # all file name ended with these  extensions names will bypass the permission check   (and also served by the browser cache at  the next request)
     <FilesMatch "\.(gif|jpg|jpeg|png|js|pdf|ico|icon|css|swf|avi|mp3|ogg|wav|ttf|otf|eot|woff)$">
-        Header unset Cache-Control  
-        Header set Cache-Control "public, max-age=29030400" 
-        RequestHeader unset Cookie      
+        Header unset Cache-Control
+        Header set Cache-Control "public, max-age=29030400"
+        RequestHeader unset Cookie
         Header unset ETag
     </FilesMatch>
 </IfModule>
-# also adjust files here 
+# also adjust files here
 RewriteRule (\.(html|gif|jpg|jpeg|png|js|pdf|ico|icon|css|swf|avi|mp3|ogg|wav|ttf|otf|eot|woff))$ - [L]
 

diff --git a/main/admin/add_users_to_usergroup.php b/main/admin/add_users_to_usergroup.php index 22367ed007..4998fe451c 100755 --- a/main/admin/add_users_to_usergroup.php +++ b/main/admin/add_users_to_usergroup.php @@ -177,7 +177,7 @@ if ($use_extra_fields) { if (count($extra_field_result)>1) { for ($i=0; $icontent = $content; - $this->title = $title; - $this->date = $date; - $this->display_order = $display_order; - $this->email_sent = $email_sent; + $this->content = $content; + $this->title = $title; + $this->date = $date; + $this->display_order = $display_order; + $this->email_sent = $email_sent; - $this->attachment_path = $path; - $this->attachment_filename = $filename; - $this->attachment_size = $size; - $this->attachment_comment = $comment; - } + $this->attachment_path = $path; + $this->attachment_filename = $filename; + $this->attachment_size = $size; + $this->attachment_comment = $comment; + } - /** - * Show this announcement - */ - function show() - { - parent::show(); - echo $this->date.': '.$this->title; - } + /** + * Show this announcement + */ + function show() + { + parent::show(); + echo $this->date.': '.$this->title; + } } diff --git a/main/coursecopy/classes/Attendance.class.php b/main/coursecopy/classes/Attendance.class.php index c4ee9584c5..51d33badc4 100755 --- a/main/coursecopy/classes/Attendance.class.php +++ b/main/coursecopy/classes/Attendance.class.php @@ -13,28 +13,28 @@ class Attendance extends Coursecopy\Resource public $params = array(); public $attendance_calendar = array(); - /** - * Create a new Thematic - * - * @param array parameters - */ + /** + * Create a new Thematic + * + * @param array parameters + */ public function __construct($params) { - parent::__construct($params['id'], RESOURCE_ATTENDANCE); - $this->params = $params; - } + parent::__construct($params['id'], RESOURCE_ATTENDANCE); + $this->params = $params; + } /** * @inheritdoc */ public function show() { - parent::show(); - echo $this->params['name']; - } + parent::show(); + echo $this->params['name']; + } public function add_attendance_calendar($data) { - $this->attendance_calendar[] = $data; - } + $this->attendance_calendar[] = $data; + } } diff --git a/main/coursecopy/classes/CourseDescription.class.php b/main/coursecopy/classes/CourseDescription.class.php index ca5e93d4aa..3d5a207192 100755 --- a/main/coursecopy/classes/CourseDescription.class.php +++ b/main/coursecopy/classes/CourseDescription.class.php @@ -1,6 +1,7 @@ title = $title; - $this->content = $content; - $this->description_type = $description_type; - } + /** + * Create a new course description + * @param int $id + * @param string $title + * @param string $content + */ + public function __construct($id, $title, $content, $description_type) + { + parent::__construct($id, RESOURCE_COURSEDESCRIPTION); + $this->title = $title; + $this->content = $content; + $this->description_type = $description_type; + } - /** - * Show this Event - */ - function show() - { - parent::show(); - echo $this->title; - } + /** + * Show this Event + */ + public function show() + { + parent::show(); + echo $this->title; + } } diff --git a/main/coursecopy/classes/CourseSelectForm.class.php b/main/coursecopy/classes/CourseSelectForm.class.php index f83d2a1795..a0827ff4bb 100755 --- a/main/coursecopy/classes/CourseSelectForm.class.php +++ b/main/coursecopy/classes/CourseSelectForm.class.php @@ -16,7 +16,7 @@ class CourseSelectForm * @param array $hidden_fields Hidden fields to add to the form. * @param boolean the document array will be serialize. This is used in the course_copy.php file */ - static function display_form($course, $hidden_fields = null, $avoid_serialize = false) + public static function display_form($course, $hidden_fields = null, $avoid_serialize = false) { global $charset; $resource_titles[RESOURCE_GRADEBOOK] = get_lang('Gradebook'); @@ -224,7 +224,6 @@ class CourseSelectForm foreach ($resources as $id => $resource) { if ($resource) { - // Event obj in 1.9.x in 1.10.x the class is CalendarEvent Coursecopy\Resource::setClassType($resource); echo '