2
0
mirror of https://github.com/ACSPRI/queXS synced 2024-04-02 12:12:16 +00:00

Merging the updated Limesurvey 1.92+ branch of queXS to trunk

This commit is contained in:
azammitdcarf
2012-11-21 04:04:39 +00:00
parent 153fc8ca0d
commit c569559964
856 changed files with 254260 additions and 819988 deletions

View File

@@ -10,7 +10,7 @@
* other free or open source software licenses.
* See COPYRIGHT.php for copyright notices and details.
*
* $Id: http_importsurvey.php 10925 2011-09-02 14:12:02Z c_schmitz $
* $Id: http_importsurvey.php 11607 2011-12-06 23:19:52Z tmswhite $
*/
// Ensure script is not run directly, avoid path disclosure
@@ -19,7 +19,7 @@ include_once("login_check.php");
// Enable 'Convert resource links and INSERTANS fields?' if selected
if ( (isset($_POST['copysurveytranslinksfields']) && $_POST['copysurveytranslinksfields'] == "on") || (isset($_POST['translinksfields']) && $_POST['translinksfields'] == "on"))
{
$sTransLinks = true;
$sTransLinks = true;
}
// Start the HTML
@@ -40,14 +40,14 @@ $importerror=false; // Put a var for continue
if ($action == 'importsurvey')
{
$the_full_file_path = $tempdir . "/" . $_FILES['the_file']['name'];
$the_full_file_path = $tempdir . "/" . sRandomChars(20).'_'.$_FILES['the_file']['name'];
if (!@move_uploaded_file($_FILES['the_file']['tmp_name'], $the_full_file_path))
{
$importsurvey .= "<div class='errorheader'>".$clang->gT("Error")."</div>\n";
$importsurvey .= sprintf ($clang->gT("An error occurred uploading your file. This may be caused by incorrect permissions in your %s folder."),$tempdir)."<br /><br />\n";
$importsurvey .= "<input type='submit' value='".$clang->gT("Main Admin Screen")."' onclick=\"window.open('$scriptname', '_self')\"><br /><br />\n";
$importerror=true;
}
}
else
{
$importsurvey .= "<div class='successheader'>".$clang->gT("Success")."</div>&nbsp;<br />\n";
@@ -145,13 +145,13 @@ if (!$importerror)
$importsurvey .= "<br />\n<div class='successheader'>".$clang->gT("Success")."</div><br /><br />\n";
if ($action == 'importsurvey')
{
$importsurvey .= "<strong>".$clang->gT("Survey copy summary")."</strong><br />\n";
$importsurvey .= "<strong>".$clang->gT("Survey copy summary")."</strong><br />\n";
}
elseif($action == 'copysurvey')
{
$importsurvey .= "<strong>".$clang->gT("Survey import summary")."</strong><br />\n";
$importsurvey .= "<strong>".$clang->gT("Survey import summary")."</strong><br />\n";
}
$importsurvey .= "<ul style=\"text-align:left;\">\n\t<li>".$clang->gT("Surveys").": {$aImportResults['surveys']}</li>\n";
$importsurvey .= "\t<li>".$clang->gT("Languages").": {$aImportResults['languages']}</li>\n";
$importsurvey .= "\t<li>".$clang->gT("Question groups").": {$aImportResults['groups']}</li>\n";
@@ -159,15 +159,15 @@ if (!$importerror)
$importsurvey .= "\t<li>".$clang->gT("Answers").": {$aImportResults['answers']}</li>\n";
if (isset($aImportResults['subquestions']))
{
$importsurvey .= "\t<li>".$clang->gT("Subquestions").": {$aImportResults['subquestions']}</li>\n";
$importsurvey .= "\t<li>".$clang->gT("Subquestions").": {$aImportResults['subquestions']}</li>\n";
}
if (isset($aImportResults['defaultvalues']))
{
$importsurvey .= "\t<li>".$clang->gT("Default answers").": {$aImportResults['defaultvalues']}</li>\n";
$importsurvey .= "\t<li>".$clang->gT("Default answers").": {$aImportResults['defaultvalues']}</li>\n";
}
if (isset($aImportResults['conditions']))
{
$importsurvey .= "\t<li>".$clang->gT("Conditions").": {$aImportResults['conditions']}</li>\n";
$importsurvey .= "\t<li>".$clang->gT("Conditions").": {$aImportResults['conditions']}</li>\n";
}
if (isset($aImportResults['labelsets']))
{
@@ -180,8 +180,8 @@ if (!$importerror)
$importsurvey .= "\t<li>".$clang->gT("Question attributes").": {$aImportResults['question_attributes']}</li>\n";
$importsurvey .= "\t<li>".$clang->gT("Assessments").": {$aImportResults['assessments']}</li>\n";
$importsurvey .= "\t<li>".$clang->gT("Quotas").": {$aImportResults['quota']} ({$aImportResults['quotamembers']} ".$clang->gT("quota members")." ".$clang->gT("and")." {$aImportResults['quotals']} ".$clang->gT("quota language settings").")</li>\n</ul><br />\n";
if (count($aImportResults['importwarnings'])>0)
if (count($aImportResults['importwarnings'])>0)
{
$importsurvey .= "<div class='warningheader'>".$clang->gT("Warnings").":</div><ul style=\"text-align:left;\">";
foreach ($aImportResults['importwarnings'] as $warning)
@@ -190,23 +190,23 @@ if (!$importerror)
}
$importsurvey .= "</ul><br />\n";
}
if ($action == 'importsurvey')
{
$importsurvey .= "<strong>".$clang->gT("Import of Survey is completed.")."</strong><br />\n"
. "<a href='$scriptname?sid={$aImportResults['newsid']}'>".$clang->gT("Go to survey")."</a><br />\n";
. "<a href='$scriptname?sid={$aImportResults['newsid']}'>".$clang->gT("Go to survey")."</a><br />\n";
}
elseif($action == 'copysurvey')
{
$importsurvey .= "<strong>".$clang->gT("Copy of survey is completed.")."</strong><br />\n"
. "<a href='$scriptname?sid={$aImportResults['newsid']}'>".$clang->gT("Go to survey")."</a><br />\n";
}
. "<a href='$scriptname?sid={$aImportResults['newsid']}'>".$clang->gT("Go to survey")."</a><br />\n";
}
if ($action == 'importsurvey')
{
unlink($sFullFilepath);
unlink($sFullFilepath);
}
}
// end of traitment an close message box
$importsurvey .= "</div><br />\n";