From 2c2dc36cc089b3e429457389224693b1ed3efa47 Mon Sep 17 00:00:00 2001 From: Christian Date: Fri, 29 Apr 2022 18:26:16 -0500 Subject: [PATCH] Gradebook - Fix error with field allow_skills_by_subcategory when it is null - refs BT#19823 --- main/install/configuration.dist.php | 2 +- src/Chamilo/CoreBundle/Entity/GradebookCategory.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/main/install/configuration.dist.php b/main/install/configuration.dist.php index ba5afe3192..bacc44286c 100755 --- a/main/install/configuration.dist.php +++ b/main/install/configuration.dist.php @@ -2183,7 +2183,7 @@ INSERT INTO `extra_field` (`extra_field_type`, `field_type`, `variable`, `displa // Enable skills in subcategory to work independant on assignement // Require DB changes: -// ALTER TABLE gradebook_category ADD allow_skills_by_subcategory tinyint(1) NOT NULL DEFAULT '1'; +// ALTER TABLE gradebook_category ADD allow_skills_by_subcategory tinyint(1) NULL DEFAULT '1'; // Requires edit Entity GradebookCategory: src/Chamilo/CoreBundle/Entity/GradebookCategory.php uncomment "allowSkillsBySubcategory" variable. // Requires uncomment the allowSkillsBySubcategory get and set //$_configuration['gradebook_enable_subcategory_skills_independant_assignement'] = false; diff --git a/src/Chamilo/CoreBundle/Entity/GradebookCategory.php b/src/Chamilo/CoreBundle/Entity/GradebookCategory.php index 794872567c..6d9884459c 100644 --- a/src/Chamilo/CoreBundle/Entity/GradebookCategory.php +++ b/src/Chamilo/CoreBundle/Entity/GradebookCategory.php @@ -125,7 +125,7 @@ class GradebookCategory * * @var int * - * @ORM\Column(name="allow_skills_by_subcategory", type="integer", nullable=false) + * @ORM\Column(name="allow_skills_by_subcategory", type="integer", nullable=true, options={"default": 1}) */ //protected $allowSkillsBySubcategory;