diff --git a/CHANGELOG b/CHANGELOG
index 3085f191..9092766b 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -5,7 +5,7 @@ New Feature: Allow for responents to self complete the questionnaire via email i
New Feature: Allow restricting appointment to just yourself
New Feature: Added ability to edit operators
New Feature: Can delete a queXS questionnaire
-New Feature: List and enable/disable sample files
+New Feature: List, rename and enable/disable sample files
New Feature: Deidentify (delete fields) from sample files
Fixed Bug: Replaced php short tags with long tags
diff --git a/admin/samplelist.php b/admin/samplelist.php
index 890fb0bf..3cfe3266 100644
--- a/admin/samplelist.php
+++ b/admin/samplelist.php
@@ -44,6 +44,21 @@ include_once(dirname(__FILE__).'/../db.inc.php');
*/
include_once(dirname(__FILE__).'/../functions/functions.xhtml.php');
+
+
+if (isset($_POST['submitr']))
+{
+ $sample_import_id = intval($_POST['sample_import_id']);
+
+ $sql = "UPDATE sample_import
+ SET description = " . $db->qstr($_POST['description']) . "
+ WHERE sample_import_id = $sample_import_id";
+
+ $db->Execute($sql);
+
+ $_GET['rename'] = $sample_import_id;
+}
+
if (isset($_POST['submit']))
{
$sample_import_id = intval($_POST['sample_import_id']);
@@ -67,6 +82,33 @@ if (isset($_POST['submit']))
$_GET['edit'] = $sample_import_id;
}
+if (isset($_GET['rename']))
+{
+ xhtml_head(T_("Rename"),true,array("../css/table.css"));
+
+ $sample_import_id = intval($_GET['rename']);
+
+ $sql = "SELECT description
+ FROM sample_import
+ WHERE sample_import_id = $sample_import_id";
+
+ $rs = $db->GetOne($sql);
+
+ print "
" . T_("Rename") . ": " . $rs. "
";
+ echo "" . T_("Go back") . "
";
+
+ ?>
+
+ " . T_("Deidentify") . "') as did,
+ CONCAT('" . T_("Rename") . "') as rname,
description
FROM sample_import";
@@ -144,8 +187,8 @@ $rs = $db->GetAll($sql);
xhtml_head(T_("Sample list"),true,array("../css/table.css"));
-$columns = array("description","enabledisable","did");
-$titles = array(T_("Sample"),T_("Enable/Disable"),T_("Deidentify"));
+$columns = array("description","enabledisable","did","rname");
+$titles = array(T_("Sample"),T_("Enable/Disable"),T_("Deidentify"),T_("Rename"));
xhtml_table($rs,$columns,$titles);
diff --git a/include/limesurvey/common_functions.php b/include/limesurvey/common_functions.php
index 2bf25636..ac99a223 100644
--- a/include/limesurvey/common_functions.php
+++ b/include/limesurvey/common_functions.php
@@ -4227,13 +4227,27 @@ function getHeader($meta = false)
$js_header_includes = array_unique($js_header_includes);
$css_header_includes = array_unique($css_header_includes);
- $js_header_includes[] = '/../../js/popup.js'; //queXS Addition
- include_once("quexs.php");
- if (AUTO_LOGOUT_MINUTES !== false)
- {
- $js_header_includes[] = $rooturl . "/../../js/childnap.js"; //queXS Addition
- }
+ $interviewer=returnglobal('interviewer');
+ if (!empty($interviewer) || (isset($_SESSION['interviewer']) && $_SESSION['interviewer'] == true))
+ {
+ $interviewer = true;
+ $_SESSION['interviewer'] = true;
+ }
+ else
+ {
+ $interviewer = false;
+ }
+ if ($interviewer)
+ {
+ $js_header_includes[] = '/../../js/popup.js'; //queXS Addition
+ include_once("quexs.php");
+ if (AUTO_LOGOUT_MINUTES !== false)
+ {
+ $js_header_includes[] = $rooturl . "/../../js/childnap.js"; //queXS Addition
+ }
+ }
+
if (isset($_SESSION['s_lang']) && $_SESSION['s_lang'])
{
$surveylanguage= $_SESSION['s_lang'];