lang; $query = "select a.surveyls_survey_id as sid, a.surveyls_title as title, b.datecreated, b.assessments " . "from {{surveys_languagesettings}} as a join {{surveys}} as b on a.surveyls_survey_id = b.sid" . " where a.surveyls_language='en' order by a.surveyls_title, b.datecreated"; $data = dbExecuteAssoc($query); $surveyList=''; foreach($data->readAll() as $row) { $surveyList .= "\n"; } $sFormTag= CHtml::form(array('admin/expressions/sa/navigation_test'), 'post'); $form = <<< EOD $sFormTag

Enter the following variables to test navigation for a survey using different styles

ParameterValue
Survey ID (SID)
Navigation Style
Debug Log Level Specify which debugging features to use
  • Detailed Timing
  • Validation Summary
  • Validation Detail (Validation Summary must also be checked to see detail)
  • Pretty Print Syntax
  • Delete non-relevant values
EOD; echo $form; } else { $clang = Yii::app()->lang; $surveyInfo = explode('|',Yii::app()->request->getParam('sid')); $surveyid = sanitize_int($surveyInfo[0]); $assessments = ($surveyInfo[1] == 'Y'); $surveyMode = sanitize_paranoid_string(Yii::app()->request->getParam('surveyMode')); $LEMdebugLevel = ( ((isset($_POST['LEM_DEBUG_TIMING']) && $_POST['LEM_DEBUG_TIMING'] == 'Y') ? LEM_DEBUG_TIMING : 0) + ((isset($_POST['LEM_DEBUG_VALIDATION_SUMMARY']) && $_POST['LEM_DEBUG_VALIDATION_SUMMARY'] == 'Y') ? LEM_DEBUG_VALIDATION_SUMMARY : 0) + ((isset($_POST['LEM_DEBUG_VALIDATION_DETAIL']) && $_POST['LEM_DEBUG_VALIDATION_DETAIL'] == 'Y') ? LEM_DEBUG_VALIDATION_DETAIL : 0) + ((isset($_POST['LEM_PRETTY_PRINT_ALL_SYNTAX']) && $_POST['LEM_PRETTY_PRINT_ALL_SYNTAX'] == 'Y') ? LEM_PRETTY_PRINT_ALL_SYNTAX : 0) ); $deletenonvalues = ((isset($_POST['deletenonvalues']) && $_POST['deletenonvalues']=='Y') ? 1 : 0); $surveyOptions = array( 'active'=>false, 'allowsave'=>true, 'anonymized'=>false, 'assessments'=>$assessments, 'datestamp'=>true, 'deletenonvalues'=>$deletenonvalues, 'hyperlinkSyntaxHighlighting'=>true, 'ipaddr'=>true, 'rooturl'=>'../../..', ); print '

Starting survey ' . $surveyid . " using Survey Mode '". $surveyMode . (($assessments) ? "' [Uses Assessments]" : "'") . "

"; $now = microtime(true); LimeExpressionManager::StartSurvey($surveyid, $surveyMode, $surveyOptions, true,$LEMdebugLevel); print '[StartSurvey() took ' . (microtime(true) - $now) . ' seconds]
'; while(true) { $now = microtime(true); $result = LimeExpressionManager::NavigateForwards(true); print $result['message'] . "
"; LimeExpressionManager::FinishProcessingPage(); if (($LEMdebugLevel & LEM_DEBUG_TIMING) == LEM_DEBUG_TIMING) { print LimeExpressionManager::GetDebugTimingMessage(); } print '[NavigateForwards() took ' . (microtime(true) - $now) . ' seconds]
'; if (is_null($result) || $result['finished'] == true) { break; } } print "

Finished survey " . $surveyid . "

"; } ?>