diff --git a/db/User.php b/db/User.php index 00f29f6..9681c44 100644 --- a/db/User.php +++ b/db/User.php @@ -29,8 +29,8 @@ class User extends base const CSV_BATCH = 8; // Bug #5. const PREFIX = 'ouop_'; - const UNDEF_INSTRUMENT = 'fr'; // Was: 'kd', 'tpt'; - const INSTRUMENT_REGEX = '/^(kd|tpt|fa|vr|fr)/'; + const UNDEF_INSTRUMENT = 'tpt'; // Pilot 3-B tpt; (Was: 'fr', 'kd', 'tpt') + const INSTRUMENT_REGEX = '/^(kd|tpt|fa|vr|fr|brasil)/'; // Added: 'brasil'. const OUCU_REGEX = '@^[a-z]{2,4}\d{1,7}$@'; const OPENID_URL_REGEX = '@^https?:\/\/openid\.open\.ac\.uk\/oucu\/(?P\w+)$@'; diff --git a/user/ajax.php b/user/ajax.php index 6b23aad..a71a5b8 100644 --- a/user/ajax.php +++ b/user/ajax.php @@ -53,6 +53,8 @@ 'survey_urls'=> $prof->survey_urls, 'user_roles' => OuUser::getRoles(), 'redirect_url' => USER_LOGGED_IN ? $prof->redirect_url : null, + 'undef_instrument' => OuUser::UNDEF_INSTRUMENT, + 'instrument_regex' => OuUser::INSTRUMENT_REGEX, 'strings' => OuUser::getStringsAjax(LONG_TXT), // USER_LOGGED_IN ? OuUser::getStringsAjax(LONG_TXT) : [], 'config' => USER_LOGGED_IN && $config ? $config : [ 'ga' => $config[ 'ga' ] ], ], DEBUG ? JSON_PRETTY_PRINT : null);