Add new session extra fields - refs BT#9070

1.10.x
Angel Fernando Quiroz Campos 10 years ago
parent 7a2bd011d5
commit 1042702703
  1. 33
      tests/scripts/insert_session_fields.php

@ -166,3 +166,36 @@ $brochure->save(array(
'field_visible' => 1, 'field_visible' => 1,
'field_changeable' => 1 'field_changeable' => 1
)); ));
$targetOptions = array(
get_lang('Minedu'),
get_lang('Regiones')
);
$target = new ExtraField('session');
$target->save(array(
'field_type' => ExtraField::FIELD_TYPE_SELECT,
'field_variable' => 'target',
'field_display_text' => get_lang('Target'),
'field_visible' => 1,
'field_changeable' => 1,
'field_options' => implode('; ', $targetOptions)
));
$shortDescription = new ExtraField('session');
$shortDescription->save(array(
'field_type' => ExtraField::FIELD_TYPE_TEXT,
'field_variable' => 'short_description',
'field_display_text' => get_lang('ShortSescription'),
'field_visible' => 1,
'field_changeable' => 1
));
$id = new ExtraField('session');
$id->save(array(
'field_type' => ExtraField::FIELD_TYPE_TEXT,
'field_variable' => 'id',
'field_display_text' => get_lang('Id'),
'field_visible' => 1,
'field_changeable' => 1
));

Loading…
Cancel
Save