Remove invalid participant fields from export field options

This commit is contained in:
Nathan Gray 2016-03-25 16:32:15 +00:00
parent 2d26d595b6
commit dc3fdfdea6
2 changed files with 5 additions and 1 deletions

View File

@ -16,6 +16,11 @@ class calendar_wizard_export_csv extends importexport_wizard_basic_export_csv
// Field mapping // Field mapping
$bo = new calendar_tracking(); $bo = new calendar_tracking();
$this->export_fields = array('id' => 'Calendar ID') + $bo->field2label; $this->export_fields = array('id' => 'Calendar ID') + $bo->field2label;
// These are not valid:
unset($this->export_fields['participants-c']);
unset($this->export_fields['participants-r']);
$custom = config::get_customfields('calendar', true); $custom = config::get_customfields('calendar', true);
foreach($custom as $name => $data) { foreach($custom as $name => $data) {
$this->export_fields['#'.$name] = $data['label']; $this->export_fields['#'.$name] = $data['label'];

View File

@ -33,7 +33,6 @@
<entry type="string" name="start">start</entry> <entry type="string" name="start">start</entry>
<entry type="string" name="end">end</entry> <entry type="string" name="end">end</entry>
<entry type="string" name="participants">Participants: User, Status, Role</entry> <entry type="string" name="participants">Participants: User, Status, Role</entry>
<entry type="string" name="participants-c">Participants: User, Status, Quantity, Role</entry>
<entry type="string" name="all_custom_fields">calendar</entry> <entry type="string" name="all_custom_fields">calendar</entry>
</entry> </entry>
<entry type="string" name="delimiter">;</entry> <entry type="string" name="delimiter">;</entry>