Browse Source

Add support to extra fields for surveys - refs BT#12915

Angel Fernando Quiroz Campos 7 years ago
parent
commit
94ec5f87b4
2 changed files with 6 additions and 1 deletions
  1. 5 1
      main/inc/lib/extra_field.lib.php
  2. 1 0
      src/Chamilo/CoreBundle/Entity/ExtraField.php

+ 5 - 1
main/inc/lib/extra_field.lib.php

@@ -134,6 +134,9 @@ class ExtraField extends Model
             case 'user_certificate':
                 $this->extraFieldType = EntityExtraField::USER_CERTIFICATE;
                 break;
+            case 'survey':
+                $this->extraFieldType = EntityExtraField::SURVEY_FIELD_TYPE;
+                break;
         }
 
         $this->pageUrl = 'extra_fields.php?type='.$this->type;
@@ -165,7 +168,8 @@ class ExtraField extends Model
             'skill',
             'work',
             'career',
-            'user_certificate'
+            'user_certificate',
+            'survey'
         );
     }
 

+ 1 - 0
src/Chamilo/CoreBundle/Entity/ExtraField.php

@@ -28,6 +28,7 @@ class ExtraField extends BaseAttribute
     const WORK_FIELD_TYPE = 9;
     const CAREER_FIELD_TYPE = 10;
     const USER_CERTIFICATE = 11;
+    const SURVEY_FIELD_TYPE = 12;
 
     /**
      * @var integer