config['lms_config']['use_tabs']) { if ($currentPage != $currentModule['id_fiche']) { // if a number is at the end of the page tag, it means that it's a tab page corresponding to the page without the number // thus, to associate this tab page to its parent one, we remove the number from the page tag $currentPage = preg_replace('/[0-9]*$/', '', $currentPage); } } // display the modules only if the current module is in the modules displayed $currentModuleInModules = !empty(array_filter( $modulesDisplayed, function ($item) use ($currentModule) { return isset($item['id_fiche']) && isset($currentModule['id_fiche']) && $item['id_fiche'] == $currentModule['id_fiche']; })); ?>