mirror of
https://github.com/ACSPRI/queXS
synced 2024-04-02 12:12:16 +00:00
Use new methods to access lime URL
This commit is contained in:
@@ -119,11 +119,9 @@ include ("../functions/functions.operator.php");
|
||||
<li><a class="" href="?"><i class="fa fa-tachometer fa-lg"></i><span><?php print T_("Dashboard") ;?></span></a></li>
|
||||
<li class="has_sub"><a href="" class=""><i class="fa fa-list-alt fa-lg"></i><span class="arrow"><?php print T_("Questionnairies") ;?></span></a>
|
||||
<ul style="<?php if ($g == 1) echo "display:block";?>">
|
||||
<li><a href="?g=1&page=<?php echo LIME_URL ;?>admin/admin.php?action=newsurvey"><i class="fa fa-file-text-o lime fa-fw"></i><?php print T_("Create an instrument in Limesurvey") ;?></a></li>
|
||||
<li><a href="?g=1&page=new.php"><i class="fa fa-plus-circle fa-fw"></i><?php print T_("Create a new questionnaire") ;?></a></li>
|
||||
<li><a href="?g=1&page=questionnairelist.php"><i class="fa fa-list fa-fw"></i><?php print T_("Questionnaire management") ;?></a></li>
|
||||
<li><a href="?g=1&page=set_outcomes.php?qid=0"><i class="fa fa-list-ol fa-fw"></i><?php print T_("Set questionnaire outcomes") ;?></a></li>
|
||||
<li><a href="?g=1&page=<?php echo LIME_URL ;?>admin/admin.php"><i class="fa fa-lemon-o lime fa-fw"></i><?php print T_("Administer instruments with Limesurvey") ;?></a></li>
|
||||
<li><a href="?g=1&page=questionnaireprefill.php"><i class="fa fa-thumb-tack fa-fw"></i><?php print T_("Pre-fill questionnaire") ;?></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
@@ -308,28 +308,16 @@ if (isset($_POST['update']) && isset($_GET['modify']))
|
||||
WHERE questionnaire_id = '$questionnaire_id'";
|
||||
$db->Execute($sql);
|
||||
}
|
||||
|
||||
if ($respsc == 1)
|
||||
{
|
||||
$lime_mode = $db->qstr($_POST['lime_mode'],get_magic_quotes_gpc());
|
||||
$lime_template = $db->qstr($_POST['lime_template'],get_magic_quotes_gpc());
|
||||
$lime_endurl = $db->qstr($_POST['lime_endurl'],get_magic_quotes_gpc());
|
||||
|
||||
$sql = "UPDATE questionnaire
|
||||
SET lime_mode = $lime_mode, lime_template = $lime_template, lime_endurl = $lime_endurl
|
||||
WHERE questionnaire_id = $questionnaire_id";
|
||||
$db->Execute($sql);
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($_GET['modify']))
|
||||
{
|
||||
$questionnaire_id = intval($_GET['modify']);
|
||||
|
||||
$sql = "SELECT `questionnaire`.*, sl.surveyls_title as title
|
||||
FROM questionnaire
|
||||
LEFT JOIN " . LIME_PREFIX . "surveys_languagesettings AS sl ON ( questionnaire.lime_sid = sl.surveyls_survey_id)
|
||||
WHERE questionnaire_id = $questionnaire_id";
|
||||
$sql = "SELECT `questionnaire`.*,remote.entry_url
|
||||
FROM questionnaire, remote
|
||||
WHERE questionnaire_id = $questionnaire_id
|
||||
AND questionnaire.remote_id = remote.id";
|
||||
$rs = $db->GetRow($sql);
|
||||
|
||||
$referral = $testing = $rws = $ras = $rsc = "checked=\"checked\"";
|
||||
@@ -375,8 +363,8 @@ if (isset($_GET['modify']))
|
||||
<a href='questionnairelist.php' class='btn btn-default pull-left' ><i class='fa fa-chevron-left fa-lg' style='color:blue;'></i> <?php echo T_("Go back"); ?></a><h3 class="pull-right"><?php echo T_("Assigned survey"); ?>:</h3>
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
<h3 class="pull-left" ><?php echo $rs['lime_sid']," ",$rs['title']; ?></h3>
|
||||
<?php echo "<a class='btn btn-default btn-lime pull-right' href='" . LIME_URL . "admin/admin.php?sid={$rs['lime_sid']}'><i class='fa fa-edit' style='color:blue;'></i> " . T_("Edit instrument in Limesurvey") . " </a>"; ?>
|
||||
<h3 class="pull-left" ><?php echo $rs['lime_sid']," "; ?></h3>
|
||||
<?php echo "<a class='btn btn-default btn-lime pull-right' href='" . $rs['entry_url']. "admin/survey/sa/view/surveyid/{$rs['lime_sid']}'><i class='fa fa-edit' style='color:blue;'></i> " . T_("Edit instrument in Limesurvey") . " </a>"; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -495,9 +483,7 @@ if ($rs['respondent_selection'] == 1 && empty($rs['lime_rs_sid'])) { ?>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
}
|
||||
else if (!empty($rs['lime_rs_sid'])) {
|
||||
echo "<div class='well text-center'><a href='" . LIME_URL . "admin/admin.php?sid={$rs['lime_rs_sid']}'>" . T_("Edit respondent selection instrument in Limesurvey") . "</a></div>"; }
|
||||
}
|
||||
?>
|
||||
|
||||
<div class="panel panel-default">
|
||||
@@ -557,7 +543,7 @@ else
|
||||
|
||||
$sql = "SELECT
|
||||
CONCAT(' <b class=\'badge\'>',questionnaire_id,'</b> ') as qid,
|
||||
CONCAT('<h4>',description,'</h4>') as description,
|
||||
CONCAT('<h4>',q.description,'</h4>') as description,
|
||||
CASE WHEN enabled = 0 THEN
|
||||
CONCAT(' <span class=\'btn label label-default\'>" . TQ_("Disabled") . "</span> ')
|
||||
ELSE
|
||||
@@ -569,7 +555,7 @@ else
|
||||
CONCAT(' <a href=\'\' data-toggle=\'confirmation\' data-title=\'" . TQ_("ARE YOU SURE?") . "\' data-btnOkLabel=\'" . TQ_("Yes") . "\' data-btnCancelLabel=\'" . TQ_("No") . "\' data-href=\'?disable=',questionnaire_id,'\'><i data-toggle=\'tooltip\' title=\'" . TQ_("Disable") . "\' class=\'fa fa-toggle-on fa-3x\'></i></a> ')
|
||||
END as enabledisable,
|
||||
CONCAT('<a href=\'?modify=',questionnaire_id,'\' class=\'btn\' title=\'" . TQ_("Edit Questionnaire") . " ',questionnaire_id,'\' data-toggle=\'tooltip\'><i class=\'fa fa-edit fa-2x \'></i></a>') as modify,
|
||||
CONCAT('<a href=\'" . LIME_URL . "admin/admin.php?sid=',lime_sid,'\' class=\'btn\' title=\'" . T_("Edit Lime survey") . " ',lime_sid,'\' data-toggle=\'tooltip\'><i class=\'btn-lime fa fa-lemon-o fa-2x\'></i></a>') as inlime,
|
||||
CONCAT('<a href=\'', entry_url, '/admin/survey/sa/view/surveyid/',lime_sid,'\' class=\'btn\' title=\'" . T_("Edit Lime survey") . " ',lime_sid,'\' data-toggle=\'tooltip\'><i class=\'btn-lime fa fa-lemon-o fa-2x\'></i></a>') as inlime,
|
||||
CASE WHEN enabled = 0 THEN
|
||||
CONCAT('<i class=\'btn fa fa-calendar fa-2x\' style=\'color:lightgrey;\'></i>')
|
||||
ELSE
|
||||
@@ -612,7 +598,8 @@ else
|
||||
ELSE
|
||||
CONCAT('<a href=\'casestatus.php?questionnaire_id=',questionnaire_id,'\' class=\'btn\' title=\'" . TQ_("Case status and assignment"). "\' data-toggle=\'tooltip\'><i class=\'fa fa-question-circle fa-2x\'></i></a>')
|
||||
END as casestatus
|
||||
FROM questionnaire";
|
||||
FROM questionnaire as q, remote as r
|
||||
WHERE r.id = q.remote_id";
|
||||
$rs = $db->GetAll($sql);
|
||||
|
||||
$columns = array("qid","description","status","enabledisable","outcomes","calls","casestatus","shifts","assample","quotareport","dataout","modify","setoutcomes","inlime","prefill","deletee");
|
||||
|
||||
Reference in New Issue
Block a user