mirror of
https://github.com/ACSPRI/queXS
synced 2024-04-02 12:12:16 +00:00
Make sure interviewer flag is set for admin operators
This commit is contained in:
@@ -213,7 +213,7 @@ if ($questionnaire_id)
|
||||
$ls = $db->GetRow($sql);
|
||||
$lsid = $ls['lime_sid'];
|
||||
|
||||
print " <a href='" . LIME_URL . "admin/admin.php?action=exportresults&sid=$lsid' class='btn btn-default fa btn-lime'>". T_("Download data for this questionnaire via Limesurvey") . "</a></div>";
|
||||
print " <a href='" . LIME_URL . "admin/admin.php?action=exportresults&sid=$lsid&interviewer=1' class='btn btn-default fa btn-lime'>". T_("Download data for this questionnaire via Limesurvey") . "</a></div>";
|
||||
|
||||
print "<div class='form-group clearfix'><h3 class='col-sm-4 text-right'>" . T_("Please select a sample") . ": </h3>";
|
||||
$sample_import_id = false;
|
||||
@@ -222,7 +222,7 @@ if ($questionnaire_id)
|
||||
|
||||
if ($sample_import_id)
|
||||
{
|
||||
print " <a href='" .LIME_URL . "admin/admin.php?action=exportresults&sid=$lsid&quexsfilterinc=$questionnaire_id:$sample_import_id' class='btn btn-default fa btn-lime'>" . T_("Download data for this sample via Limesurvey") . "</a></div>";
|
||||
print " <a href='" .LIME_URL . "admin/admin.php?action=exportresults&interviewer=1&sid=$lsid&quexsfilterinc=$questionnaire_id:$sample_import_id' class='btn btn-default fa btn-lime'>" . T_("Download data for this sample via Limesurvey") . "</a></div>";
|
||||
//get sample vars
|
||||
$sql = "SELECT sivr.var_id as value, sivr.var as description
|
||||
FROM `sample_import_var_restrict` as sivr
|
||||
|
||||
@@ -119,11 +119,11 @@ 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=<?php echo LIME_URL ;?>admin/admin.php?action=newsurvey&interviewer=1"><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=<?php echo LIME_URL ;?>admin/admin.php?interviewer=1"><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>
|
||||
|
||||
@@ -196,7 +196,7 @@ if (!empty($surveys)){?>
|
||||
</div>
|
||||
<div class='col-sm-4'>
|
||||
<strong><?php echo T_("or") ;?> </strong>
|
||||
<a class="btn btn-lime" href="<?php echo LIME_URL ;?>admin/admin.php?action=newsurvey"><i class="fa fa-lemon-o text-danger"></i> <?php echo T_("Create an instrument in Limesurvey") ;?></a>
|
||||
<a class="btn btn-lime" href="<?php echo LIME_URL ;?>admin/admin.php?action=newsurvey&interviewer=1"><i class="fa fa-lemon-o text-danger"></i> <?php echo T_("Create an instrument in Limesurvey") ;?></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -402,9 +402,9 @@ $ckeditorConfig = array("toolbar" => array(array("tokens","-","Source"),
|
||||
else { ?>
|
||||
<div class='col-sm-6 col-sm-offset-1'>
|
||||
<h3 class="alert alert-warning"> <?php echo T_("NO active Lime surveys available");?> </h3>
|
||||
<a class="btn btn-lime btn-lg btn-block" href="<?php echo LIME_URL ;?>admin/admin.php?action=newsurvey"><i class="fa fa-lemon-o text-danger"></i> <?php echo T_("Create an instrument in Limesurvey");?> </a>
|
||||
<a class="btn btn-lime btn-lg btn-block" href="<?php echo LIME_URL ;?>admin/admin.php?action=newsurvey&interviewer=1"><i class="fa fa-lemon-o text-danger"></i> <?php echo T_("Create an instrument in Limesurvey");?> </a>
|
||||
<h4 class="text-center"><?php echo T_("or"); ?></h4>
|
||||
<a class="btn btn-lime btn-lg btn-block" href="<?php echo LIME_URL ;?>admin/admin.php?action=listsurveys"><i class="fa fa-lemon-o text-danger"></i> <?php echo T_("Administer instruments with Limesurvey");?> </a>
|
||||
<a class="btn btn-lime btn-lg btn-block" href="<?php echo LIME_URL ;?>admin/admin.php?action=listsurveys&interviewer=1"><i class="fa fa-lemon-o text-danger"></i> <?php echo T_("Administer instruments with Limesurvey");?> </a>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
|
||||
@@ -376,7 +376,7 @@ if (isset($_GET['modify']))
|
||||
</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>"; ?>
|
||||
<?php echo "<a class='btn btn-default btn-lime pull-right' href='" . LIME_URL . "admin/admin.php?sid={$rs['lime_sid']}&interviewer=1'><i class='fa fa-edit' style='color:blue;'></i> " . T_("Edit instrument in Limesurvey") . " </a>"; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -497,7 +497,7 @@ if ($rs['respondent_selection'] == 1 && empty($rs['lime_rs_sid'])) { ?>
|
||||
<?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>"; }
|
||||
echo "<div class='well text-center'><a href='" . LIME_URL . "admin/admin.php?sid={$rs['lime_rs_sid']}&interviewer=1'>" . T_("Edit respondent selection instrument in Limesurvey") . "</a></div>"; }
|
||||
?>
|
||||
|
||||
<div class="panel panel-default">
|
||||
@@ -569,7 +569,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=\'" . LIME_URL . "admin/admin.php?interviewer=1&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,
|
||||
CASE WHEN enabled = 0 THEN
|
||||
CONCAT('<i class=\'btn fa fa-calendar fa-2x\' style=\'color:lightgrey;\'></i>')
|
||||
ELSE
|
||||
|
||||
@@ -266,7 +266,7 @@ if ($questionnaire_id)
|
||||
$completions = $rs['count'];
|
||||
$perc = ROUND(($completions / $r['qlimit']) * 100,2);
|
||||
|
||||
$report[] = array("strata" => "<a href='" . LIME_URL . "/admin/admin.php?action=quotas&sid={$r['sid']}"a_id={$r['id']}&subaction=quota_editquota'>" . $r['name'] . "</a>", "quota" => $r['qlimit'], "completions" => $completions, "perc" => $perc);
|
||||
$report[] = array("strata" => "<a href='" . LIME_URL . "/admin/admin.php?interviewer=1&action=quotas&sid={$r['sid']}"a_id={$r['id']}&subaction=quota_editquota'>" . $r['name'] . "</a>", "quota" => $r['qlimit'], "completions" => $completions, "perc" => $perc);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -495,7 +495,7 @@ if ($case_id != false)
|
||||
$id = get_lime_id($case_id);
|
||||
print "<div class='panel-body'>";
|
||||
if ($id)
|
||||
print "<h4><a href='" . LIME_URL . "admin/admin.php?action=dataentry&sid=$sid&subaction=edit&id=$id' class='btn btn-default btn-lime'><i class='fa fa-lemon-o fa-lg'></i> " . T_("Modify responses for this case") . "</a></h4>";
|
||||
print "<h4><a href='" . LIME_URL . "admin/admin.php?interviewer=1&action=dataentry&sid=$sid&subaction=edit&id=$id' class='btn btn-default btn-lime'><i class='fa fa-lemon-o fa-lg'></i> " . T_("Modify responses for this case") . "</a></h4>";
|
||||
else
|
||||
print "<div class='alert text-danger' role='alert'>" . T_("Case not yet started in Limesurvey") . "</div>";
|
||||
print "</div></div>";
|
||||
|
||||
Reference in New Issue
Block a user