mirror of
https://github.com/ACSPRI/queXS
synced 2024-04-02 12:12:16 +00:00
Automatically create tokens table when activating (as is required by queXS)
This commit is contained in:
@@ -80,5 +80,11 @@ if (!isset($_POST['ok']) || !$_POST['ok'])
|
||||
else
|
||||
{
|
||||
$activateoutput = activateSurvey($postsid,$surveyid);
|
||||
//also activate tokens queXS addition
|
||||
if(bHasSurveyPermission($surveyid,'tokens','read'))
|
||||
{
|
||||
$_POST['createtable'] = 'Y';
|
||||
$_SESSION['FileManagerContext']="edit:emailsettings:$surveyid";
|
||||
include('tokens.php');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -473,9 +473,10 @@ function activateSurvey($postsid,$surveyid, $scriptname='admin.php')
|
||||
else
|
||||
{
|
||||
$activateoutput .= $clang->gT("This survey is now active, and responses can be recorded.")."<br /><br />\n";
|
||||
$activateoutput .= "<strong>".$clang->gT("Open-access mode").":</strong> ".$clang->gT("No invitation code is needed to complete the survey.")."<br />".$clang->gT("You can switch to the closed-access mode by initialising a token table with the button below.")."<br /><br />\n";
|
||||
$activateoutput .= "<input type='submit' value='".$clang->gT("Switch to closed-access mode")."' onclick=\"".get2post("$scriptname?action=tokens&sid={$postsid}&createtable=Y")."\" />\n";
|
||||
$activateoutput .= "<input type='submit' value='".$clang->gT("No, thanks.")."' onclick=\"".get2post("$scriptname?sid={$postsid}")."\" />\n";
|
||||
//queXS removal
|
||||
// $activateoutput .= "<strong>".$clang->gT("Open-access mode").":</strong> ".$clang->gT("No invitation code is needed to complete the survey.")."<br />".$clang->gT("You can switch to the closed-access mode by initialising a token table with the button below.")."<br /><br />\n";
|
||||
// $activateoutput .= "<input type='submit' value='".$clang->gT("Switch to closed-access mode")."' onclick=\"".get2post("$scriptname?action=tokens&sid={$postsid}&createtable=Y")."\" />\n";
|
||||
// $activateoutput .= "<input type='submit' value='".$clang->gT("No, thanks.")."' onclick=\"".get2post("$scriptname?sid={$postsid}")."\" />\n";
|
||||
}
|
||||
$activateoutput .= "</div><br /> \n";
|
||||
$lsrcOutput = true;
|
||||
|
||||
@@ -494,7 +494,7 @@ if (!$tokenexists) //If no tokens table exists
|
||||
$tokenoutput .= "\t</div><p>\n"
|
||||
.$clang->gT("A token table has been created for this survey.")." (\"".$dbprefix."tokens_$surveyid\")<br /><br />\n"
|
||||
."<input type='submit' value='"
|
||||
.$clang->gT("Continue")."' onclick=\"window.open('$scriptname?action=tokens&sid=$surveyid', '_self')\" />\n";
|
||||
.$clang->gT("Continue")."' onclick=\"window.open('$scriptname?sid=$surveyid', '_self')\" />\n";
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -3286,4 +3286,4 @@ function getLine($file)
|
||||
return $buffer;
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user