CMS  Version 3.9
reorder_survey_questions.inc File Reference

Go to the source code of this file.

Variables

 $survey_id = checkNumeric($_GET["survey_id"])
 
if(! $survey_id) $survey = new Survey($survey_id)
 
if(! $survey->isAuthor()) $tx = new DataTransaction()
 
 try
 

Variable Documentation

◆ $survey

if (! $survey_id) $survey = new Survey($survey_id)

Definition at line 43 of file reorder_survey_questions.inc.

◆ $survey_id

$survey_id = checkNumeric($_GET["survey_id"])

Definition at line 36 of file reorder_survey_questions.inc.

◆ $tx

if (! $survey->isAuthor()) $tx = new DataTransaction()

Definition at line 49 of file reorder_survey_questions.inc.

◆ try

try
Initial value:
{
foreach($_GET["survey_question_xref_id"] as $id => $sort_order)
{
checkNumeric($id);
checkNumeric($sort_order);
$xref = new SurveyQuestionXref();
$xref->joinTransaction($tx);
$xref->filter = new InclusionFilter("survey_question_xref_id", "survey_id", "survey_question_id", "sort_order");
$xref->load($id);
if ($survey_id != $xref->survey_id)
{
throw new FakoliException("Data Mismatch");
}
$xref->sort_order = $sort_order;
$xref->save();
}
$tx->commit()
FakoliException is the base exception class for all Fakoli errors.
Definition: core.inc:53
if(! $survey->isAuthor()) $tx

Definition at line 51 of file reorder_survey_questions.inc.