From ca8cc4bcd0a89c1db7547202075c38adb3a5f619 Mon Sep 17 00:00:00 2001 From: Julio Montoya Date: Thu, 18 Jul 2019 12:57:46 +0200 Subject: [PATCH] Add c_quiz.page_result_configuration field BT#15844 --- src/CoreBundle/Migrations/Schema/V200/Version20.php | 6 ++++++ src/CourseBundle/Entity/CQuiz.php | 7 +++++++ 2 files changed, 13 insertions(+) diff --git a/src/CoreBundle/Migrations/Schema/V200/Version20.php b/src/CoreBundle/Migrations/Schema/V200/Version20.php index 1b1ed42287..467c9650a2 100644 --- a/src/CoreBundle/Migrations/Schema/V200/Version20.php +++ b/src/CoreBundle/Migrations/Schema/V200/Version20.php @@ -562,6 +562,12 @@ class Version20 extends AbstractMigrationChamilo ); } + if ($table->hasColumn('page_result_configuration') === false) { + $this->addSql( + "ALTER TABLE c_quiz ADD page_result_configuration LONGTEXT DEFAULT NULL COMMENT '(DC2Type:array)'" + ); + } + $table = $schema->getTable('c_lp_item_view'); if ($table->hasIndex('idx_c_lp_item_view_cid_id_view_count') == false) { $this->addSql( diff --git a/src/CourseBundle/Entity/CQuiz.php b/src/CourseBundle/Entity/CQuiz.php index e026199b4c..0b0640e15b 100644 --- a/src/CourseBundle/Entity/CQuiz.php +++ b/src/CourseBundle/Entity/CQuiz.php @@ -230,6 +230,13 @@ class CQuiz */ protected $autoLaunch; + /** + * @var int + * + * @ORM\Column(name="page_result_configuration", type="array", nullable=true) + */ + protected $pageResultConfiguration; + /** * CQuiz constructor. */