mirror of
https://github.com/ACSPRI/queXS
synced 2024-04-02 12:12:16 +00:00
Allow editing of sample name and fixed bug from accessing external pages by non interviewer
This commit is contained in:
@@ -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: Allow restricting appointment to just yourself
|
||||||
New Feature: Added ability to edit operators
|
New Feature: Added ability to edit operators
|
||||||
New Feature: Can delete a queXS questionnaire
|
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
|
New Feature: Deidentify (delete fields) from sample files
|
||||||
Fixed Bug: Replaced php short tags with long tags
|
Fixed Bug: Replaced php short tags with long tags
|
||||||
|
|
||||||
|
|||||||
@@ -44,6 +44,21 @@ include_once(dirname(__FILE__).'/../db.inc.php');
|
|||||||
*/
|
*/
|
||||||
include_once(dirname(__FILE__).'/../functions/functions.xhtml.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']))
|
if (isset($_POST['submit']))
|
||||||
{
|
{
|
||||||
$sample_import_id = intval($_POST['sample_import_id']);
|
$sample_import_id = intval($_POST['sample_import_id']);
|
||||||
@@ -67,6 +82,33 @@ if (isset($_POST['submit']))
|
|||||||
$_GET['edit'] = $sample_import_id;
|
$_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 "<h2>" . T_("Rename") . ": " . $rs. "</h2>";
|
||||||
|
echo "<p><a href='?'>" . T_("Go back") . "</a></p>";
|
||||||
|
|
||||||
|
?>
|
||||||
|
<form action="?" method="post">
|
||||||
|
<div><label for='description'><?php echo T_("Description") . ": "; ?></label><input type='text' name='description' value="<?php echo $rs;?>"/></div>
|
||||||
|
<div><input type='hidden' name='sample_import_id' value='<?php echo $sample_import_id;?>'/></div>
|
||||||
|
<div><input type="submit" name="submitr" value="<?php echo T_("Rename");?>"/></div>
|
||||||
|
</form>
|
||||||
|
<?php
|
||||||
|
|
||||||
|
|
||||||
|
xhtml_foot();
|
||||||
|
exit();
|
||||||
|
}
|
||||||
|
|
||||||
if (isset($_GET['edit']))
|
if (isset($_GET['edit']))
|
||||||
{
|
{
|
||||||
@@ -137,6 +179,7 @@ $sql = "SELECT
|
|||||||
END
|
END
|
||||||
as enabledisable,
|
as enabledisable,
|
||||||
CONCAT('<a href=\'?edit=',sample_import_id,'\'>" . T_("Deidentify") . "</a>') as did,
|
CONCAT('<a href=\'?edit=',sample_import_id,'\'>" . T_("Deidentify") . "</a>') as did,
|
||||||
|
CONCAT('<a href=\'?rename=',sample_import_id,'\'>" . T_("Rename") . "</a>') as rname,
|
||||||
description
|
description
|
||||||
FROM sample_import";
|
FROM sample_import";
|
||||||
|
|
||||||
@@ -144,8 +187,8 @@ $rs = $db->GetAll($sql);
|
|||||||
|
|
||||||
xhtml_head(T_("Sample list"),true,array("../css/table.css"));
|
xhtml_head(T_("Sample list"),true,array("../css/table.css"));
|
||||||
|
|
||||||
$columns = array("description","enabledisable","did");
|
$columns = array("description","enabledisable","did","rname");
|
||||||
$titles = array(T_("Sample"),T_("Enable/Disable"),T_("Deidentify"));
|
$titles = array(T_("Sample"),T_("Enable/Disable"),T_("Deidentify"),T_("Rename"));
|
||||||
|
|
||||||
xhtml_table($rs,$columns,$titles);
|
xhtml_table($rs,$columns,$titles);
|
||||||
|
|
||||||
|
|||||||
@@ -4227,13 +4227,27 @@ function getHeader($meta = false)
|
|||||||
$js_header_includes = array_unique($js_header_includes);
|
$js_header_includes = array_unique($js_header_includes);
|
||||||
$css_header_includes = array_unique($css_header_includes);
|
$css_header_includes = array_unique($css_header_includes);
|
||||||
|
|
||||||
$js_header_includes[] = '/../../js/popup.js'; //queXS Addition
|
$interviewer=returnglobal('interviewer');
|
||||||
include_once("quexs.php");
|
if (!empty($interviewer) || (isset($_SESSION['interviewer']) && $_SESSION['interviewer'] == true))
|
||||||
if (AUTO_LOGOUT_MINUTES !== false)
|
{
|
||||||
{
|
$interviewer = true;
|
||||||
$js_header_includes[] = $rooturl . "/../../js/childnap.js"; //queXS Addition
|
$_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'])
|
if (isset($_SESSION['s_lang']) && $_SESSION['s_lang'])
|
||||||
{
|
{
|
||||||
$surveylanguage= $_SESSION['s_lang'];
|
$surveylanguage= $_SESSION['s_lang'];
|
||||||
|
|||||||
Reference in New Issue
Block a user