Skip to content

Commit

Permalink
Fix management for lp_view extrafields - refs BT#18671
Browse files Browse the repository at this point in the history
  • Loading branch information
AngelFQC committed Apr 27, 2021
1 parent 3351d26 commit da4c8fe
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions main/inc/lib/extra_field.lib.php
Expand Up @@ -162,6 +162,8 @@ public function __construct($type)
case 'portfolio':
$this->extraFieldType = EntityExtraField::PORTFOLIO_TYPE;
break;
case 'lp_view':
$this->extraFieldType = EntityExtraField::LP_VIEW_TYPE;
}

$this->pageUrl = 'extra_fields.php?type='.$this->type;
Expand Down
2 changes: 1 addition & 1 deletion main/install/configuration.dist.php
Expand Up @@ -384,7 +384,7 @@
// Add column "Acquisition" in student LPs table to display info about a lo adquisition. Requires DB changes:
/*
INSERT INTO extra_field (extra_field_type, field_type, variable, display_text, default_value, field_order, visible_to_self, visible_to_others, changeable, filter, created_at) VALUES
(0, 3, 'acquisition', 'Acquisition', '', 0, 1, 0, 0, 0, NOW());
(20, 3, 'acquisition', 'Acquisition', '', 0, 1, 0, 0, 0, NOW());
SET @ef_id = LAST_INSERT_ID();
INSERT INTO extra_field_options (field_id, option_value, display_text, priority, priority_message, option_order) VALUES
(@ef_id, '1', 'Acquired', NULL, NULL, 1),
Expand Down
1 change: 1 addition & 0 deletions src/Chamilo/CoreBundle/Entity/ExtraField.php
Expand Up @@ -38,6 +38,7 @@ class ExtraField extends BaseAttribute
public const EXERCISE_FIELD_TYPE = 17;
public const TRACK_EXERCISE_FIELD_TYPE = 18;
public const PORTFOLIO_TYPE = 19;
public const LP_VIEW_TYPE = 20;

/**
* @var int
Expand Down

0 comments on commit da4c8fe

Please sign in to comment.