Skip to content

Commit

Permalink
Restore new teammemberprofilefield filter correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
dasistwas committed Aug 28, 2024
1 parent e3bdb55 commit 6622db2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
10 changes: 10 additions & 0 deletions backup/moodle2/restore_datalynx_stepslib.php
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,16 @@ protected function process_datalynx_filter($data) {
foreach ($customsearch as $searchfield => $options) {
if (is_numeric($searchfield) && $searchfield > 0) {
$searchfields[$this->get_mappingid('datalynx_field', $searchfield)] = $options;
} else if (str_contains($searchfield, 'entryteammemberprofilefield_')) {
// Check for filter of entryteammemberprofilefield.
// It has pattern entryteammemberprofilefield_fieldid_profielfieldname.
// Example: entryteammemberprofilefield_1026_department
preg_match('/entryteammemberprofilefield_(\d+)_(.+)/', $searchfield, $matches);
if (is_numeric($matches[1])) {
$newfieldid = $this->get_mappingid('datalynx_field', $matches[1]);
$newname = "entryteammemberprofilefield_{$newfieldid}_{$matches[2]}";
$searchfields[$newname] = $options;
}
} else {
$searchfields[$searchfield] = $options;
}
Expand Down
4 changes: 2 additions & 2 deletions version.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
defined('MOODLE_INTERNAL') || die();

$plugin->component = 'mod_datalynx';
$plugin->version = 2024082100;
$plugin->release = 'v4.1-DataTreasure'; // Data words like data science, data mining.
$plugin->version = 2024082800;
$plugin->release = 'v4.2-DataTreasure'; // Data words like data science, data mining.
$plugin->requires = 2022112800;
$plugin->maturity = MATURITY_STABLE;
$plugin->dependencies = array(
Expand Down

0 comments on commit 6622db2

Please sign in to comment.