// ---------- // SURFconext // Support for selecting OpenSocial group relations to distribute tokens for if ($subaction == 'importos' && bHasSurveyPermission($surveyid, 'tokens', 'import')) { global $grouprel_config, $as, $user_id; // global $samlEnabled; assert($samlEnabled); if (isset($as)) { $auth = array($grouprel_config['userIdAttribute'] => $user_id); } else { // developer: $auth = array($grouprel_config['userIdAttribute'] => 'urn:collab:person:test.surfguest.nl:mdobrinic'); } require_once 'classes/GroupTokens.php'; $o = new GroupTokens($auth, $surveyid, $grouprel_config); $url = "{$rooturl}/admin/admin.php?action=osgroup&sid={$surveyid}&subaction=form"; $s = $o->show($url, true); $tokenoutput .= "\t<div class='header ui-widget-header'>" . $clang->gT("Select OpenSocial groups") . "</div>\n"; $tokenoutput .= "\t<div class='messagebox ui-corner-all'>\n"; $tokenoutput .= $s; $tokenoutput .= "\t</div>\n"; } // ---------- if ($subaction == "upload" && bHasSurveyPermission($surveyid, 'tokens', 'import')) { $attrfieldnames = GetAttributeFieldnames($surveyid); $duplicatelist = array(); $invalidemaillist = array(); $invalidformatlist = array(); $tokenoutput .= "\t<div class='header ui-widget-header'>" . $clang->gT("Token file upload") . "</div>\n" . "\t<div class='messagebox ui-corner-all'>\n"; if (!isset($tempdir)) { $the_path = $homedir; } else {