mirror of
https://github.com/ACSPRI/queXS
synced 2024-04-02 12:12:16 +00:00
3 in 1 page for better usage and simulaneous view,
updated sidebar menu in index.php
This commit is contained in:
313
admin/assigntimeslots.php
Normal file
313
admin/assigntimeslots.php
Normal file
@@ -0,0 +1,313 @@
|
||||
<?php
|
||||
/**
|
||||
* Assign availability groups to a questionnaire
|
||||
*
|
||||
*
|
||||
* This file is part of queXS
|
||||
*
|
||||
* queXS is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* queXS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with queXS; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
*
|
||||
* @author Adam Zammit <adam.zammit@acspri.org.au>
|
||||
* @copyright Australian Consortium for Social and Political Research Inc (ACSPRI) 2011
|
||||
* @package queXS
|
||||
* @subpackage admin
|
||||
* @link http://www.acspri.org.au queXS was writen for ACSPRI
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php The GNU General Public License (GPL) Version 2
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* Configuration file
|
||||
*/
|
||||
include("../config.inc.php");
|
||||
|
||||
/**
|
||||
* Database file
|
||||
*/
|
||||
include ("../db.inc.php");
|
||||
|
||||
/**
|
||||
* XHTML functions
|
||||
*/
|
||||
include("../functions/functions.xhtml.php");
|
||||
|
||||
/**
|
||||
* Display functions
|
||||
*/
|
||||
include("../functions/functions.display.php");
|
||||
|
||||
/**
|
||||
* Input functions
|
||||
*/
|
||||
include("../functions/functions.input.php");
|
||||
|
||||
$css = array(
|
||||
"../include/bootstrap-3.3.2/css/bootstrap.min.css",
|
||||
"../include/bootstrap-3.3.2/css/bootstrap-theme.min.css",
|
||||
//"../include/font-awesome-4.3.0/css/font-awesome.css",
|
||||
"../css/custom.css"
|
||||
);
|
||||
$js_head = array(
|
||||
);
|
||||
$js_foot = array(
|
||||
"../js/window.js",
|
||||
//"../js/custom.js"
|
||||
);
|
||||
|
||||
global $db;
|
||||
|
||||
//block availability
|
||||
if (isset($_GET['questionnaire_id']) && isset($_GET['av_availability_group']))
|
||||
{
|
||||
//need to add availability_group to questionnaire
|
||||
$questionnaire_id = bigintval($_GET['questionnaire_id']);
|
||||
$availability_group = bigintval($_GET['av_availability_group']);
|
||||
|
||||
$sql = "INSERT INTO questionnaire_availability(questionnaire_id,availability_group_id)
|
||||
VALUES('$questionnaire_id','$availability_group')";
|
||||
$db->Execute($sql);
|
||||
}
|
||||
|
||||
if (isset($_GET['questionnaire_id']) && isset($_GET['av_ravailability_group']))
|
||||
{
|
||||
//need to remove rsid from questionnaire
|
||||
$questionnaire_id = bigintval($_GET['questionnaire_id']);
|
||||
$availability_group = bigintval($_GET['av_ravailability_group']);
|
||||
|
||||
$sql = "DELETE FROM questionnaire_availability
|
||||
WHERE questionnaire_id = '$questionnaire_id'
|
||||
AND availability_group_id = '$availability_group'";
|
||||
$db->Execute($sql);
|
||||
}
|
||||
|
||||
//block call_attempts
|
||||
if (isset($_GET['questionnaire_id']) && isset($_GET['ca_availability_group']))
|
||||
{
|
||||
//need to add availability_group to questionnaire
|
||||
$questionnaire_id = bigintval($_GET['questionnaire_id']);
|
||||
$availability_group = bigintval($_GET['ca_availability_group']);
|
||||
|
||||
$sql = "INSERT INTO questionnaire_timeslot(questionnaire_id,availability_group_id)
|
||||
VALUES('$questionnaire_id','$availability_group')";
|
||||
$db->Execute($sql);
|
||||
}
|
||||
|
||||
if (isset($_GET['questionnaire_id']) && isset($_GET['ca_ravailability_group']))
|
||||
{
|
||||
//need to remove rsid from questionnaire
|
||||
$questionnaire_id = bigintval($_GET['questionnaire_id']);
|
||||
$availability_group = bigintval($_GET['ca_ravailability_group']);
|
||||
|
||||
$sql = "DELETE FROM questionnaire_timeslot
|
||||
WHERE questionnaire_id = '$questionnaire_id'
|
||||
AND availability_group_id = '$availability_group'";
|
||||
$db->Execute($sql);
|
||||
}
|
||||
|
||||
|
||||
//block call_attempts by sample
|
||||
if (isset($_GET['questionnaire_id']) && isset($_GET['sample_import_id']) && isset($_GET['qs_availability_group']))
|
||||
{
|
||||
//need to add availability_group to questionnaire
|
||||
$questionnaire_id = bigintval($_GET['questionnaire_id']);
|
||||
$sample_import_id = bigintval($_GET['sample_import_id']);
|
||||
$availability_group = bigintval($_GET['qs_availability_group']);
|
||||
|
||||
$sql = "INSERT INTO questionnaire_sample_timeslot (questionnaire_id,sample_import_id,availability_group_id)
|
||||
VALUES('$questionnaire_id','$sample_import_id','$availability_group')";
|
||||
$db->Execute($sql);
|
||||
}
|
||||
|
||||
if (isset($_GET['questionnaire_id']) && isset($_GET['sample_import_id']) && isset($_GET['qs_ravailability_group']))
|
||||
{
|
||||
//need to remove rsid from questionnaire
|
||||
$questionnaire_id = bigintval($_GET['questionnaire_id']);
|
||||
$sample_import_id = bigintval($_GET['sample_import_id']);
|
||||
$availability_group = bigintval($_GET['qs_ravailability_group']);
|
||||
|
||||
$sql = "DELETE FROM questionnaire_sample_timeslot
|
||||
WHERE questionnaire_id = '$questionnaire_id'
|
||||
AND sample_import_id = '$sample_import_id'
|
||||
AND availability_group_id = '$availability_group'";
|
||||
$db->Execute($sql);
|
||||
}
|
||||
|
||||
$questionnaire_id = false;
|
||||
if (isset($_GET['questionnaire_id'])) $questionnaire_id = bigintval($_GET['questionnaire_id']);
|
||||
$sample_import_id = false;
|
||||
if (isset($_GET['sample_import_id'])) $sample_import_id = bigintval($_GET['sample_import_id']);
|
||||
|
||||
xhtml_head(T_("Assign Time slots"),true,$css,$js_head);//false,array("../js/window.js")
|
||||
|
||||
print "<div class='clearfix form-group'><h3 class='col-sm-6 text-right text-uppercase'>" . T_("Select a questionnaire") . ":</h3>";
|
||||
display_questionnaire_chooser($questionnaire_id,false, "form-inline", "form-control");
|
||||
print "</div>";
|
||||
if ($questionnaire_id != false)
|
||||
{
|
||||
|
||||
//page questionnaireavailability.php
|
||||
print "<div class=col-sm-4><h2>" . T_("Time slot groups") . "</h2>";
|
||||
print "<div class='well'>" . T_("Assigning an availability group to a questionnaire will allow interviewers to select from those groups to restrict calls to a particular case to the times within the group") ."</div>";
|
||||
|
||||
$sql = "SELECT q.availability_group_id,a.description as description, CONCAT('<a href=\'?questionnaire_id=$questionnaire_id&av_ravailability_group=', a.availability_group_id,'\' >" . T_("Click to unassign") . "</a>') as link
|
||||
FROM questionnaire_availability as q, availability_group as a
|
||||
WHERE q.availability_group_id = a.availability_group_id
|
||||
AND q.questionnaire_id = '$questionnaire_id'";
|
||||
|
||||
$qs = $db->GetAll($sql);
|
||||
print "</br></br></br><div class='panel-body'>";
|
||||
|
||||
if (empty($qs))
|
||||
{
|
||||
print "<h4 class='alert text-danger'>" . T_("There are no time slots groups selected for this questionnaire") . "</h4>";
|
||||
}
|
||||
else
|
||||
{
|
||||
print "<h4>" . T_("Time slots groups selected for this questionnaire") . "</h4>";
|
||||
xhtml_table ($qs,array("availability_group_id","description","link"),false,"table table-hover");
|
||||
}
|
||||
print "</div>";
|
||||
$sql = "SELECT si.availability_group_id,si.description
|
||||
FROM availability_group as si
|
||||
LEFT JOIN questionnaire_availability as q ON (q.questionnaire_id = '$questionnaire_id' AND q.availability_group_id = si.availability_group_id)
|
||||
WHERE q.questionnaire_id is NULL";
|
||||
|
||||
$qs = $db->GetAll($sql);
|
||||
|
||||
if (!empty($qs))
|
||||
{
|
||||
print "<div class='panel-body'>";
|
||||
//print "<h3>" . T_("Add time slot to this questionnaire:") . "</h3>";
|
||||
print "<form action='' method='get'><div class='pull-left'><select class='form-control ' name='av_availability_group' id='av_availability_group'>";
|
||||
foreach($qs as $q)
|
||||
{
|
||||
print "<option value=\"{$q['availability_group_id']}\">{$q['description']}</option>";
|
||||
}
|
||||
print "</select></div>
|
||||
<input type='hidden' name='questionnaire_id' value='$questionnaire_id'/>
|
||||
 <input type='submit' class='btn btn-default' name='add_av_availability' value='" . T_("Add time slot group") . "'/>
|
||||
</form></div>";
|
||||
}
|
||||
|
||||
print "</div>";
|
||||
|
||||
|
||||
|
||||
//page questionnairecatimeslots.php
|
||||
print "<div class=col-sm-4><h2>" . T_("Call attempt time slots") . "</h2>";
|
||||
print "<div class='well'>" . T_("Assigning call attempt time slots to questionnaires will only allow cases to be attempted in a time slot for the n + 1th time where it has been attempted at least n times in all assigned timeslots. Please note timeslots must cover all possible time periods otherwise no cases will be available during missing timeslots.") ."</div>";
|
||||
|
||||
$sql = "SELECT q.availability_group_id,a.description as description, CONCAT('<a href=\'?questionnaire_id=$questionnaire_id&ca_ravailability_group=', q.availability_group_id,'\' >" . T_("Click to unassign") . "</a>') as link
|
||||
|
||||
FROM questionnaire_timeslot as q, availability_group as a
|
||||
WHERE q.availability_group_id = a.availability_group_id
|
||||
AND q.questionnaire_id = '$questionnaire_id'";
|
||||
|
||||
$qs = $db->GetAll($sql);
|
||||
print "</br><div class='panel-body'>";
|
||||
if (empty($qs))
|
||||
{
|
||||
print "<h4 class='alert text-danger'>" . T_("There are no call attempt time slots selected for this questionnaire") . "</h4>";
|
||||
}
|
||||
else
|
||||
{
|
||||
print "<h4>" . T_("Call attempt time slots selected for this questionnaire") . "</h4>";
|
||||
xhtml_table ($qs,array("availability_group_id","description","link"),false,"table table-hover");
|
||||
}
|
||||
print "</div>";
|
||||
|
||||
$sql = "SELECT si.availability_group_id,si.description
|
||||
FROM availability_group as si
|
||||
LEFT JOIN questionnaire_timeslot as q ON (q.questionnaire_id = '$questionnaire_id' AND q.availability_group_id = si.availability_group_id)
|
||||
WHERE q.questionnaire_id is NULL";
|
||||
|
||||
$qs = $db->GetAll($sql);
|
||||
|
||||
if (!empty($qs))
|
||||
{
|
||||
print "<div class='panel-body'>";
|
||||
//print "<h3>" . T_("Add a call attempt time slot to this questionnaire:") . "</h3>";
|
||||
print "<form action='' method='get'><div class='pull-left'><select class='form-control ' name='ca_availability_group' id='ca_availability_group'>";
|
||||
foreach($qs as $q)
|
||||
{
|
||||
print "<option value=\"{$q['availability_group_id']}\">{$q['description']}</option>";
|
||||
}
|
||||
print "</select></div>
|
||||
<input type='hidden' name='questionnaire_id' value='$questionnaire_id'/>
|
||||
 <input type='submit' class='btn btn-default' name='add_ca_availability' value='" . TQ_("Add call attempt time slot") . "'/>
|
||||
</form></div>";
|
||||
}
|
||||
print "</div>";
|
||||
|
||||
//page questionnairetimeslosample.php
|
||||
print "<div class=col-sm-4><h2>" . T_("Call attempt time slots for sample") . "</h2>";
|
||||
print "<div class='well'>" . T_("Assigning call attempt time slots to questionnaires will only allow cases to be attempted in a time slot for the n + 1th time where it has been attempted at least n times in all assigned timeslots. Please note timeslots must cover all possible time periods otherwise no cases will be available during missing timeslots.") ."</div>";
|
||||
|
||||
print "<h3 class='pull-left'>" . T_("Sample") . ": </h3>";
|
||||
|
||||
$sample_import_id = false;
|
||||
if (isset($_GET['sample_import_id'])) $sample_import_id = bigintval($_GET['sample_import_id']);
|
||||
display_sample_chooser($questionnaire_id,$sample_import_id,false, "form-inline", "form-control");
|
||||
|
||||
if ($sample_import_id !== false)
|
||||
{
|
||||
$sql = "SELECT q.availability_group_id,a.description as description, CONCAT('<a href=\'?sample_import_id=$sample_import_id&questionnaire_id=$questionnaire_id&qs_ravailability_group=', q.availability_group_id,'\' >" . T_("Click to unassign") . "</a>') as link
|
||||
FROM questionnaire_sample_timeslot as q, availability_group as a
|
||||
WHERE q.availability_group_id = a.availability_group_id
|
||||
AND q.questionnaire_id = '$questionnaire_id'
|
||||
AND q.sample_import_id = '$sample_import_id'";
|
||||
|
||||
$qs = $db->GetAll($sql);
|
||||
|
||||
if (empty($qs))
|
||||
{
|
||||
print "<h4 class='alert text-danger'>" . T_("There are no call attempt time slots selected for this questionnaire sample") . "</h4>";
|
||||
}
|
||||
else
|
||||
{
|
||||
print "<h4>" . T_("Call attempt time slots selected for this sample") . ":</h4>";
|
||||
xhtml_table ($qs,array("availability_group_id","description","link"),false,"table table-hover");
|
||||
}
|
||||
|
||||
$sql = "SELECT si.availability_group_id,si.description
|
||||
FROM availability_group as si
|
||||
LEFT JOIN questionnaire_sample_timeslot as q ON (q.sample_import_id = '$sample_import_id' AND q.questionnaire_id = '$questionnaire_id' AND q.availability_group_id = si.availability_group_id)
|
||||
WHERE q.questionnaire_id is NULL";
|
||||
|
||||
$qs = $db->GetAll($sql);
|
||||
|
||||
if (!empty($qs))
|
||||
{
|
||||
print "<div class='panel-body'>";
|
||||
//print "<h3>" . T_("Add a call attempt time slot to this questionnaire sample:") . "</h3>";
|
||||
print "<form action='' method='get'><div class='pull-left'><select class='form-control ' name='qs_availability_group' id='qs_availability_group'>";
|
||||
foreach($qs as $q)
|
||||
{
|
||||
print "<option value=\"{$q['availability_group_id']}\">{$q['description']}</option>";
|
||||
}
|
||||
print "</select></div>
|
||||
<input type='hidden' name='questionnaire_id' value='$questionnaire_id'/>
|
||||
<input type='hidden' name='sample_import_id' value='$sample_import_id'/>
|
||||
 <input type='submit' name='add_qs_availability' class='btn btn-default' value='" . T_("Add call attempt time slot for sample") . "'/>
|
||||
</form></div>";
|
||||
}
|
||||
}
|
||||
print "</div>";
|
||||
}
|
||||
|
||||
xhtml_foot($js_foot);
|
||||
?>
|
||||
395
admin/index.php
395
admin/index.php
@@ -1,197 +1,198 @@
|
||||
<?php
|
||||
/*
|
||||
|
||||
* Display an index of Admin tools
|
||||
*
|
||||
*
|
||||
* This file is part of queXS
|
||||
*
|
||||
* queXS is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* queXS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with queXS; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
*
|
||||
* @author Adam Zammit <adam.zammit@deakin.edu.au>
|
||||
* @copyright Deakin University 2007,2008
|
||||
* @package queXS
|
||||
* @subpackage admin
|
||||
* @link http://www.deakin.edu.au/dcarf/ queXS was writen for DCARF - Deakin Computer Assisted Research Facility
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php The GNU General Public License (GPL) Version 2
|
||||
*/
|
||||
|
||||
/**
|
||||
* Language file
|
||||
*/
|
||||
include ("../lang.inc.php");
|
||||
|
||||
/**
|
||||
* Config file
|
||||
*/
|
||||
include ("../config.inc.php");
|
||||
include ("../functions/functions.xhtml.php");
|
||||
$username = $_SERVER['PHP_AUTH_USER'];
|
||||
?>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" style="" class=" " >
|
||||
<head>
|
||||
<meta charset="utf-8" >
|
||||
<title><?php echo T_("Administrative Tools") ;?> </title>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="description" content="">
|
||||
<meta name="author" content="">
|
||||
|
||||
<link rel="stylesheet" href="../include/bootstrap-3.3.2/css/bootstrap.min.css" />
|
||||
<link rel="stylesheet" href="../include/font-awesome-4.3.0/css/font-awesome.css" />
|
||||
<link rel="stylesheet" href="../css/style.css" />
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="page-header-fixed navbar navbar-fixed-top " role="banner">
|
||||
<div class="container" style=" width: auto; padding-left: 1px;">
|
||||
<div class="navbar-header">
|
||||
<a class="pull-left menubutton " href="#" style="width: 50px; padding-left: 10px;" data-toggle="tooltip" data-placement="right" title="<?php echo T_("Click to Collapse / Expand Sidebar MENU ");?>">
|
||||
<i class="fa fa-globe fa-2x fa-spin"></i></a>
|
||||
<a class="navbar-brand" href="index.php"><?php echo COMPANY_NAME ;?> <span class="bold"><?php echo ADMIN_PANEL_NAME ;?></span></a>
|
||||
</div >
|
||||
|
||||
<ul class="nav navbar-nav pull-right">
|
||||
<li class="dropdown pull-right user-data">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" style=" min-width: 160px;">
|
||||
<i class="fa fa-user fa fa-fw "></i><?php print T_("Logged as:") . " " . $username ;?>
|
||||
</a>
|
||||
<!--- User menu // not connected to pages so not working yet // could be hidden -->
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li><a href="?page=settings.php"><i class="fa fa-cogs fa-fw "></i> <?php print T_("Settings"); ?></a></li>
|
||||
<li><a href="../screenloc.php"><i class="fa fa-lock fa-fw "></i> <?php print T_("Lock Screen"); ?></a></li>
|
||||
<li><a href="../logout.php"><i class="fa fa-sign-out fa-fw "></i> <?php print T_("Logout"); ?> </a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="content ">
|
||||
|
||||
<!-- Sidebar menu -->
|
||||
<div class="sidebar" >
|
||||
<ul class="panel-group nav" id="nav">
|
||||
<li><a class="" href="?page=dashboard.php"><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="">
|
||||
<li><a href="?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="?page=new.php"><i class="fa fa-plus-circle fa-fw"></i><?php print T_("Create a new questionnaire") ;?></a></li>
|
||||
<li><a href="?page=questionnairelist.php"><i class="fa fa-list fa-fw"></i><?php print T_("Questionnaire management") ;?></a></li>
|
||||
<li><a href="?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="?page=questionnaireprefill.php"><i class="fa fa-thumb-tack fa-fw"></i><?php print T_("Pre-fill questionnaire") ;?></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="has_sub"><a href="" class=""><i class="fa fa-book fa-lg"></i><span><?php print T_("Samples") ;?></span></a>
|
||||
<ul style="">
|
||||
<li><a href="?page=import.php"><i class="fa fa-upload fa-fw"></i><?php print T_("Import a sample file") ;?></a></li>
|
||||
<li><a href="?page=samplelist.php"><i class="fa fa-list fa-fw"></i><?php print T_("Sample management") ;?></a></li>
|
||||
<li><a href="?page=samplesearch.php"><i class="fa fa-search fa-fw"></i><?php print T_("Search the sample") ;?></a></li>
|
||||
<li><a href="?page=assignsample.php"><i class="fa fa-link fa-fw"></i><?php print T_("Assign samples to questionnaires") ;?></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="has_sub"><a href="" class=""><i class="fa fa-calendar fa-lg"></i><span><?php print T_("Time slots and shifts") ;?></span></a>
|
||||
<ul class="" style="">
|
||||
<li><a href="?page=availabilitygroup.php"><i class="fa fa-clock-o fa-fw"></i><?php print T_("Manage Time slots") ;?></a></li>
|
||||
<li><a href="?page=questionnaireavailability.php"><i class="fa fa-thumb-tack fa-fw"></i><?php print T_("Assign Time slots to questionnaires") ;?></a></li>
|
||||
<li><a href="?page=questionnairecatimeslots.php"><i class="fa fa-link fa-fw"></i><?php print T_("Assign call attempt time slots to questionnaire") ; ?></a></li>
|
||||
<li><a href="?page=questionnairecatimeslotssample.php"><i class="fa fa-link fa-fw"></i><?php print T_("Assign call attempt time slots to questionnaire sample") ; ?></a></li>
|
||||
<li><a href="?page=addshift.php"><i class="fa fa-calendar-o fa-fw"></i><?php print T_("Shift management") ;?></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="has_sub"><a href="" class=""><i class="fa fa-filter fa-lg"></i><span><?php print T_("Quotas") ;?></span></a>
|
||||
<ul style="">
|
||||
<li><a href="?page=quota.php"><i class="fa fa-list-ol fa-fw"></i><?php print T_("Quota management") ;?></a></li>
|
||||
<li><a href="?page=quotarow.php"><i class="fa fa-list-ul fa-fw "></i><?php print T_("Quota row management") ;?></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="has_sub"><a href="" class=""><i class="fa fa-lg fa-users"></i><span><?php print T_("Operators") ;?></span></a>
|
||||
<ul class="" style="">
|
||||
<li><a href="?page=operators.php"><i class="fa fa-user-plus fa-fw"></i><?php print T_("Add operators to the system") ;?></a></li>
|
||||
<li><a href="?page=operatorlist.php"><i class="fa fa-user fa-fw"></i><?php print T_("Operator management") ;?></a></li>
|
||||
<li><a href="?page=exten_tab.php "><i class="fa fa-phone-square fa-fw"></i><?php print T_("Extension status") ;?></a></li>
|
||||
<li><a href="?page=operatorquestionnaire.php"><i class="fa fa-link fa-fw"></i><?php print T_("Assign operators to questionnaires") ;?></a></li>
|
||||
<li><a href="?page=operatorskill.php"><i class="fa fa-user-md fa-fw"></i><?php print T_("Modify operator skills") ;?></a></li>
|
||||
<li><a href="?page=operatorperformance.php"><i class="fa fa-signal fa-fw"></i><?php print T_("Operator performance") ;?></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="has_sub"><a href="" class=""><i class="fa fa-lg fa-line-chart"></i><span><?php print T_("Results") ;?></span></a>
|
||||
<ul class="" style="">
|
||||
<li><a href="?page=displayappointments.php"><i class="fa fa-list-ul fa-fw"></i><span><?php print T_("Display all future appointments") ;?></span></a></li>
|
||||
<li><a href="?page=samplecallattempts.php"><i class="fa fa-table fa-fw"></i><?php print T_("Sample call attempts report") ;?></a></li>
|
||||
<li><a href="?page=callhistory.php" class=""><i class="fa fa-history fa-fw"></i><?php print T_("Call history") ;?></a></li>
|
||||
<li><a href="?page=shiftreport.php"><i class="fa fa-th-large fa-fw"></i><?php print T_("Shift reports") ;?></a></li>
|
||||
<li><a href="?page=quotareport.php" ><i class="fa fa-filter fa-fw"></i><?php print T_("Quota report") ;?></a></li>
|
||||
<li><a href="?page=outcomes.php"><i class="fa fa-bar-chart fa-fw"></i><?php print T_("Questionnaire outcomes") ;?></a></li>
|
||||
<li><a href="?page=dataoutput.php"><i class="fa fa-download fa-fw"></i><?php print T_("Data output") ;?></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="has_sub"><a href="" class=""><i class="fa fa-lg fa-user-secret fa-fw"></i><span><?php print T_("Clients") ;?></span></a>
|
||||
<ul class="" style="">
|
||||
<li><a href="?page=clients.php"><i class="fa fa-lg fa-user-plus fa-fw"></i><?php print T_("Add clients to the system") ;?></a></li>
|
||||
<li><a href="?page=clientquestionnaire.php"><i class="fa fa-link fa-fw"></i><?php print T_("Assign clients to questionnaires") ;?></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="has_sub"><a href="" class=""><i class="fa fa-lg fa-briefcase"></i><span><?php print T_("Supervisor functions") ;?></span></a>
|
||||
<ul class="" style="">
|
||||
<li><a href="?page=supervisor.php"><i class="fa fa-link fa-fw"></i><?php print T_("Assign outcomes to cases") ;?></a></li>
|
||||
<li><a href="?page=casestatus.php"><i class="fa fa-question-circle fa-fw"></i><?php print T_("Case status and assignment") ;?></a></li>
|
||||
<li><a href="?page=bulkappointment.php"><i class="fa fa-th-list fa-fw"></i><?php print T_("Bulk appointment generator") ;?></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="has_sub"><a href="" class=""><i class="fa fa-lg fa-gear"></i><span><?php print T_("System settings") ;?></span></a>
|
||||
<ul class="" style="">
|
||||
<li><a href="?page=timezonetemplate.php"><i class="fa fa-globe fa-fw"></i><?php print T_("Set default timezone list") ;?></a></li>
|
||||
<li><a href="?page=shifttemplate.php"><i class="fa fa-calendar fa-fw"></i><?php print T_("Set default shift times") ;?></a></li>
|
||||
<li><a href="?page=callrestrict.php"><i class="fa fa-clock-o fa-fw"></i><?php print T_("Set call restriction times") ;?></a></li>
|
||||
<li><a href="?page=centreinfo.php"><i class="fa fa-university fa-fw"></i><?php print T_("Set centre information") ;?></a></li>
|
||||
<li><a href="?page=supervisorchat.php"><i class="fa fa-comments-o fa-fw"></i><?php print T_("Supervisor chat") ;?></a></li>
|
||||
<li><a href="?page=systemsort.php"><i class="fa fa-sort fa-fw"></i><?php print T_("System wide case sorting") ;?></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<?php
|
||||
if (VOIP_ENABLED == true )
|
||||
{ ; ?>
|
||||
<li class="has_sub"><a href="" class=""><i class="fa fa-lg fa-tty"></i><span><?php print T_("VoIP");?><i class="fa fa-toggle-on pull-right" style="font-size:1.5em !important; margin-right:20px;"></i></span></a>
|
||||
<ul class="" style="">
|
||||
<li><a href="?page=voipmonitor.php"><i class="fa fa-power-off v"></i><?php print T_("Start and monitor VoIP") ;?></a></li>
|
||||
<li><a href="?page=extensionstatus.php"><i class="fa fa-asterisk fa-fw"></i><?php print T_("Extension status") ;?></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<?php } else {; ?>
|
||||
<li class=""><a href="" class=""><i class="fa fa-lg fa-tty"></i><span><?php print T_("VoIP") . " " . T_("Disabled") ;?><i class="fa fa-toggle-off pull-right" style="font-size:1.5em !important; margin-right:20px;"></i></span></a></li>
|
||||
<?php }; ?>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<!-- Main page container -->
|
||||
<?php $page = "callhistory.php"; if (isset($_GET['page'])) $page = $_GET['page']; ?>
|
||||
<div class="mainbar" id=" "><?php xhtml_object($page,' '); ?></div>
|
||||
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
|
||||
<script src="../js/jquery-2.1.3.min.js"></script>
|
||||
<script src="../include/bootstrap-3.3.2/js/bootstrap.min.js"></script>
|
||||
<script type="text/javascript" src="../js/admin.js"></script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
<?php
|
||||
/*
|
||||
|
||||
* Display an index of Admin tools
|
||||
*
|
||||
*
|
||||
* This file is part of queXS
|
||||
*
|
||||
* queXS is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* queXS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with queXS; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
*
|
||||
* @author Adam Zammit <adam.zammit@deakin.edu.au>
|
||||
* @copyright Deakin University 2007,2008
|
||||
* @package queXS
|
||||
* @subpackage admin
|
||||
* @link http://www.deakin.edu.au/dcarf/ queXS was writen for DCARF - Deakin Computer Assisted Research Facility
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php The GNU General Public License (GPL) Version 2
|
||||
*/
|
||||
|
||||
/**
|
||||
* Language file
|
||||
*/
|
||||
include ("../lang.inc.php");
|
||||
|
||||
/**
|
||||
* Config file
|
||||
*/
|
||||
include ("../config.inc.php");
|
||||
include ("../functions/functions.xhtml.php");
|
||||
$username = $_SERVER['PHP_AUTH_USER'];
|
||||
?>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" style="" class=" " >
|
||||
<head>
|
||||
<meta charset="utf-8" >
|
||||
<title><?php echo T_("Administrative Tools") ;?> </title>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="description" content="">
|
||||
<meta name="author" content="">
|
||||
|
||||
<link rel="stylesheet" href="../include/bootstrap-3.3.2/css/bootstrap.min.css" />
|
||||
<link rel="stylesheet" href="../include/font-awesome-4.3.0/css/font-awesome.css" />
|
||||
<link rel="stylesheet" href="../css/style.css" />
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="page-header-fixed navbar navbar-fixed-top " role="banner">
|
||||
<div class="container" style=" width: auto; padding-left: 1px;">
|
||||
<div class="navbar-header">
|
||||
<a class="pull-left menubutton " href="#" style="width: 50px; padding-left: 10px;" data-toggle="tooltip" data-placement="right" title="<?php echo T_("Click to Collapse / Expand Sidebar MENU ");?>">
|
||||
<i class="fa fa-globe fa-2x fa-spin"></i></a>
|
||||
<a class="navbar-brand" href="index.php"><?php echo COMPANY_NAME ;?> <span class="bold"><?php echo ADMIN_PANEL_NAME ;?></span></a>
|
||||
</div >
|
||||
|
||||
<ul class="nav navbar-nav pull-right">
|
||||
<li class="dropdown pull-right user-data">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" style=" min-width: 160px;">
|
||||
<i class="fa fa-user fa fa-fw "></i><?php print T_("Logged as:") . " " . $username ;?>
|
||||
</a>
|
||||
<!--- User menu // not connected to pages so not working yet // could be hidden -->
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li><a href="?page=settings.php"><i class="fa fa-cogs fa-fw "></i> <?php print T_("Settings"); ?></a></li>
|
||||
<li><a href="../screenloc.php"><i class="fa fa-lock fa-fw "></i> <?php print T_("Lock Screen"); ?></a></li>
|
||||
<li><a href="../logout.php"><i class="fa fa-sign-out fa-fw "></i> <?php print T_("Logout"); ?> </a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="content ">
|
||||
|
||||
<!-- Sidebar menu -->
|
||||
<div class="sidebar" >
|
||||
<ul class="panel-group nav" id="nav">
|
||||
<li><a class="" href="?page=dashboard.php"><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="">
|
||||
<li><a href="?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="?page=new.php"><i class="fa fa-plus-circle fa-fw"></i><?php print T_("Create a new questionnaire") ;?></a></li>
|
||||
<li><a href="?page=questionnairelist.php"><i class="fa fa-list fa-fw"></i><?php print T_("Questionnaire management") ;?></a></li>
|
||||
<li><a href="?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="?page=questionnaireprefill.php"><i class="fa fa-thumb-tack fa-fw"></i><?php print T_("Pre-fill questionnaire") ;?></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="has_sub"><a href="" class=""><i class="fa fa-book fa-lg"></i><span><?php print T_("Samples") ;?></span></a>
|
||||
<ul style="">
|
||||
<li><a href="?page=import.php"><i class="fa fa-upload fa-fw"></i><?php print T_("Import a sample file") ;?></a></li>
|
||||
<li><a href="?page=samplelist.php"><i class="fa fa-list fa-fw"></i><?php print T_("Sample management") ;?></a></li>
|
||||
<li><a href="?page=samplesearch.php"><i class="fa fa-search fa-fw"></i><?php print T_("Search the sample") ;?></a></li>
|
||||
<li><a href="?page=assignsample.php"><i class="fa fa-link fa-fw"></i><?php print T_("Assign samples to questionnaires") ;?></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="has_sub"><a href="" class=""><i class="fa fa-calendar fa-lg"></i><span><?php print T_("Time slots and shifts") ;?></span></a>
|
||||
<ul class="" style="">
|
||||
<li><a href="?page=assigntimeslots.php"><i class="fa fa-link fa-fw"></i><?php print T_("Assign Time slots") ;?></a></li>
|
||||
<!-- <li><a href="?page=questionnaireavailability.php"><i class="fa fa-thumb-tack fa-fw"></i><?php // print T_("Assign Time slots to questionnaires") ;?></a></li>
|
||||
<li><a href="?page=questionnairecatimeslots.php"><i class="fa fa-link fa-fw"></i><?php // print T_("Assign call attempt time slots to questionnaire") ; ?></a></li>
|
||||
<li><a href="?page=questionnairecatimeslotssample.php"><i class="fa fa-link fa-fw"></i><?php // print T_("Assign call attempt time slots to questionnaire sample") ; ?></a></li> -->
|
||||
<li><a href="?page=addshift.php"><i class="fa fa-calendar-o fa-fw"></i><?php print T_("Shift management") ;?></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="has_sub"><a href="" class=""><i class="fa fa-filter fa-lg"></i><span><?php print T_("Quotas") ;?></span></a>
|
||||
<ul style="">
|
||||
<li><a href="?page=quota.php"><i class="fa fa-list-ol fa-fw"></i><?php print T_("Quota management") ;?></a></li>
|
||||
<li><a href="?page=quotarow.php"><i class="fa fa-list-ul fa-fw "></i><?php print T_("Quota row management") ;?></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="has_sub"><a href="" class=""><i class="fa fa-lg fa-users"></i><span><?php print T_("Operators") ;?></span></a>
|
||||
<ul class="" style="">
|
||||
<li><a href="?page=operators.php"><i class="fa fa-user-plus fa-fw"></i><?php print T_("Add operators to the system") ;?></a></li>
|
||||
<li><a href="?page=operatorlist.php"><i class="fa fa-user fa-fw"></i><?php print T_("Operator management") ;?></a></li>
|
||||
<li><a href="?page=extensionstatus.php "><i class="fa fa-phone fa-fw"></i><?php print T_("Extension status") ;?></a></li>
|
||||
<li><a href="?page=operatorquestionnaire.php"><i class="fa fa-link fa-fw"></i><?php print T_("Assign operators to questionnaires") ;?></a></li>
|
||||
<li><a href="?page=operatorskill.php"><i class="fa fa-user-md fa-fw"></i><?php print T_("Modify operator skills") ;?></a></li>
|
||||
<li><a href="?page=operatorperformance.php"><i class="fa fa-signal fa-fw"></i><?php print T_("Operator performance") ;?></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="has_sub"><a href="" class=""><i class="fa fa-lg fa-line-chart"></i><span><?php print T_("Results") ;?></span></a>
|
||||
<ul class="" style="">
|
||||
<li><a href="?page=displayappointments.php"><i class="fa fa-clock-o fa-fw"></i><span><?php print T_("Display all future appointments") ;?></span></a></li>
|
||||
<li><a href="?page=samplecallattempts.php"><i class="fa fa-table fa-fw"></i><?php print T_("Sample call attempts report") ;?></a></li>
|
||||
<li><a href="?page=callhistory.php" class=""><i class="fa fa-history fa-fw"></i><?php print T_("Call history") ;?></a></li>
|
||||
<li><a href="?page=shiftreport.php"><i class="fa fa-th-large fa-fw"></i><?php print T_("Shift reports") ;?></a></li>
|
||||
<li><a href="?page=quotareport.php" ><i class="fa fa-filter fa-fw"></i><?php print T_("Quota report") ;?></a></li>
|
||||
<li><a href="?page=outcomes.php"><i class="fa fa-bar-chart fa-fw"></i><?php print T_("Questionnaire outcomes") ;?></a></li>
|
||||
<li><a href="?page=dataoutput.php"><i class="fa fa-download fa-fw"></i><?php print T_("Data output") ;?></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="has_sub"><a href="" class=""><i class="fa fa-lg fa-user-secret fa-fw"></i><span><?php print T_("Clients") ;?></span></a>
|
||||
<ul class="" style="">
|
||||
<li><a href="?page=clients.php"><i class="fa fa-lg fa-user-plus fa-fw"></i><?php print T_("Add clients to the system") ;?></a></li>
|
||||
<li><a href="?page=clientquestionnaire.php"><i class="fa fa-link fa-fw"></i><?php print T_("Assign clients to questionnaires") ;?></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="has_sub"><a href="" class=""><i class="fa fa-lg fa-briefcase"></i><span><?php print T_("Supervisor functions") ;?></span></a>
|
||||
<ul class="" style="">
|
||||
<li><a href="?page=supervisor.php"><i class="fa fa-link fa-fw"></i><?php print T_("Assign outcomes to cases") ;?></a></li>
|
||||
<li><a href="?page=casestatus.php"><i class="fa fa-question-circle fa-fw"></i><?php print T_("Case status and assignment") ;?></a></li>
|
||||
<li><a href="?page=bulkappointment.php"><i class="fa fa-th-list fa-fw"></i><?php print T_("Bulk appointment generator") ;?></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="has_sub"><a href="" class=""><i class="fa fa-lg fa-gear"></i><span><?php print T_("System settings") ;?></span></a>
|
||||
<ul class="" style="">
|
||||
<li><a href="?page=timezonetemplate.php"><i class="fa fa-globe fa-fw"></i><?php print T_("Set default timezone list") ;?></a></li>
|
||||
<li><a href="?page=availabilitygroup.php"><i class="fa fa-clock-o fa-fw"></i><?php print T_("Manage Time slots") ;?></a></li>
|
||||
<li><a href="?page=shifttemplate.php"><i class="fa fa-calendar fa-fw"></i><?php print T_("Set default shift times") ;?></a></li>
|
||||
<li><a href="?page=callrestrict.php"><i class="fa fa-clock-o fa-fw"></i><?php print T_("Set call restriction times") ;?></a></li>
|
||||
<li><a href="?page=centreinfo.php"><i class="fa fa-university fa-fw"></i><?php print T_("Set centre information") ;?></a></li>
|
||||
<li><a href="?page=supervisorchat.php"><i class="fa fa-comments-o fa-fw"></i><?php print T_("Supervisor chat") ;?></a></li>
|
||||
<li><a href="?page=systemsort.php"><i class="fa fa-sort fa-fw"></i><?php print T_("System wide case sorting") ;?></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<?php
|
||||
if (VOIP_ENABLED == true )
|
||||
{ ; ?>
|
||||
<li class="has_sub"><a href="" class=""><i class="fa fa-lg fa-tty"></i><span><?php print T_("VoIP");?><i class="fa fa-toggle-on pull-right" style="font-size:1.5em !important; margin-right:20px;"></i></span></a>
|
||||
<ul class="" style="">
|
||||
<li><a href="?page=voipmonitor.php"><i class="fa fa-power-off v"></i><?php print T_("Start and monitor VoIP") ;?></a></li>
|
||||
<!-- <li><a href="?page=extensionstatus.php"><i class="fa fa-asterisk fa-fw"></i><?php //print T_("Extension status") ;?></a></li> -->
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<?php } else {; ?>
|
||||
<li class=""><a href="" class=""><i class="fa fa-lg fa-tty"></i><span><?php print T_("VoIP") . " " . T_("Disabled") ;?><i class="fa fa-toggle-off pull-right" style="font-size:1.5em !important; margin-right:20px;"></i></span></a></li>
|
||||
<?php }; ?>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<!-- Main page container -->
|
||||
<?php $page = "questionnairelist.php"; if (isset($_GET['page'])) $page = $_GET['page']; ?>
|
||||
<div class="mainbar" id=" "><?php xhtml_object($page,' '); ?></div>
|
||||
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
|
||||
<script src="../js/jquery-2.1.3.min.js"></script>
|
||||
<script src="../include/bootstrap-3.3.2/js/bootstrap.min.js"></script>
|
||||
<script type="text/javascript" src="../js/admin.js"></script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,157 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* Assign availability groups to a questionnaire
|
||||
*
|
||||
*
|
||||
* This file is part of queXS
|
||||
*
|
||||
* queXS is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* queXS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with queXS; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
*
|
||||
* @author Adam Zammit <adam.zammit@acspri.org.au>
|
||||
* @copyright Australian Consortium for Social and Political Research Inc (ACSPRI) 2011
|
||||
* @package queXS
|
||||
* @subpackage admin
|
||||
* @link http://www.acspri.org.au queXS was writen for ACSPRI
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php The GNU General Public License (GPL) Version 2
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* Configuration file
|
||||
*/
|
||||
include("../config.inc.php");
|
||||
|
||||
/**
|
||||
* Database file
|
||||
*/
|
||||
include ("../db.inc.php");
|
||||
|
||||
/**
|
||||
* XHTML functions
|
||||
*/
|
||||
include("../functions/functions.xhtml.php");
|
||||
|
||||
/**
|
||||
* Display functions
|
||||
*/
|
||||
include("../functions/functions.display.php");
|
||||
|
||||
/**
|
||||
* Input functions
|
||||
*/
|
||||
include("../functions/functions.input.php");
|
||||
|
||||
global $db;
|
||||
|
||||
|
||||
if (isset($_GET['questionnaire_id']) && isset($_GET['availability_group']))
|
||||
{
|
||||
//need to add availability_group to questionnaire
|
||||
|
||||
$questionnaire_id = bigintval($_GET['questionnaire_id']);
|
||||
$availability_group = bigintval($_GET['availability_group']);
|
||||
|
||||
$sql = "INSERT INTO questionnaire_availability(questionnaire_id,availability_group_id)
|
||||
VALUES('$questionnaire_id','$availability_group')";
|
||||
|
||||
$db->Execute($sql);
|
||||
|
||||
}
|
||||
|
||||
if (isset($_GET['questionnaire_id']) && isset($_GET['ravailability_group']))
|
||||
{
|
||||
//need to remove rsid from questionnaire
|
||||
|
||||
$questionnaire_id = bigintval($_GET['questionnaire_id']);
|
||||
$availability_group = bigintval($_GET['ravailability_group']);
|
||||
|
||||
$sql = "DELETE FROM questionnaire_availability
|
||||
WHERE questionnaire_id = '$questionnaire_id'
|
||||
AND availability_group_id = '$availability_group'";
|
||||
|
||||
$db->Execute($sql);
|
||||
}
|
||||
|
||||
|
||||
$questionnaire_id = false;
|
||||
if (isset($_GET['questionnaire_id'])) $questionnaire_id = bigintval($_GET['questionnaire_id']);
|
||||
|
||||
xhtml_head(T_("Assign availability group to questionnaire"),true,false,array("../js/window.js"));
|
||||
|
||||
print "<p>" . T_("Assigning an availability group to a questionnaire will allow interviewers to select from those groups to restrict calls to a particular case to the times within the group") ."</p>";
|
||||
|
||||
print "<h3>" . T_("Select a questionnaire from the list below") . "</h3>";
|
||||
display_questionnaire_chooser($questionnaire_id);
|
||||
|
||||
|
||||
if ($questionnaire_id != false)
|
||||
{
|
||||
|
||||
$sql = "SELECT q.availability_group_id,a.description as description
|
||||
FROM questionnaire_availability as q, availability_group as a
|
||||
WHERE q.availability_group_id = a.availability_group_id
|
||||
AND q.questionnaire_id = '$questionnaire_id'";
|
||||
|
||||
$qs = $db->GetAll($sql);
|
||||
|
||||
if (empty($qs))
|
||||
{
|
||||
print "<h2>" . T_("There are no availability groups selected for this questionnaire") . "</h2>";
|
||||
}
|
||||
else
|
||||
{
|
||||
print "<h2>" . T_("Availability groups selected for this questionnaire") . "</h2>";
|
||||
foreach($qs as $q)
|
||||
{
|
||||
print "<p><a href=\"?questionnaire_id=$questionnaire_id&ravailability_group={$q['availability_group_id']}\">{$q['availability_group_id']} - {$q['description']} (" . T_("Click to unassign") . ")</a></p>";
|
||||
}
|
||||
}
|
||||
|
||||
$sql = "SELECT si.availability_group_id,si.description
|
||||
FROM availability_group as si
|
||||
LEFT JOIN questionnaire_availability as q ON (q.questionnaire_id = '$questionnaire_id' AND q.availability_group_id = si.availability_group_id)
|
||||
WHERE q.questionnaire_id is NULL";
|
||||
|
||||
$qs = $db->GetAll($sql);
|
||||
|
||||
if (!empty($qs))
|
||||
{
|
||||
|
||||
|
||||
print "<h2>" . T_("Add an availability group to this questionnaire:") . "</h2>";
|
||||
?>
|
||||
<form action="" method="get">
|
||||
<p><label for="availability_group"><?php echo T_("Select availability group:"); ?></label><select name="availability_group" id="availability_group">
|
||||
<?php
|
||||
|
||||
foreach($qs as $q)
|
||||
{
|
||||
print "<option value=\"{$q['availability_group_id']}\">{$q['description']}</option>";
|
||||
}
|
||||
|
||||
?>
|
||||
</select><br/>
|
||||
<input type="hidden" name="questionnaire_id" value="<?php print($questionnaire_id); ?>"/>
|
||||
<input type="submit" name="add_availability" value="<?php echo TQ_("Add availability group") ?>"/></p>
|
||||
</form>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
xhtml_foot();
|
||||
|
||||
|
||||
?>
|
||||
@@ -1,157 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* Assign call attempt time slots to a questionnaire
|
||||
*
|
||||
*
|
||||
* This file is part of queXS
|
||||
*
|
||||
* queXS is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* queXS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with queXS; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
*
|
||||
* @author Adam Zammit <adam.zammit@acspri.org.au>
|
||||
* @copyright Australian Consortium for Social and Political Research Inc (ACSPRI) 2011
|
||||
* @package queXS
|
||||
* @subpackage admin
|
||||
* @link http://www.acspri.org.au queXS was writen for ACSPRI
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php The GNU General Public License (GPL) Version 2
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* Configuration file
|
||||
*/
|
||||
include("../config.inc.php");
|
||||
|
||||
/**
|
||||
* Database file
|
||||
*/
|
||||
include ("../db.inc.php");
|
||||
|
||||
/**
|
||||
* XHTML functions
|
||||
*/
|
||||
include("../functions/functions.xhtml.php");
|
||||
|
||||
/**
|
||||
* Display functions
|
||||
*/
|
||||
include("../functions/functions.display.php");
|
||||
|
||||
/**
|
||||
* Input functions
|
||||
*/
|
||||
include("../functions/functions.input.php");
|
||||
|
||||
global $db;
|
||||
|
||||
|
||||
if (isset($_GET['questionnaire_id']) && isset($_GET['availability_group']))
|
||||
{
|
||||
//need to add availability_group to questionnaire
|
||||
|
||||
$questionnaire_id = bigintval($_GET['questionnaire_id']);
|
||||
$availability_group = bigintval($_GET['availability_group']);
|
||||
|
||||
$sql = "INSERT INTO questionnaire_timeslot(questionnaire_id,availability_group_id)
|
||||
VALUES('$questionnaire_id','$availability_group')";
|
||||
|
||||
$db->Execute($sql);
|
||||
|
||||
}
|
||||
|
||||
if (isset($_GET['questionnaire_id']) && isset($_GET['ravailability_group']))
|
||||
{
|
||||
//need to remove rsid from questionnaire
|
||||
|
||||
$questionnaire_id = bigintval($_GET['questionnaire_id']);
|
||||
$availability_group = bigintval($_GET['ravailability_group']);
|
||||
|
||||
$sql = "DELETE FROM questionnaire_timeslot
|
||||
WHERE questionnaire_id = '$questionnaire_id'
|
||||
AND availability_group_id = '$availability_group'";
|
||||
|
||||
$db->Execute($sql);
|
||||
}
|
||||
|
||||
|
||||
$questionnaire_id = false;
|
||||
if (isset($_GET['questionnaire_id'])) $questionnaire_id = bigintval($_GET['questionnaire_id']);
|
||||
|
||||
xhtml_head(T_("Assign call attempt time slots to questionnaire"),true,false,array("../js/window.js"));
|
||||
|
||||
print "<p>" . T_("Assigning call attempt time slots to questionnaires will only allow cases to be attempted in a time slot for the n + 1th time where it has been attempted at least n times in all assigned timeslots. Please note timeslots must cover all possible time periods otherwise no cases will be available during missing timeslots.") ."</p>";
|
||||
|
||||
print "<h3>" . T_("Select a questionnaire from the list below") . "</h3>";
|
||||
display_questionnaire_chooser($questionnaire_id);
|
||||
|
||||
|
||||
if ($questionnaire_id != false)
|
||||
{
|
||||
|
||||
$sql = "SELECT q.availability_group_id,a.description as description
|
||||
FROM questionnaire_timeslot as q, availability_group as a
|
||||
WHERE q.availability_group_id = a.availability_group_id
|
||||
AND q.questionnaire_id = '$questionnaire_id'";
|
||||
|
||||
$qs = $db->GetAll($sql);
|
||||
|
||||
if (empty($qs))
|
||||
{
|
||||
print "<h2>" . T_("There are no call attempt time slots selected for this questionnaire") . "</h2>";
|
||||
}
|
||||
else
|
||||
{
|
||||
print "<h2>" . T_("Call attempt time slots selected for this questionnaire") . "</h2>";
|
||||
foreach($qs as $q)
|
||||
{
|
||||
print "<p><a href=\"?questionnaire_id=$questionnaire_id&ravailability_group={$q['availability_group_id']}\">{$q['availability_group_id']} - {$q['description']} (" . T_("Click to unassign") . ")</a></p>";
|
||||
}
|
||||
}
|
||||
|
||||
$sql = "SELECT si.availability_group_id,si.description
|
||||
FROM availability_group as si
|
||||
LEFT JOIN questionnaire_timeslot as q ON (q.questionnaire_id = '$questionnaire_id' AND q.availability_group_id = si.availability_group_id)
|
||||
WHERE q.questionnaire_id is NULL";
|
||||
|
||||
$qs = $db->GetAll($sql);
|
||||
|
||||
if (!empty($qs))
|
||||
{
|
||||
|
||||
|
||||
print "<h2>" . T_("Add a call attempt time slot to this questionnaire:") . "</h2>";
|
||||
?>
|
||||
<form action="" method="get">
|
||||
<p><label for="availability_group"><?php echo T_("Select call attempt time slot:"); ?></label><select name="availability_group" id="availability_group">
|
||||
<?php
|
||||
|
||||
foreach($qs as $q)
|
||||
{
|
||||
print "<option value=\"{$q['availability_group_id']}\">{$q['description']}</option>";
|
||||
}
|
||||
|
||||
?>
|
||||
</select><br/>
|
||||
<input type="hidden" name="questionnaire_id" value="<?php print($questionnaire_id); ?>"/>
|
||||
<input type="submit" name="add_availability" value="<?php echo TQ_("Add call attempt time slot") ?>"/></p>
|
||||
</form>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
xhtml_foot();
|
||||
|
||||
|
||||
?>
|
||||
@@ -1,172 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* Assign call attempt time slots to a questionnaire sample
|
||||
*
|
||||
*
|
||||
* This file is part of queXS
|
||||
*
|
||||
* queXS is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* queXS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with queXS; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
*
|
||||
* @author Adam Zammit <adam.zammit@acspri.org.au>
|
||||
* @copyright Australian Consortium for Social and Political Research Inc (ACSPRI) 2011
|
||||
* @package queXS
|
||||
* @subpackage admin
|
||||
* @link http://www.acspri.org.au queXS was writen for ACSPRI
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php The GNU General Public License (GPL) Version 2
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* Configuration file
|
||||
*/
|
||||
include("../config.inc.php");
|
||||
|
||||
/**
|
||||
* Database file
|
||||
*/
|
||||
include ("../db.inc.php");
|
||||
|
||||
/**
|
||||
* XHTML functions
|
||||
*/
|
||||
include("../functions/functions.xhtml.php");
|
||||
|
||||
/**
|
||||
* Display functions
|
||||
*/
|
||||
include("../functions/functions.display.php");
|
||||
|
||||
/**
|
||||
* Input functions
|
||||
*/
|
||||
include("../functions/functions.input.php");
|
||||
|
||||
global $db;
|
||||
|
||||
|
||||
if (isset($_GET['questionnaire_id']) && isset($_GET['sample_import_id']) && isset($_GET['availability_group']))
|
||||
{
|
||||
//need to add availability_group to questionnaire
|
||||
|
||||
$questionnaire_id = bigintval($_GET['questionnaire_id']);
|
||||
$sample_import_id = bigintval($_GET['sample_import_id']);
|
||||
$availability_group = bigintval($_GET['availability_group']);
|
||||
|
||||
$sql = "INSERT INTO questionnaire_sample_timeslot (questionnaire_id,sample_import_id,availability_group_id)
|
||||
VALUES('$questionnaire_id','$sample_import_id','$availability_group')";
|
||||
|
||||
$db->Execute($sql);
|
||||
|
||||
}
|
||||
|
||||
if (isset($_GET['questionnaire_id']) && isset($_GET['sample_import_id']) && isset($_GET['ravailability_group']))
|
||||
{
|
||||
//need to remove rsid from questionnaire
|
||||
|
||||
$questionnaire_id = bigintval($_GET['questionnaire_id']);
|
||||
$sample_import_id = bigintval($_GET['sample_import_id']);
|
||||
$availability_group = bigintval($_GET['ravailability_group']);
|
||||
|
||||
$sql = "DELETE FROM questionnaire_sample_timeslot
|
||||
WHERE questionnaire_id = '$questionnaire_id'
|
||||
AND sample_import_id = '$sample_import_id'
|
||||
AND availability_group_id = '$availability_group'";
|
||||
|
||||
|
||||
$db->Execute($sql);
|
||||
}
|
||||
|
||||
|
||||
$questionnaire_id = false;
|
||||
if (isset($_GET['questionnaire_id'])) $questionnaire_id = bigintval($_GET['questionnaire_id']);
|
||||
|
||||
xhtml_head(T_("Assign call attempt time slots to questionnaire sample"),true,false,array("../js/window.js"));
|
||||
|
||||
print "<p>" . T_("Assigning call attempt time slots to questionnaires will only allow cases to be attempted in a time slot for the n + 1th time where it has been attempted at least n times in all assigned timeslots. Please note timeslots must cover all possible time periods otherwise no cases will be available during missing timeslots.") ."</p>";
|
||||
|
||||
print "<h3>" . T_("Select a questionnaire from the list below") . "</h3>";
|
||||
display_questionnaire_chooser($questionnaire_id);
|
||||
|
||||
|
||||
if ($questionnaire_id != false)
|
||||
{
|
||||
print "<h3>" . T_("Select a sample from the list below") . "</h3>";
|
||||
|
||||
$sample_import_id = false;
|
||||
if (isset($_GET['sample_import_id'])) $sample_import_id = bigintval($_GET['sample_import_id']);
|
||||
display_sample_chooser($questionnaire_id,$sample_import_id);
|
||||
|
||||
if ($sample_import_id !== false)
|
||||
{
|
||||
|
||||
$sql = "SELECT q.availability_group_id,a.description as description
|
||||
FROM questionnaire_sample_timeslot as q, availability_group as a
|
||||
WHERE q.availability_group_id = a.availability_group_id
|
||||
AND q.questionnaire_id = '$questionnaire_id'
|
||||
AND q.sample_import_id = '$sample_import_id'";
|
||||
|
||||
$qs = $db->GetAll($sql);
|
||||
|
||||
if (empty($qs))
|
||||
{
|
||||
print "<h2>" . T_("There are no call attempt time slots selected for this questionnaire sample") . "</h2>";
|
||||
}
|
||||
else
|
||||
{
|
||||
print "<h2>" . T_("Call attempt time slots selected for this questionnaire sample") . "</h2>";
|
||||
foreach($qs as $q)
|
||||
{
|
||||
print "<p><a href=\"?sample_import_id=$sample_import_id&questionnaire_id=$questionnaire_id&ravailability_group={$q['availability_group_id']}\">{$q['availability_group_id']} - {$q['description']} (" . T_("Click to unassign") . ")</a></p>";
|
||||
}
|
||||
}
|
||||
|
||||
$sql = "SELECT si.availability_group_id,si.description
|
||||
FROM availability_group as si
|
||||
LEFT JOIN questionnaire_sample_timeslot as q ON (q.sample_import_id = '$sample_import_id' AND q.questionnaire_id = '$questionnaire_id' AND q.availability_group_id = si.availability_group_id)
|
||||
WHERE q.questionnaire_id is NULL";
|
||||
|
||||
$qs = $db->GetAll($sql);
|
||||
|
||||
if (!empty($qs))
|
||||
{
|
||||
|
||||
|
||||
print "<h2>" . T_("Add a call attempt time slot to this questionnaire sample:") . "</h2>";
|
||||
?>
|
||||
<form action="" method="get">
|
||||
<p><label for="availability_group"><?php echo T_("Select call attempt time slot:"); ?></label><select name="availability_group" id="availability_group">
|
||||
<?php
|
||||
|
||||
foreach($qs as $q)
|
||||
{
|
||||
print "<option value=\"{$q['availability_group_id']}\">{$q['description']}</option>";
|
||||
}
|
||||
|
||||
?>
|
||||
</select><br/>
|
||||
<input type="hidden" name="questionnaire_id" value="<?php print($questionnaire_id); ?>"/>
|
||||
<input type="hidden" name="sample_import_id" value="<?php print($sample_import_id); ?>"/>
|
||||
<input type="submit" name="add_availability" value="<?php echo TQ_("Add call attempt time slot") ?>"/></p>
|
||||
</form>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
}
|
||||
xhtml_foot();
|
||||
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user