diff --git a/sources/.htaccess b/sources/.htaccess deleted file mode 100644 index 3a10131..0000000 --- a/sources/.htaccess +++ /dev/null @@ -1,11 +0,0 @@ - - RewriteEngine on - - # if a directory or a file exists, use it directly - RewriteCond %{REQUEST_FILENAME} !-f - - # otherwise forward it to index.php - RewriteRule . index.php - -# General setting to properly handle LimeSurvey paths -# AcceptPathInfo on \ No newline at end of file diff --git a/sources/.scrutinizer.yml b/sources/.scrutinizer.yml deleted file mode 100644 index 7041363..0000000 --- a/sources/.scrutinizer.yml +++ /dev/null @@ -1,11 +0,0 @@ -filter: - excluded_paths: [framework/*, locale/*, docs/*, fonts/*, third_party/*, application/third_party/*, images/*, styles/*, styles-public/*, templates/*, themes/*, tmp/*, upload/*] - paths: [application/*] -tools: - php_code_sniffer: - config: - standard: "PSR1" - php_pdepend: - command: pdepend - php_cs_fixer: - config: { level: psr1 } \ No newline at end of file diff --git a/sources/application/commands/InstallCommand.php b/sources/application/commands/InstallCommand.php index 70e2713..ffd6756 100644 --- a/sources/application/commands/InstallCommand.php +++ b/sources/application/commands/InstallCommand.php @@ -41,9 +41,6 @@ $sql_file = 'mysql'; break; case 'pgsql': - if (version_compare($this->connection->getServerVersion(),'9','>=')) { - $this->connection->createCommand("ALTER DATABASE ". $this->connection->quoteTableName($this->getDBConnectionStringProperty('dbname')) ." SET bytea_output='escape';")->execute(); - } $sql_file = 'pgsql'; break; case 'dblib': @@ -52,7 +49,7 @@ $sql_file = 'mssql'; break; default: - throw new Exception(sprintf('Unkown database type "%s".', $this->connection->driverName)); + throw new Exception(sprintf('Unknown database type "%s".', $this->connection->driverName)); } $this->_executeSQLFile(dirname(Yii::app()->basePath).'/installer/sql/create-'.$sql_file.'.sql'); $this->connection->createCommand()->insert($this->connection->tablePrefix.'users', array( @@ -130,10 +127,12 @@ protected function createDatabase() { + App()->configure(array('components'=>array('db'=>array('autoConnect'=>false)))) ; + $this->connection=App()->db; + App()->configure(array('components'=>array('db'=>array('autoConnect'=>true)))) ; $connectionString = $this->connection->connectionString; $this->connection->connectionString = preg_replace('/dbname=([^;]*)/', '', $connectionString); - try - { + try { $this->connection->active=true; } catch(Exception $e){ diff --git a/sources/application/config/config-defaults.php b/sources/application/config/config-defaults.php index 3d8cdfa..eef5dcb 100644 --- a/sources/application/config/config-defaults.php +++ b/sources/application/config/config-defaults.php @@ -68,10 +68,8 @@ $config['minrepeatheadings'] = 3; // The minimum number of rem $config['defaultlang'] = 'en'; // The default language to use - the available languages are the directory names in the /locale dir - for example de = German $config['timeadjust'] = 0; // Number of hours to adjust between your webserver local time and your own local time (for datestamping responses) -$config['allowexportalldb'] = 1; // 0 will only export prefixed tables when doing a database dump. If set to 1 ALL tables in the database will be exported +$config['allowexportalldb'] = 0; // 0 will only export prefixed tables when doing a database dump. If set to 1 ALL tables in the database will be exported $config['maxdumpdbrecords'] = 500; // The maximum number of records that would be ouputted in a go during a database backup. Reduce this number if you're getting errors while backing up the entire database. -$config['allowmandbackwards'] = 1; // Allow moving backwards (ie: << prev) through survey if a mandatory question -// has not been answered. 1=Allow, 0=Deny $config['deletenonvalues'] = 1; // By default, LimeSurvey does not save responses to conditional questions that haven't been answered/shown. To have LimeSurvey save these responses change this value to 0. $config['stringcomparizonoperators'] = 0; // By default, LimeSurvey assumes the numrical order for comparizon operators in conditions. If you need string comparizon operators, set this parameter to 1 $config['shownoanswer'] = 1; // Show 'no answer' for non mandatory questions ( 0 = no , 1 = yes , 2 = survey admin can choose ) @@ -84,11 +82,11 @@ $config['allowunblacklist'] = 'N'; // Allow participant to unbl $config['userideditable'] = 'N'; // Allow editing of user IDs $config['defaulttemplate'] = 'default'; // This setting specifys the default theme used for the 'public list' of surveys -$config['allowedtemplateuploads'] = 'gif,ico,jpg,png,css,js'; // File types allowed to be uploaded in the templates section. +$config['allowedtemplateuploads'] = 'gif,ico,jpg,png,css,js,map,json,eot,svg,ttf,woff,txt,md'; // File types allowed to be uploaded in the templates section. $config['allowedresourcesuploads'] = '7z,aiff,asf,avi,bmp,csv,doc,docx,fla,flv,gif,gz,gzip,ico,jpeg,jpg,mid,mov,mp3,mp4,mpc,mpeg,mpg,ods,odt,pdf,png,ppt,pxd,qt,ram,rar,rm,rmi,rmvb,rtf,sdc,sitd,swf,sxc,sxw,tar,tgz,tif,tiff,txt,vsd,wav,wma,wmv,xls,xlsx,xml,zip,pstpl,css,js'; // File types allowed to be uploaded in the resources sections, and with the HTML Editor -$config['memory_limit'] = '32'; // This sets how much memory LimeSurvey can access in megabytes. 32 mb is the minimum recommended - if you are using PDF functions up to 64 mb may be needed +$config['memory_limit'] = '128'; // This sets how much memory LimeSurvey can access in megabytes. 128 MB is the minimum recommended - if you are using PDF functions up to 256 MB may be needed $config['showpopups'] = 1; // Show popup messages if mandatory or conditional questions have not been answered correctly. // 1=Show popup message, 0=Show message on page instead. @@ -237,15 +235,15 @@ $config['usercontrolSameGroupPolicy'] = true; $config['demoMode'] = false; /** -* Prefill the login mask using the parameters 'defaultuser' and 'default pass'. This works only if demo mode (demoMode) is activated. +* Prefill the login mask using the parameters 'defaultuser' and 'default pass'. This works only if demo mode (demoMode) is activated. * Also a notice will be shown that the user knows that he can just login by using the Login button. -* +* * @var $config['demoModePrefill'] boolan If set to true prefill the login mask */ $config['demoModePrefill'] = false; -/** +/** * column_style * Because columns are tricky things, in terms of balancing visual * layout against semantic markup. The choice has been left to the @@ -312,15 +310,22 @@ $config['standard_templates_readonly'] = true; $config['showsgqacode'] = false; /** -* When this settings is true/1 (default = false/0) then the printable survey option will show +* When this settings is true/1 (default = false/0) then the printable survey option will show * the raw relevance equation below the general fill-out instructions in case the question has conditions. */ $config['showrelevance'] = false; +/** +* To prevent brute force against forgotten password functionality, there is a random delay +* that prevent attacker from knowing whether username and email address are valid or not. +*/ +$config['minforgottenpasswordemaildelay'] = 500000; +$config['maxforgottenpasswordemaildelay'] = 1500000; + /** * PDF Export Settings * This feature configures PDF export for Export Answers -* PDF core fonts are not included in PDF: make ligther pdf +* PDF core fonts are not included in PDF: make ligther pdf * See http://www.tcpdf.org/fonts.php to have the list of PDF core fonts */ @@ -334,14 +339,15 @@ $config['alternatepdffontfile']=array( 'ar'=>'dejavusans',// 'dejavusans' work but maybe more characters in aealarabiya or almohanad: but then need a dynamic font size too 'be'=>'dejavusans', 'bg'=>'dejavusans', - 'zh-Hans'=>'chinese', - 'zh-Hant-HK'=>'chinese', - 'zh-Hant-TW'=>'chinese', + 'zh-Hans'=>'cid0cs', + 'zh-Hant-HK'=>'cid0ct', + 'zh-Hant-TW'=>'cid0ct', 'cs'=>'dejavusans', 'cs-informal'=>'dejavusans',// This one not really tested: no translation for Yes/No or Gender 'el'=>'dejavusans', 'he'=>'freesans', 'hi'=>'dejavusans', + 'hr'=>'dejavusans', 'hu'=>'dejavusans', 'ja'=>'cid0jp', 'ko'=>'cid0kr', @@ -367,27 +373,19 @@ $config['notsupportlanguages'] = array( ); $config['pdffontsize'] = 9; //Fontsize for normal text; Surveytitle is +4; grouptitle is +2 $config['pdforientation'] = 'P'; // Set L for Landscape or P for portrait format +$config['pdfshowheader'] = 'N'; // Show header in pdf answer export +$config['pdflogofile'] = 'logo_pdf.png'; // File name of logo for single answer export. Path is template path, i.e. template/default/logo_pdf.png. + // If not found, resulting pdf doesn't have header. A large image implies slower pdf generation. +$config['pdflogowidth'] = '50'; // Logo width +$config['pdfheadertitle'] = ''; // Header title (bold font). If this config param is empty and header is enabled, site name is used +$config['pdfheaderstring'] = ''; // Header string (under title). If this config param is empty and header is enabled, survey name is used // QueXML-PDF: If set to true, the printable_help attribute will be visible on the exported PDF questionnaires // If used, the appearance (font size, justification, etc.) may be adjusted by editing td.questionHelpBefore and $helpBeforeBorderBottom of quexml. $config['quexmlshowprintablehelp'] = false; -// CAS Settings -/** -* Please note that CAS functionality is very basic and you have to modify the client to your needs. -* At least the hard work is done. -* The Client is deployed in Limesurvey and a file login_check_cas.php does what login_check.php does in normal mode. -* -* $casEnabled determines if CAS should be used or not for Authentication. -* $casAuthServer the servername of the cas Auth Server. Without http:// -* $casAuthPort CAS Server listening Port -* $casAuthUri relative uri from $casAuthServer to cas workingdirectory -*/ -$config['casEnabled'] = false; -$config['casAuthServer'] = 'localhost'; -$config['casAuthPort'] = 8443; -$config['casAuthUri'] = '/cas-server/'; - +$config['minlengthshortimplode'] = 20; // Min length required to use short_implode instead of standard implode +$config['maxstringlengthshortimplode'] = 100; // short_implode: Max length of returned string /** * Statistics chart settings diff --git a/sources/application/config/config-sample-mysql.php b/sources/application/config/config-sample-mysql.php index 7e97fba..e1b7aa1 100644 --- a/sources/application/config/config-sample-mysql.php +++ b/sources/application/config/config-sample-mysql.php @@ -22,10 +22,9 @@ | */ return array( - 'name' => 'LimeSurvey', 'components' => array( 'db' => array( - 'connectionString' => 'mysql:host=localhost;port=3306;dbname=limesurvey', + 'connectionString' => 'mysql:host=localhost;port=3306;dbname=limesurvey;', 'emulatePrepare' => true, 'username' => 'root', 'password' => '', diff --git a/sources/application/config/routes.php b/sources/application/config/routes.php index daf6058..df3ceea 100644 --- a/sources/application/config/routes.php +++ b/sources/application/config/routes.php @@ -18,6 +18,7 @@ $route['<_sid:\d+>/lang-<_lang:\w+[-\w]+>/tk-<_token:\w+>/*'] = "survey/index/si $route['<_sid:\d+>/lang-<_lang:\w+[-\w]+>/*'] = "survey/index/sid/<_sid>/lang/<_lang>"; $route['<_sid:\d+>/tk-<_token:\w+>/*'] = "survey/index/sid/<_sid>/token/<_token>"; $route['<_sid:\d+>/*'] = "survey/index/sid/<_sid>"; +$route[''] = array('survey/index','matchValue'=>true); //Admin Routes $route['admin/index'] = "admin"; @@ -28,12 +29,15 @@ $route['admin///*'] = 'admin//sa/'; $route['admin/labels/<_action:\w+>'] = "admin/labels/index/<_action>"; $route['admin/labels/<_action:\w+>/<_lid:\d+>'] = "admin/labels/index/<_action>/<_lid>"; -$route['<_controller:\w+>/<_action:\w+>'] = '<_controller>/<_action>'; - //Expression Manager tests $route['admin/expressions'] = "admin/expressions/index"; -//optout +//optout - optin $route['optout/<_sid:\d+>/(:any)/(:any)'] = "optout/index/<_sid>/$2/$3"; +$route['optout/tokens/'] = array('optout/tokens','matchValue'=>true); +$route['optin/tokens/'] = array('optin/tokens','matchValue'=>true); +$route['statistics_user/'] = array('statistics_user/action','matchValue'=>true); -return $route; \ No newline at end of file +$route['<_controller:\w+>/<_action:\w+>'] = '<_controller>/<_action>'; + +return $route; diff --git a/sources/application/config/tcpdf.php b/sources/application/config/tcpdf.php index d0f19ee..21d7c2f 100644 --- a/sources/application/config/tcpdf.php +++ b/sources/application/config/tcpdf.php @@ -47,7 +47,7 @@ * ADD TRAILING SLASH! ***********************************************************/ - $tcpdf['base_url'] = ''; + $tcpdf['base_url'] = 'dummy'; // If empty and debug === 2, "empty needle" occurs /************************************************************ @@ -97,15 +97,6 @@ $tcpdf['blank_image'] = $tcpdf['image_directory'].'_blank.png'; - /************************************************************ - * TCPDF language settings file - * ---------------------------------------------------------- - * Directory and filename of the language settings file - ***********************************************************/ - - $tcpdf['language_file'] = $tcpdf['base_directory'].'config'.DIRECTORY_SEPARATOR.'lang'.DIRECTORY_SEPARATOR.'eng.php'; - - /*************************************************************************** * DOCUMENT CONFIGURATION PARAMETERS @@ -203,8 +194,11 @@ * HTML font size ratio ***********************************************************/ - $tcpdf['page_font'] = 'freemono'; + $tcpdf['page_font'] = 'freesans'; $tcpdf['page_font_size'] = 9; + $tcpdf['data_font'] = 'freesans'; + $tcpdf['data_font_size'] = 8; + $tcpdf['mono_font'] = 'freemono'; $tcpdf['small_font_ratio'] = 2/3; diff --git a/sources/application/config/version.php b/sources/application/config/version.php index 245286f..aff6dbf 100644 --- a/sources/application/config/version.php +++ b/sources/application/config/version.php @@ -13,8 +13,8 @@ */ $config['versionnumber'] = "2.05+"; -$config['dbversionnumber'] = 177; -$config['buildnumber'] = ''; +$config['dbversionnumber'] = 178; +$config['buildnumber'] = '150520'; $config['updatable'] = true; return $config; diff --git a/sources/application/controllers/InstallerController.php b/sources/application/controllers/InstallerController.php index 864180a..779b9a3 100644 --- a/sources/application/controllers/InstallerController.php +++ b/sources/application/controllers/InstallerController.php @@ -47,6 +47,7 @@ class InstallerController extends CController { { self::_checkInstallation(); self::_sessioncontrol(); + Yii::import('application.helpers.common_helper', true); switch ($action) { @@ -237,6 +238,13 @@ class InstallerController extends CController { $aData['classesForStep'] = array('off','off','off','on','off','off'); $aData['progressValue'] = 40; $aData['model'] = $oModel = new InstallerConfigForm; + if (isset(Yii::app()->session['populateerror'])) + { + $oModel->addError('dblocation',Yii::app()->session['populateerror']); + $oModel->addError('dbpwd',''); + $oModel->addError('dbuser',''); + unset(Yii::app()->session['populateerror']); + } if(isset($_POST['InstallerConfigForm'])) { @@ -461,7 +469,7 @@ class InstallerController extends CController { $bCreateDB=false; } break; - case 'postgres': + case 'pgsql': try { $this->connection->createCommand("CREATE DATABASE \"$sDatabaseName\" ENCODING 'UTF8'")->execute(); @@ -547,7 +555,7 @@ class InstallerController extends CController { case 'mysql': $sql_file = 'mysql'; break; - case 'dblib': + case 'dblib': case 'sqlsrv': case 'mssql': $sql_file = 'mssql'; @@ -556,7 +564,7 @@ class InstallerController extends CController { $sql_file = 'pgsql'; break; default: - throw new Exception(sprintf('Unkown database type "%s".', $sDatabaseType)); + throw new Exception(sprintf('Unknown database type "%s".', $sDatabaseType)); } //checking DB Connection @@ -575,12 +583,15 @@ class InstallerController extends CController { } else { - $sConfirmation = $clang->gT('Database was populated but there were errors:').'

    '; + $sConfirmation = $clang->gT('There were errors when trying to populate the database:').'

      '; foreach ($aErrors as $sError) { $sConfirmation.='
    • '.htmlspecialchars($sError).'
    • '; } $sConfirmation.='
    '; + Yii::app()->session['populateerror']=$sConfirmation; + + $this->redirect(array('installer/database')); } Yii::app()->session['tablesexist'] = true; @@ -617,7 +628,7 @@ class InstallerController extends CController { $sDefaultAdminRealName = $model->adminName; $sDefaultSiteName = $model->siteName; $sDefaultSiteLanguage = $model->surveylang; - $sDefaultAdminEmail = $model->adminEmail; + $sDefaultAdminEmail = $model->adminEmail; $aData['title'] = $clang->gT("Database configuration"); $aData['descp'] = $clang->gT("Please enter the database settings you want to use for LimeSurvey:"); @@ -631,8 +642,16 @@ class InstallerController extends CController { if ($this->connection->getActive() == true) { $sPasswordHash=hash('sha256', $sDefaultAdminPassword); try { + + if (User::model()->count()>0){ + die(); + } // Save user $user=new User; + // Fix UserID to 1 for MySQL even if installed in master-master configuration scenario + if (in_array($this->connection->getDriverName(), array('mysql', 'mysqli'))) { + $user->uid=1; + } $user->users_name=$sDefaultAdminUserName; $user->password=$sPasswordHash; $user->full_name=$sDefaultAdminRealName; @@ -835,10 +854,10 @@ class InstallerController extends CController { if (version_compare(PHP_VERSION, '5.3.0', '<')) $bProceed = !$aData['verror'] = true; - if ($this->return_bytes(ini_get('memory_limit'))/1024/1024<64 && ini_get('memory_limit')!=-1) + if (convertPHPSizeToBytes(ini_get('memory_limit'))/1024/1024<64 && ini_get('memory_limit')!=-1) $bProceed = !$aData['bMemoryError'] = true; - - + + // mbstring library check if (!check_PHPFunction('mb_convert_encoding', $aData['mbstringPresent'])) $bProceed = false; @@ -904,16 +923,15 @@ class InstallerController extends CController { function _setup_tables($sFileName, $aDbConfig = array(), $sDatabasePrefix = '') { extract(empty($aDbConfig) ? self::_getDatabaseConfig() : $aDbConfig); - switch ($sDatabaseType) { - case 'mysql': - case 'mysqli': - $this->connection->createCommand("ALTER DATABASE ". $this->connection->quoteTableName($sDatabaseName) ." DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;")->execute(); - break; - case 'pgsql': - if (version_compare($this->connection->getServerVersion(),'9','>=')) { - $this->connection->createCommand("ALTER DATABASE ". $this->connection->quoteTableName($sDatabaseName) ." SET bytea_output='escape';")->execute(); - } - break; + try{ + switch ($sDatabaseType) { + case 'mysql': + case 'mysqli': + $this->connection->createCommand("ALTER DATABASE ". $this->connection->quoteTableName($sDatabaseName) ." DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;")->execute(); + break; + } + } catch(Exception $e) { + return array($e->getMessage()); } return $this->_executeSQLFile($sFileName, $sDatabasePrefix); @@ -1052,7 +1070,7 @@ class InstallerController extends CController { $sConfig .="\t\t" . ")," . "\n" ."\t\t" . "" . "\n" - + ."\t\t" . "// Uncomment the following line if you need table-based sessions". "\n" ."\t\t" . "// 'session' => array (" . "\n" ."\t\t\t" . "// 'class' => 'system.web.CDbHttpSession'," . "\n" @@ -1133,7 +1151,7 @@ class InstallerController extends CController { case 'mysql': case 'mysqli': // MySQL allow unix_socket for database location, then test if $sDatabaseLocation start with "/" - if(substr($sDatabaseLocation,0,1)=="/") + if(substr($sDatabaseLocation,0,1)=="/") $sDSN = "mysql:unix_socket={$sDatabaseLocation};dbname={$sDatabaseName};"; else $sDSN = "mysql:host={$sDatabaseLocation};port={$sDatabasePort};dbname={$sDatabaseName};"; @@ -1153,7 +1171,7 @@ class InstallerController extends CController { } break; - case 'dblib' : + case 'dblib' : $sDSN = $sDatabaseType.":host={$sDatabaseLocation};dbname={$sDatabaseName}"; break; case 'mssql' : @@ -1238,33 +1256,12 @@ class InstallerController extends CController { return true; } catch(Exception $e) { if (!empty($aData['model']) && !empty($aData['clang'])) { - $aData['model']->addError('dblocation', $aData['clang']->gT('Try again! Connection with database failed. Reason: ') . $e->message); + $aData['model']->addError('dblocation', $aData['clang']->gT('Try again! Connection with database failed. Reason: ') . $e->getMessage()); $this->render('/installer/dbconfig_view', $aData); } else { return false; } } } - - /** - * This function returns the full number from a PHP ini value - * - * @param string $sValue - */ - function return_bytes($sValue) { - $sValue = trim($sValue); - $sLast = strtolower($sValue[strlen($sValue)-1]); - switch($sLast) { - // The 'G' modifier is available since PHP 5.1.0 - case 'g': - $sValue *= 1024; - case 'm': - $sValue *= 1024; - case 'k': - $sValue *= 1024; - } - - return $sValue; - } } diff --git a/sources/application/controllers/OptoutController.php b/sources/application/controllers/OptoutController.php index d528f86..92cd270 100644 --- a/sources/application/controllers/OptoutController.php +++ b/sources/application/controllers/OptoutController.php @@ -73,7 +73,7 @@ class OptoutController extends LSYii_Controller { } else { - if ($oToken->emailstatus == 'OK') + if (substr($oToken->emailstatus, 0, strlen('OptOut')) !== 'OptOut') { $oToken->emailstatus = 'OptOut'; $oToken->save(); @@ -148,7 +148,7 @@ class OptoutController extends LSYii_Controller { } else { - if ($oToken->emailstatus == 'OK') + if (substr($oToken->emailstatus, 0, strlen('OptOut')) !== 'OptOut') { $oToken->emailstatus = 'OptOut'; $oToken->save(); @@ -166,7 +166,8 @@ class OptoutController extends LSYii_Controller { { $sMessage .= "
    "; $sMessage .= $clang->gT("You have already been removed from the central participants list for this site"); - } else + } + else { $oParticipant->blacklisted='Y'; $oParticipant->save(); diff --git a/sources/application/controllers/PluginsController.php b/sources/application/controllers/PluginsController.php index 38bcece..5110227 100644 --- a/sources/application/controllers/PluginsController.php +++ b/sources/application/controllers/PluginsController.php @@ -95,15 +95,19 @@ class PluginsController extends LSYii_Controller $this->forward('plugins/index', true); } + // Prepare settings to be send to the view. $aSettings = $oPluginObject->getPluginSettings(); - if (empty($aSettings)) { // And show a message Yii::app()->user->setFlash('pluginmanager', 'This plugin has no settings'); $this->forward('plugins/index', true); } - $this->render('/plugins/configure', array('settings' => $aSettings, 'plugin' => $arPlugin)); + + // Send to view plugin porperties: name and description + $aPluginProp = App()->getPluginManager()->getPluginInfo($arPlugin['name']); + + $this->render('/plugins/configure', array('settings' => $aSettings, 'plugin' => $arPlugin, 'properties' => $aPluginProp)); } public function actionDeactivate($id) diff --git a/sources/application/controllers/PrintanswersController.php b/sources/application/controllers/PrintanswersController.php index 21464c0..e4abf2c 100644 --- a/sources/application/controllers/PrintanswersController.php +++ b/sources/application/controllers/PrintanswersController.php @@ -91,104 +91,130 @@ $sSRID = $_SESSION['survey_'.$iSurveyID]['srid']; //I want to see the answers with this id //Ensure script is not run directly, avoid path disclosure //if (!isset($rootdir) || isset($_REQUEST['$rootdir'])) {die( "browse - Cannot run this script directly");} - if ($aSurveyInfo['printanswers'] == 'N') + + //Ensure Participants printAnswer setting is set to true or that the logged user have read permissions over the responses. + if ($aSurveyInfo['printanswers'] == 'N' && !Permission::model()->hasSurveyPermission($iSurveyID,'responses','read')) { - die(); //Die quietly if print answers is not permitted + throw new CHttpException(401, 'You are not allowed to print answers.'); } + //CHECK IF SURVEY IS ACTIVATED AND EXISTS $sSurveyName = $aSurveyInfo['surveyls_title']; $sAnonymized = $aSurveyInfo['anonymized']; //OK. IF WE GOT THIS FAR, THEN THE SURVEY EXISTS AND IT IS ACTIVE, SO LETS GET TO WORK. //SHOW HEADER - $sOutput = CHtml::form(array("printanswers/view/surveyid/{$iSurveyID}/printableexport/pdf"), 'post') - ."
    "; - if($sExportType == 'pdf') + if ($sExportType != 'pdf') { - //require (Yii::app()->getConfig('rootdir').'/application/config/tcpdf.php'); - Yii::import('application.libraries.admin.pdf', true); - Yii::import('application.helpers.pdfHelper'); - $aPdfLanguageSettings=pdfHelper::getPdfLanguageSettings($clang->langcode); - $oPDF = new pdf(); - $oPDF->SetTitle($clang->gT("Survey name (ID)",'unescaped').": {$sSurveyName} ({$iSurveyID})"); - $oPDF->SetSubject($sSurveyName); - $oPDF->SetDisplayMode('fullpage', 'two'); - $oPDF->setLanguageArray($aPdfLanguageSettings['lg']); - $oPDF->setHeaderFont(Array($aPdfLanguageSettings['pdffont'], '', PDF_FONT_SIZE_MAIN)); - $oPDF->setFooterFont(Array($aPdfLanguageSettings['pdffont'], '', PDF_FONT_SIZE_DATA)); - $oPDF->SetFont($aPdfLanguageSettings['pdffont'], '', $aPdfLanguageSettings['pdffontsize']); - $oPDF->AddPage(); - $oPDF->titleintopdf($clang->gT("Survey name (ID)",'unescaped').": {$sSurveyName} ({$iSurveyID})"); - } - $sOutput .= "\t
    ".$clang->gT("Survey name (ID):")." $sSurveyName ($iSurveyID)

     \n"; - LimeExpressionManager::StartProcessingPage(true); // means that all variables are on the same page - // Since all data are loaded, and don't need JavaScript, pretend all from Group 1 - LimeExpressionManager::StartProcessingGroup(1,($aSurveyInfo['anonymized']!="N"),$iSurveyID); - $printanswershonorsconditions = Yii::app()->getConfig('printanswershonorsconditions'); - $aFullResponseTable = getFullResponseTable($iSurveyID,$sSRID,$sLanguage,$printanswershonorsconditions); - //Get the fieldmap @TODO: do we need to filter out some fields? - if($aSurveyInfo['datestamp']!="Y" || $sAnonymized == 'Y'){ - unset ($aFullResponseTable['submitdate']); - }else{ - unset ($aFullResponseTable['id']); - } - unset ($aFullResponseTable['token']); - unset ($aFullResponseTable['lastpage']); - unset ($aFullResponseTable['startlanguage']); - unset ($aFullResponseTable['datestamp']); - unset ($aFullResponseTable['startdate']); - $sOutput .= "\n"; - foreach ($aFullResponseTable as $sFieldname=>$fname) - { - if (substr($sFieldname,0,4) == 'gid_') - { - - - $sOutput .= "\t\n"; + $sOutput = CHtml::form(array("printanswers/view/surveyid/{$iSurveyID}/printableexport/pdf"), 'post') + ."
    "; + $sOutput .= "\t
    ".$clang->gT("Survey name (ID):")." $sSurveyName ($iSurveyID)

     \n"; + LimeExpressionManager::StartProcessingPage(true); // means that all variables are on the same page + // Since all data are loaded, and don't need JavaScript, pretend all from Group 1 + LimeExpressionManager::StartProcessingGroup(1,($aSurveyInfo['anonymized']!="N"),$iSurveyID); + $printanswershonorsconditions = Yii::app()->getConfig('printanswershonorsconditions'); + $aFullResponseTable = getFullResponseTable($iSurveyID,$sSRID,$sLanguage,$printanswershonorsconditions); + //Get the fieldmap @TODO: do we need to filter out some fields? + if($aSurveyInfo['datestamp']!="Y" || $sAnonymized == 'Y'){ + unset ($aFullResponseTable['submitdate']); + }else{ + unset ($aFullResponseTable['id']); } - elseif (substr($sFieldname,0,4)=='qid_') + unset ($aFullResponseTable['token']); + unset ($aFullResponseTable['lastpage']); + unset ($aFullResponseTable['startlanguage']); + unset ($aFullResponseTable['datestamp']); + unset ($aFullResponseTable['startdate']); + $sOutput .= "

    {$fname[0]}
    \n"; + foreach ($aFullResponseTable as $sFieldname=>$fname) { - $sOutput .= "\t\n"; - } - elseif ($sFieldname=='submitdate') - { - if($sAnonymized != 'Y') + if (substr($sFieldname,0,4) == 'gid_') { - $sOutput .= "\t"; + $sOutput .= "\t\n"; + } + elseif ($sFieldname=='submitdate') + { + if($sAnonymized != 'Y') + { + $sOutput .= "\t"; + } + } + elseif (substr($sFieldname,0,4) != 'qid_') // Question text is already in subquestion text, skipping it + { + $sOutput .= "\t"; } } - else - { - $sOutput .= "\t"; - } - } - $sOutput .= "
    {$fname[0]}
    {$fname[0]} {$fname[1]} {$sFieldname}{$fname[2]}
    {$fname[0]}
    {$fname[0]} {$fname[1]} {$sFieldname}{$fname[2]}
    {$fname[0]} {$fname[1]}".flattenText($fname[2])."
    {$fname[0]} {$fname[1]}".flattenText($fname[2])."
    \n"; - if($sExportType == 'pdf') - { - $oPDF->writeHTML($sOutput); - header("Pragma: public"); - header("Cache-Control: must-revalidate, post-check=0, pre-check=0"); - $sExportFileName = sanitize_filename($sSurveyName); - $oPDF->Output($sExportFileName."-".$iSurveyID.".pdf","D"); - } - else//Display the page with user answers - { + $sOutput .= "\n"; + $sData['thissurvey']=$aSurveyInfo; + $sOutput=templatereplace($sOutput, array() , $sData, '', $aSurveyInfo['anonymized']=="Y",NULL, array(), true);// Do a static replacement ob_start(function($buffer, $phase) { App()->getClientScript()->render($buffer); App()->getClientScript()->reset(); return $buffer; }); ob_implicit_flush(false); - + sendCacheHeaders(); doHeader(); - $sData['thissurvey']=$aSurveyInfo; echo templatereplace(file_get_contents(getTemplatePath($sTemplate).'/startpage.pstpl'),array(),$sData); echo templatereplace(file_get_contents(getTemplatePath($sTemplate).'/printanswers.pstpl'),array('ANSWERTABLE'=>$sOutput),$sData); echo templatereplace(file_get_contents(getTemplatePath($sTemplate).'/endpage.pstpl'),array(),$sData); echo ""; - + ob_flush(); } + if($sExportType == 'pdf') + { + // Get images for TCPDF from template directory + define('K_PATH_IMAGES', getTemplatePath($aSurveyInfo['template']).DIRECTORY_SEPARATOR); + + Yii::import('application.libraries.admin.pdf', true); + Yii::import('application.helpers.pdfHelper'); + $aPdfLanguageSettings=pdfHelper::getPdfLanguageSettings($clang->langcode); + + $oPDF = new pdf(); + $sDefaultHeaderString = $sSurveyName." (".$clang->gT("ID",'unescaped').":".$iSurveyID.")"; + $oPDF->initAnswerPDF($aSurveyInfo, $aPdfLanguageSettings, Yii::app()->getConfig('sitename'), $sSurveyName, $sDefaultHeaderString); + + LimeExpressionManager::StartProcessingPage(true); // means that all variables are on the same page + // Since all data are loaded, and don't need JavaScript, pretend all from Group 1 + LimeExpressionManager::StartProcessingGroup(1,($aSurveyInfo['anonymized']!="N"),$iSurveyID); + $printanswershonorsconditions = Yii::app()->getConfig('printanswershonorsconditions'); + $aFullResponseTable = getFullResponseTable($iSurveyID,$sSRID,$sLanguage,$printanswershonorsconditions); + //Get the fieldmap @TODO: do we need to filter out some fields? + if($aSurveyInfo['datestamp']!="Y" || $sAnonymized == 'Y'){ + unset ($aFullResponseTable['submitdate']); + }else{ + unset ($aFullResponseTable['id']); + } + unset ($aFullResponseTable['token']); + unset ($aFullResponseTable['lastpage']); + unset ($aFullResponseTable['startlanguage']); + unset ($aFullResponseTable['datestamp']); + unset ($aFullResponseTable['startdate']); + foreach ($aFullResponseTable as $sFieldname=>$fname) + { + if (substr($sFieldname,0,4) == 'gid_') + { + $oPDF->addGidAnswer($fname[0]); + } + elseif ($sFieldname=='submitdate') + { + if($sAnonymized != 'Y') + { + $oPDF->addAnswer($fname[0]." ".$fname[1], $fname[2]); + } + } + elseif (substr($sFieldname,0,4) != 'qid_') // Question text is already in subquestion text, skipping it + { + $oPDF->addAnswer($fname[0]." ".$fname[1], $fname[2]); + } + } + + header("Pragma: public"); + header("Cache-Control: must-revalidate, post-check=0, pre-check=0"); + $sExportFileName = sanitize_filename($sSurveyName); + $oPDF->Output($sExportFileName."-".$iSurveyID.".pdf","D"); + } LimeExpressionManager::FinishProcessingGroup(); LimeExpressionManager::FinishProcessingPage(); diff --git a/sources/application/controllers/Statistics_userController.php b/sources/application/controllers/Statistics_userController.php index 6f7cceb..6737317 100644 --- a/sources/application/controllers/Statistics_userController.php +++ b/sources/application/controllers/Statistics_userController.php @@ -27,148 +27,131 @@ class Statistics_userController extends LSYii_Controller { - public function _remap($method, $params = array()) - { - array_unshift($params, $method); - return call_user_func_array(array($this, "action"), $params); - } + public function _remap($method, $params = array()) + { + array_unshift($params, $method); + return call_user_func_array(array($this, "action"), $params); + } - function actionAction($surveyid,$language) - { - ob_start(function($buffer, $phase) { - App()->getClientScript()->render($buffer); - return $buffer; - }); - ob_implicit_flush(false); - $iSurveyID=(int)$surveyid; + function actionAction($surveyid,$language=null) + { + $sLanguage=$language; + ob_start(function($buffer, $phase) { + App()->getClientScript()->render($buffer); + App()->getClientScript()->reset(); + return $buffer; + }); + ob_implicit_flush(false); + $iSurveyID=(int)$surveyid; //$postlang = returnglobal('lang'); - Yii::import('application.libraries.admin.progressbar',true); - Yii::app()->loadHelper("admin/statistics"); - Yii::app()->loadHelper('database'); - Yii::app()->loadHelper('surveytranslator'); + Yii::import('application.libraries.admin.progressbar',true); + Yii::app()->loadHelper("admin/statistics"); + Yii::app()->loadHelper('database'); + Yii::app()->loadHelper('surveytranslator'); + App()->getClientScript()->registerPackage('jqueryui'); + App()->getClientScript()->registerPackage('jquery-touch-punch'); + App()->getClientScript()->registerScriptFile(Yii::app()->getConfig('generalscripts')."survey_runtime.js"); - $data = array(); + $data = array(); - //XXX enable/disable this for testing - //$publicgraphs = 1; - //$showaggregateddata = 1; - - /* - * List of important settings: - * - publicstatistics: General survey setting which determines if public statistics for this survey - * should be shown at all. - * - * - publicgraphs: General survey setting which determines if public statistics for this survey - * should include graphs or only show a tabular overview. - * - * - public_statistics: Question attribute which has to be applied to each question so that - * its statistics will be shown to the user. If not set no statistics for this question will be shown. - * - * - filterout_incomplete_answers: Setting taken from config-defaults.php which determines if - * not completed answers will be filtered. - */ - - if(!isset($iSurveyID)) - { - $iSurveyID=returnGlobal('sid'); - } - else - { - $iSurveyID = (int) $iSurveyID; - } - if (!$iSurveyID) - { - //This next line ensures that the $iSurveyID value is never anything but a number. - safeDie('You have to provide a valid survey ID.'); - } - - - if ($iSurveyID) - { - $actresult = Survey::model()->findAll('sid = :sid AND active = :active', array(':sid' => $iSurveyID, ':active' => 'Y')); //Checked - if (count($actresult) == 0) - { - safeDie('You have to provide a valid survey ID.'); - } - else - { - $surveyinfo = getSurveyInfo($iSurveyID); - // CHANGE JSW_NZ - let's get the survey title for display - $thisSurveyTitle = $surveyinfo["name"]; - // CHANGE JSW_NZ - let's get css from individual template.css - so define path - $thisSurveyCssPath = getTemplateURL($surveyinfo["template"]); - if ($surveyinfo['publicstatistics']!='Y') - { - safeDie('The public statistics for this survey are deactivated.'); - } - - //check if graphs should be shown for this survey - if ($surveyinfo['publicgraphs']=='Y') - { - $publicgraphs = 1; - } - else - { - $publicgraphs = 0; - } - } - } - - //we collect all the output within this variable - $statisticsoutput =''; - - - //for creating graphs we need some more scripts which are included here - //True -> include - //False -> forget about charts - if (isset($publicgraphs) && $publicgraphs == 1) - { - require_once(APPPATH.'third_party/pchart/pchart/pChart.class'); - require_once(APPPATH.'third_party/pchart/pchart/pData.class'); - require_once(APPPATH.'third_party/pchart/pchart/pCache.class'); - - $MyCache = new pCache(Yii::app()->getConfig("tempdir").DIRECTORY_SEPARATOR); - //$currentuser is created as prefix for pchart files - if (isset($_SERVER['REDIRECT_REMOTE_USER'])) - { - $currentuser=$_SERVER['REDIRECT_REMOTE_USER']; - } - else if (session_id()) - { - $currentuser=substr(session_id(), 0, 15); - } - else - { - $currentuser="standard"; - } - } - - - // Set language for questions and labels to base language of this survey - if (isset($postlang) && $postlang != null ) - $language = $postlang; + if(!isset($iSurveyID)) + { + $iSurveyID=returnGlobal('sid'); + } else - $language = Survey::model()->findByPk($iSurveyID)->language; + { + $iSurveyID = (int) $iSurveyID; + } + if (!$iSurveyID) + { + //This next line ensures that the $iSurveyID value is never anything but a number. + safeDie('You have to provide a valid survey ID.'); + } - //set survey language for translations - $clang = SetSurveyLanguage($iSurveyID, $language); + if ($iSurveyID) + { + $actresult = Survey::model()->findAll('sid = :sid AND active = :active', array(':sid' => $iSurveyID, ':active' => 'Y')); //Checked + if (count($actresult) == 0) + { + safeDie('You have to provide a valid survey ID.'); + } + else + { + $surveyinfo = getSurveyInfo($iSurveyID); + // CHANGE JSW_NZ - let's get the survey title for display + $thisSurveyTitle = $surveyinfo["name"]; + // CHANGE JSW_NZ - let's get css from individual template.css - so define path + $thisSurveyCssPath = getTemplateURL($surveyinfo["template"]); + if ($surveyinfo['publicstatistics']!='Y') + { + safeDie('The public statistics for this survey are deactivated.'); + } + + //check if graphs should be shown for this survey + if ($surveyinfo['publicgraphs']=='Y') + { + $publicgraphs = 1; + } + else + { + $publicgraphs = 0; + } + } + } + + //we collect all the output within this variable + $statisticsoutput =''; - //Create header (fixes bug #3097) - $surveylanguage= $language; - sendCacheHeaders(); - $condition = false; - $sitename = Yii::app()->getConfig("sitename"); + //for creating graphs we need some more scripts which are included here + //True -> include + //False -> forget about charts + if (isset($publicgraphs) && $publicgraphs == 1) + { + require_once(APPPATH.'third_party/pchart/pchart/pChart.class'); + require_once(APPPATH.'third_party/pchart/pchart/pData.class'); + require_once(APPPATH.'third_party/pchart/pchart/pCache.class'); - $data['surveylanguage'] = $surveylanguage; - $data['sitename'] = $sitename; - $data['condition'] = $condition; - $data['thisSurveyCssPath'] = $thisSurveyCssPath; + $MyCache = new pCache(Yii::app()->getConfig("tempdir").DIRECTORY_SEPARATOR); + //$currentuser is created as prefix for pchart files + if (isset($_SERVER['REDIRECT_REMOTE_USER'])) + { + $currentuser=$_SERVER['REDIRECT_REMOTE_USER']; + } + else if (session_id()) + { + $currentuser=substr(session_id(), 0, 15); + } + else + { + $currentuser="standard"; + } + } + // Set language for questions and labels to base language of this survey + if ($sLanguage== null || !in_array($sLanguage,Survey::model()->findByPk($iSurveyID)->getAllLanguages())) + { + $sLanguage = Survey::model()->findByPk($iSurveyID)->language; + } + else + { + $sLanguage=sanitize_languagecode($sLanguage); + } + //set survey language for translations + $clang = SetSurveyLanguage($iSurveyID, $sLanguage); + //Create header + sendCacheHeaders(); + $condition = false; + $sitename = Yii::app()->getConfig("sitename"); - /* - * only show questions where question attribute "public_statistics" is set to "1" - */ + $data['surveylanguage'] = $sLanguage; + $data['sitename'] = $sitename; + $data['condition'] = $condition; + $data['thisSurveyCssPath'] = $thisSurveyCssPath; + + /* + * only show questions where question attribute "public_statistics" is set to "1" + */ $query = "SELECT q.* , group_name, group_order FROM {{questions}} q, {{groups}} g, {{question_attributes}} qa WHERE g.gid = q.gid AND g.language = :lang1 AND q.language = :lang2 AND q.sid = :surveyid AND q.qid = qa.qid AND q.parent_qid = 0 AND qa.attribute = 'public_statistics'"; @@ -182,185 +165,185 @@ class Statistics_userController extends LSYii_Controller { $query .=" AND qa.value='1'\n"; } - //execute query - $result = Yii::app()->db->createCommand($query)->bindParam(":lang1", $language, PDO::PARAM_STR)->bindParam(":lang2", $language, PDO::PARAM_STR)->bindParam(":surveyid", $iSurveyID, PDO::PARAM_INT)->queryAll(); + //execute query + $result = Yii::app()->db->createCommand($query)->bindParam(":lang1", $sLanguage, PDO::PARAM_STR)->bindParam(":lang2", $sLanguage, PDO::PARAM_STR)->bindParam(":surveyid", $iSurveyID, PDO::PARAM_INT)->queryAll(); - //store all the data in $rows - $rows = $result; + //store all the data in $rows + $rows = $result; - //SORT IN NATURAL ORDER! - usort($rows, 'groupOrderThenQuestionOrder'); + //SORT IN NATURAL ORDER! + usort($rows, 'groupOrderThenQuestionOrder'); - //put the question information into the filter array - foreach ($rows as $row) - { - //store some column names in $filters array - $filters[]=array($row['qid'], - $row['gid'], - $row['type'], - $row['title'], - $row['group_name'], - flattenText($row['question'])); - } + //put the question information into the filter array + foreach ($rows as $row) + { + //store some column names in $filters array + $filters[]=array($row['qid'], + $row['gid'], + $row['type'], + $row['title'], + $row['group_name'], + flattenText($row['question'])); + } - //number of records for this survey - $totalrecords = 0; + //number of records for this survey + $totalrecords = 0; - //count number of answers - $query = "SELECT count(*) FROM {{survey_".intval($iSurveyID)."}}"; + //count number of answers + $query = "SELECT count(*) FROM {{survey_".intval($iSurveyID)."}}"; - //if incompleted answers should be filtert submitdate has to be not null - //this setting is taken from config-defaults.php - if (Yii::app()->getConfig("filterout_incomplete_answers") == true) - { - $query .= " WHERE {{survey_".intval($iSurveyID)."}}.submitdate is not null"; - } - $result = Yii::app()->db->createCommand($query)->queryAll(); + //if incompleted answers should be filtert submitdate has to be not null + //this setting is taken from config-defaults.php + if (Yii::app()->getConfig("filterout_incomplete_answers") == true) + { + $query .= " WHERE {{survey_".intval($iSurveyID)."}}.submitdate is not null"; + } + $result = Yii::app()->db->createCommand($query)->queryAll(); - //$totalrecords = total number of answers - foreach($result as $row) - { - $totalrecords = reset($row); - } + //$totalrecords = total number of answers + foreach($result as $row) + { + $totalrecords = reset($row); + } - //this is the array which we need later... - $summary = array(); - //...while this is the array from copy/paste which we don't want to replace because this is a nasty source of error - $allfields = array(); + //this is the array which we need later... + $summary = array(); + //...while this is the array from copy/paste which we don't want to replace because this is a nasty source of error + $allfields = array(); - //---------- CREATE SGQA OF ALL QUESTIONS WHICH USE "PUBLIC_STATISTICS" ---------- + //---------- CREATE SGQA OF ALL QUESTIONS WHICH USE "PUBLIC_STATISTICS" ---------- - /* - * let's go through the filter array which contains - * ['qid'], - ['gid'], - ['type'], - ['title'], - ['group_name'], - ['question']; - */ + /* + * let's go through the filter array which contains + * ['qid'], + ['gid'], + ['type'], + ['title'], + ['group_name'], + ['question']; + */ - $currentgroup=''; - // use to check if there are any question with public statistics - if(isset($filters)){ - foreach ($filters as $flt) - { - //SGQ identifier - $myfield = "{$iSurveyID}X{$flt[1]}X{$flt[0]}"; + $currentgroup=''; + // use to check if there are any question with public statistics + if(isset($filters)){ + foreach ($filters as $flt) + { + //SGQ identifier + $myfield = "{$iSurveyID}X{$flt[1]}X{$flt[0]}"; - //let's switch through the question type for each question - switch ($flt[2]) - { - case "K": // Multiple Numerical - case "Q": // Multiple Short Text - //get answers - $query = "SELECT title as code, question as answer FROM {{questions}} WHERE parent_qid=:flt_0 AND language = :lang ORDER BY question_order"; - $result = Yii::app()->db->createCommand($query)->bindParam(":flt_0", $flt[0], PDO::PARAM_INT)->bindParam(":lang", $language, PDO::PARAM_STR)->queryAll(); + //let's switch through the question type for each question + switch ($flt[2]) + { + case "K": // Multiple Numerical + case "Q": // Multiple Short Text + //get answers + $query = "SELECT title as code, question as answer FROM {{questions}} WHERE parent_qid=:flt_0 AND language = :lang ORDER BY question_order"; + $result = Yii::app()->db->createCommand($query)->bindParam(":flt_0", $flt[0], PDO::PARAM_INT)->bindParam(":lang", $sLanguage, PDO::PARAM_STR)->queryAll(); - //go through all the (multiple) answers - foreach($result as $row) - { - $myfield2=$flt[2].$myfield.reset($row); - $allfields[] = $myfield2; - } - break; - case "A": // ARRAY OF 5 POINT CHOICE QUESTIONS - case "B": // ARRAY OF 10 POINT CHOICE QUESTIONS - case "C": // ARRAY OF YES\No\$clang->gT("Uncertain") QUESTIONS - case "E": // ARRAY OF Increase/Same/Decrease QUESTIONS - case "F": // FlEXIBLE ARRAY - case "H": // ARRAY (By Column) - //get answers - $query = "SELECT title as code, question as answer FROM {{questions}} WHERE parent_qid=:flt_0 AND language = :lang ORDER BY question_order"; - $result = Yii::app()->db->createCommand($query)->bindParam(":flt_0", $flt[0], PDO::PARAM_INT)->bindParam(":lang", $language, PDO::PARAM_STR)->queryAll(); + //go through all the (multiple) answers + foreach($result as $row) + { + $myfield2=$flt[2].$myfield.reset($row); + $allfields[] = $myfield2; + } + break; + case "A": // ARRAY OF 5 POINT CHOICE QUESTIONS + case "B": // ARRAY OF 10 POINT CHOICE QUESTIONS + case "C": // ARRAY OF YES\No\$clang->gT("Uncertain") QUESTIONS + case "E": // ARRAY OF Increase/Same/Decrease QUESTIONS + case "F": // FlEXIBLE ARRAY + case "H": // ARRAY (By Column) + //get answers + $query = "SELECT title as code, question as answer FROM {{questions}} WHERE parent_qid=:flt_0 AND language = :lang ORDER BY question_order"; + $result = Yii::app()->db->createCommand($query)->bindParam(":flt_0", $flt[0], PDO::PARAM_INT)->bindParam(":lang", $sLanguage, PDO::PARAM_STR)->queryAll(); - //go through all the (multiple) answers - foreach($result as $row) - { - $myfield2 = $myfield.reset($row); - $allfields[]=$myfield2; - } - break; - // all "free text" types (T, U, S) get the same prefix ("T") - case "T": // Long free text - case "U": // Huge free text - case "S": // Short free text - $myfield="T$myfield"; - $allfields[] = $myfield; - break; - case ";": //ARRAY (Multi Flex) (Text) - case ":": //ARRAY (Multi Flex) (Numbers) + //go through all the (multiple) answers + foreach($result as $row) + { + $myfield2 = $myfield.reset($row); + $allfields[]=$myfield2; + } + break; + // all "free text" types (T, U, S) get the same prefix ("T") + case "T": // Long free text + case "U": // Huge free text + case "S": // Short free text + $myfield="T$myfield"; + $allfields[] = $myfield; + break; + case ";": //ARRAY (Multi Flex) (Text) + case ":": //ARRAY (Multi Flex) (Numbers) $query = "SELECT title, question FROM {{questions}} WHERE parent_qid=:flt_0 AND language=:lang AND scale_id = 0 ORDER BY question_order"; - $result = Yii::app()->db->createCommand($query)->bindParam(":flt_0", $flt[0], PDO::PARAM_INT)->bindParam(":lang", $language, PDO::PARAM_STR)->queryAll(); - foreach($result as $row) - { - $fquery = "SELECT * FROM {{questions}} WHERE parent_qid = :flt_0 AND language = :lang AND scale_id = 1 ORDER BY question_order, title"; - $fresult = Yii::app()->db->createCommand($query)->bindParam(":flt_0", $flt[0], PDO::PARAM_INT)->bindParam(":lang", $language, PDO::PARAM_STR)->queryAll(); - foreach($fresult as $frow) - { - $myfield2 = $myfield . reset($row) . "_" . $frow['title']; - $allfields[]=$myfield2; - } - } - break; - case "R": //RANKING - //get some answers - $query = "SELECT code, answer FROM {{answers}} WHERE qid = :flt_0 AND language = :lang ORDER BY sortorder, answer"; - $result = Yii::app()->db->createCommand($query)->bindParam(":flt_0", $flt[0], PDO::PARAM_INT)->bindParam(":lang", $language, PDO::PARAM_STR)->queryAll(); + $result = Yii::app()->db->createCommand($query)->bindParam(":flt_0", $flt[0], PDO::PARAM_INT)->bindParam(":lang", $sLanguage, PDO::PARAM_STR)->queryAll(); + foreach($result as $row) + { + $fquery = "SELECT * FROM {{questions}} WHERE parent_qid = :flt_0 AND language = :lang AND scale_id = 1 ORDER BY question_order, title"; + $fresult = Yii::app()->db->createCommand($query)->bindParam(":flt_0", $flt[0], PDO::PARAM_INT)->bindParam(":lang", $sLanguage, PDO::PARAM_STR)->queryAll(); + foreach($fresult as $frow) + { + $myfield2 = $myfield . reset($row) . "_" . $frow['title']; + $allfields[]=$myfield2; + } + } + break; + case "R": //RANKING + //get some answers + $query = "SELECT code, answer FROM {{answers}} WHERE qid = :flt_0 AND language = :lang ORDER BY sortorder, answer"; + $result = Yii::app()->db->createCommand($query)->bindParam(":flt_0", $flt[0], PDO::PARAM_INT)->bindParam(":lang", $sLanguage, PDO::PARAM_STR)->queryAll(); - //get number of answers - $count = count($result); + //get number of answers + $count = count($result); - //loop through all answers. if there are 3 items to rate there will be 3 statistics - for ($i=1; $i<=$count; $i++) - { - $myfield2 = "R" . $myfield . $i . "-" . strlen($i); - $allfields[]=$myfield2; - } - break; - //Boilerplate questions are only used to put some text between other questions -> no analysis needed - case "X": //This is a boilerplate question and it has no business in this script - break; - case "1": // MULTI SCALE - //get answers - $query = "SELECT title, question FROM {{questions}} WHERE parent_qid = :flt_0 AND language = :lang ORDER BY question_order"; - $result = Yii::app()->db->createCommand($query)->bindParam(":flt_0", $flt[0], PDO::PARAM_INT)->bindParam(":lang", $language, PDO::PARAM_STR)->queryAll(); + //loop through all answers. if there are 3 items to rate there will be 3 statistics + for ($i=1; $i<=$count; $i++) + { + $myfield2 = "R" . $myfield . $i . "-" . strlen($i); + $allfields[]=$myfield2; + } + break; + //Boilerplate questions are only used to put some text between other questions -> no analysis needed + case "X": //This is a boilerplate question and it has no business in this script + break; + case "1": // MULTI SCALE + //get answers + $query = "SELECT title, question FROM {{questions}} WHERE parent_qid = :flt_0 AND language = :lang ORDER BY question_order"; + $result = Yii::app()->db->createCommand($query)->bindParam(":flt_0", $flt[0], PDO::PARAM_INT)->bindParam(":lang", $sLanguage, PDO::PARAM_STR)->queryAll(); - //loop through answers - foreach($result as $row) - { - //----------------- LABEL 1 --------------------- - $myfield2 = $myfield . $row['title']."#0"; - $allfields[]=$myfield2; - //----------------- LABEL 2 --------------------- - $myfield2 = $myfield . $row['title']."#1"; - $allfields[]=$myfield2; - } //end WHILE -> loop through all answers - break; + //loop through answers + foreach($result as $row) + { + //----------------- LABEL 1 --------------------- + $myfield2 = $myfield . $row['title']."#0"; + $allfields[]=$myfield2; + //----------------- LABEL 2 --------------------- + $myfield2 = $myfield . $row['title']."#1"; + $allfields[]=$myfield2; + } //end WHILE -> loop through all answers + break; - case "P": //P - Multiple choice with comments - case "M": //M - Multiple choice - case "N": //N - Numerical input - case "D": //D - Date - $myfield2 = $flt[2].$myfield; - $allfields[]=$myfield2; - break; - default: //Default settings - $allfields[] = $myfield; - break; + case "P": //P - Multiple choice with comments + case "M": //M - Multiple choice + case "N": //N - Numerical input + case "D": //D - Date + $myfield2 = $flt[2].$myfield; + $allfields[]=$myfield2; + break; + default: //Default settings + $allfields[] = $myfield; + break; - } //end switch -> check question types and create filter forms - } - //end foreach -> loop through all questions with "public_statistics" enabled - }// end if -> for removing the error message in case there are no filters - $summary = $allfields; + } //end switch -> check question types and create filter forms + } + //end foreach -> loop through all questions with "public_statistics" enabled + }// end if -> for removing the error message in case there are no filters + $summary = $allfields; // Get the survey inforamtion - $thissurvey = getSurveyInfo($surveyid,$language); + $thissurvey = getSurveyInfo($surveyid,$sLanguage); //SET THE TEMPLATE DIRECTORY if (!isset($thissurvey['templatedir']) || !$thissurvey['templatedir']) @@ -373,96 +356,96 @@ class Statistics_userController extends LSYii_Controller { } - //---------- CREATE STATISTICS ---------- + //---------- CREATE STATISTICS ---------- $redata = compact(array_keys(get_defined_vars())); doHeader(); echo templatereplace(file_get_contents(getTemplatePath(validateTemplateDir($data['sTemplatePath'])).DIRECTORY_SEPARATOR."startpage.pstpl"),array(), $redata); - //some progress bar stuff + //some progress bar stuff - // Create progress bar which is shown while creating the results - $prb = new ProgressBar(); - $prb->pedding = 2; // Bar Pedding - $prb->brd_color = "#404040 #dfdfdf #dfdfdf #404040"; // Bar Border Color + // Create progress bar which is shown while creating the results + $prb = new ProgressBar(); + $prb->pedding = 2; // Bar Pedding + $prb->brd_color = "#404040 #dfdfdf #dfdfdf #404040"; // Bar Border Color - $prb->setFrame(); // set ProgressBar Frame - $prb->frame['left'] = 50; // Frame position from left - $prb->frame['top'] = 80; // Frame position from top - $prb->addLabel('text','txt1',$clang->gT("Please wait ...")); // add Text as Label 'txt1' and value 'Please wait' - $prb->addLabel('percent','pct1'); // add Percent as Label 'pct1' - $prb->addButton('btn1',$clang->gT('Go back'),'?action=statistics&sid='.$iSurveyID); // add Button as Label 'btn1' and action '?restart=1' + $prb->setFrame(); // set ProgressBar Frame + $prb->frame['left'] = 50; // Frame position from left + $prb->frame['top'] = 80; // Frame position from top + $prb->addLabel('text','txt1',$clang->gT("Please wait ...")); // add Text as Label 'txt1' and value 'Please wait' + $prb->addLabel('percent','pct1'); // add Percent as Label 'pct1' + $prb->addButton('btn1',$clang->gT('Go back'),'?action=statistics&sid='.$iSurveyID); // add Button as Label 'btn1' and action '?restart=1' - //progress bar starts with 35% - $process_status = 35; - $prb->show(); // show the ProgressBar + //progress bar starts with 35% + $process_status = 35; + $prb->show(); // show the ProgressBar - // 1: Get list of questions with answers chosen - //"Getting Questions and Answer ..." is shown above the bar - $prb->setLabelValue('txt1',$clang->gT('Getting questions and answers ...')); - $prb->moveStep(5); + // 1: Get list of questions with answers chosen + //"Getting Questions and Answer ..." is shown above the bar + $prb->setLabelValue('txt1',$clang->gT('Getting questions and answers ...')); + $prb->moveStep(5); - // creates array of post variable names - for (reset($_POST); $key=key($_POST); next($_POST)) - { - $postvars[]=$key; - } - $data['thisSurveyTitle'] = $thisSurveyTitle; - $data['totalrecords'] = $totalrecords; - $data['clang'] = $clang; - $data['summary'] = $summary; - //show some main data at the beginnung - // CHANGE JSW_NZ - let's allow html formatted questions to show + // creates array of post variable names + for (reset($_POST); $key=key($_POST); next($_POST)) + { + $postvars[]=$key; + } + $data['thisSurveyTitle'] = $thisSurveyTitle; + $data['totalrecords'] = $totalrecords; + $data['clang'] = $clang; + $data['summary'] = $summary; + //show some main data at the beginnung + // CHANGE JSW_NZ - let's allow html formatted questions to show - //push progress bar from 35 to 40 - $process_status = 40; + //push progress bar from 35 to 40 + $process_status = 40; - //Show Summary results - if (isset($summary) && $summary) - { - //"Generating Summaries ..." is shown above the progress bar - $prb->setLabelValue('txt1',$clang->gT('Generating summaries ...')); - $prb->moveStep($process_status); + //Show Summary results + if (isset($summary) && $summary) + { + //"Generating Summaries ..." is shown above the progress bar + $prb->setLabelValue('txt1',$clang->gT('Generating summaries ...')); + $prb->moveStep($process_status); - //let's run through the survey // Fixed bug 3053 with array_unique - $runthrough=array_unique($summary); + //let's run through the survey // Fixed bug 3053 with array_unique + $runthrough=array_unique($summary); - //loop through all selected questions - foreach ($runthrough as $rt) - { + //loop through all selected questions + foreach ($runthrough as $rt) + { - //update progress bar - if ($process_status < 100) $process_status++; - $prb->moveStep($process_status); + //update progress bar + if ($process_status < 100) $process_status++; + $prb->moveStep($process_status); - } // end foreach -> loop through all questions + } // end foreach -> loop through all questions $helper = new statistics_helper(); - $statisticsoutput .= $helper->generate_statistics($iSurveyID, $summary, $summary, $publicgraphs, 'html', null,$language,false); + $statisticsoutput .= $helper->generate_statistics($iSurveyID, $summary, $summary, $publicgraphs, 'html', null,$sLanguage,false); - } //end if -> show summary results + } //end if -> show summary results $data['statisticsoutput']=$statisticsoutput; - //done! set progress bar to 100% - if (isset($prb)) - { - $prb->setLabelValue('txt1',$clang->gT('Completed')); - $prb->moveStep(100); - $prb->hide(); - } + //done! set progress bar to 100% + if (isset($prb)) + { + $prb->setLabelValue('txt1',$clang->gT('Completed')); + $prb->moveStep(100); + $prb->hide(); + } $redata = compact(array_keys(get_defined_vars())); $data['redata'] = $redata; - Yii::app()->getClientScript()->registerScriptFile(Yii::app()->getConfig('generalscripts') . 'statistics_user.js'); + Yii::app()->getClientScript()->registerScriptFile(Yii::app()->getConfig('generalscripts') . 'statistics_user.js'); $this->renderPartial('/statistics_user_view',$data); - //output footer - echo getFooter(); + //output footer + echo getFooter(); - //Delete all Session Data - Yii::app()->session['finished'] = true; - } + //Delete all Session Data + Yii::app()->session['finished'] = true; + } } diff --git a/sources/application/controllers/UploaderController.php b/sources/application/controllers/UploaderController.php index 5e8572a..16e225f 100644 --- a/sources/application/controllers/UploaderController.php +++ b/sources/application/controllers/UploaderController.php @@ -46,8 +46,8 @@ class UploaderController extends SurveyController { // Validate and filter and throw error if problems // Using 'futmp_'.randomChars(15).'_'.$pathinfo['extension'] for filename, then remove all other characters - $sFileGetContentFiltered=preg_replace('/[^a-z0-9_]/', '', $sFileGetContent); - $sFileNameFiltered = preg_replace('/[^a-z0-9_]/', '',$sFileName); + $sFileGetContentFiltered=preg_replace('/[^a-zA-Z0-9_]/', '', $sFileGetContent); + $sFileNameFiltered = preg_replace('/[^a-zA-Z0-9_]/', '',$sFileName); $sFieldNameFiltered=preg_replace('/[^X0-9]/', '', $sFieldName); if($sFileGetContent!=$sFileGetContentFiltered || $sFileName!=$sFileNameFiltered || $sFieldName!=$sFieldNameFiltered) {// If one seems to be a hack: Bad request diff --git a/sources/application/controllers/admin/authentication.php b/sources/application/controllers/admin/authentication.php index 20e3a7b..fd6bd9e 100644 --- a/sources/application/controllers/admin/authentication.php +++ b/sources/application/controllers/admin/authentication.php @@ -79,15 +79,23 @@ class Authentication extends Survey_Common_Action // Now authenticate if ($identity->authenticate()) { - FailedLoginAttempt::model()->deleteAttempts(); + FailedLoginAttempt::model()->deleteAttempts(); App()->user->setState('plugin', $authMethod); $this->getController()->_GetSessionUserRights(Yii::app()->session['loginID']); Yii::app()->session['just_logged_in'] = true; Yii::app()->session['loginsummary'] = $this->_getSummary(); + + $event = new PluginEvent('afterSuccessfulLogin'); + App()->getPluginManager()->dispatchEvent($event); + $this->_doRedirect(); } else { // Failed + $event = new PluginEvent('afterFailedLoginAttempt'); + $event->set('identity', $identity); + App()->getPluginManager()->dispatchEvent($event); + $message = $identity->errorMessage; if (empty($message)) { // If no message, return a default message @@ -105,19 +113,16 @@ class Authentication extends Survey_Common_Action */ public function logout() { - // Fetch the current user - $plugin = App()->user->getState('plugin', null); // Save for afterLogout, current user will be destroyed by then - /* Adding beforeLogout event */ $beforeLogout = new PluginEvent('beforeLogout'); - App()->getPluginManager()->dispatchEvent($beforeLogout, array($plugin)); + App()->getPluginManager()->dispatchEvent($beforeLogout); App()->user->logout(); App()->user->setFlash('loginmessage', gT('Logout successful.')); /* Adding afterLogout event */ $event = new PluginEvent('afterLogout'); - App()->getPluginManager()->dispatchEvent($event, array($plugin)); + App()->getPluginManager()->dispatchEvent($event); $this->getController()->redirect(array('/admin/authentication/sa/login')); } @@ -140,18 +145,19 @@ class Authentication extends Survey_Common_Action $aFields = User::model()->findAllByAttributes(array('users_name' => $sUserName, 'email' => $sEmailAddr)); + // Preventing attacker from easily knowing whether the user and email address are valid or not (and slowing down brute force attacks) + usleep(rand(Yii::app()->getConfig("minforgottenpasswordemaildelay"),Yii::app()->getConfig("maxforgottenpasswordemaildelay"))); + if (count($aFields) < 1) { // wrong or unknown username and/or email - $aData['errormsg'] = $this->getController()->lang->gT('User name and/or email not found!'); - $aData['maxattempts'] = ''; - $this->_renderWrappedTemplate('authentication', 'error', $aData); + $aData['message'] = '
    '.gT('If username and email that you specified are valid, a new password has been sent to you').'
    '; } else { - $aData['message'] = $this->_sendPasswordEmail($sEmailAddr, $aFields); - $this->_renderWrappedTemplate('authentication', 'message', $aData); + $aData['message'] = '
    '.$this->_sendPasswordEmail($sEmailAddr, $aFields).'
    '; } + $this->_renderWrappedTemplate('authentication', 'message', $aData); } } @@ -184,12 +190,11 @@ class Authentication extends Survey_Common_Action if (SendEmailMessage($body, $sSubject, $sTo, $sFrom, $sSiteName, false, $sSiteAdminBounce)) { User::model()->updatePassword($aFields[0]['uid'], $sNewPass); - $sMessage = $username . '
    ' . $email . '

    ' . $clang->gT('An email with your login data was sent to you.'); + $sMessage = gT('If username and email that you specified are valid, a new password has been sent to you'); } else { - $sTmp = str_replace("{NAME}", '' . $aFields[0]['users_name'] . '', $clang->gT("Email to {NAME} ({EMAIL}) failed.")); - $sMessage = str_replace("{EMAIL}", $sEmailAddr, $sTmp) . '
    '; + $sMessage = gT("Email failed."); } return $sMessage; diff --git a/sources/application/controllers/admin/checkintegrity.php b/sources/application/controllers/admin/checkintegrity.php index 235834d..5cd4341 100644 --- a/sources/application/controllers/admin/checkintegrity.php +++ b/sources/application/controllers/admin/checkintegrity.php @@ -237,23 +237,15 @@ class CheckIntegrity extends Survey_Common_Action private function _deleteQuotaMembers(array $aData, Limesurvey_lang $clang) { - $quota_ids = array(); - $quotas = Quota::model()->findAll(); - foreach ($quotas as $quota) $quota_ids[] = $quota['id']; - $criteria = new CDbCriteria; - $criteria->addNotInCondition('quota_id', $quota_ids); + $oCriteria = new CDbCriteria; + $oCriteria->join = 'LEFT JOIN {{questions}} q ON t.qid=q.qid LEFT JOIN {{surveys}} s ON t.sid=s.sid'; + $oCriteria->condition = '(q.qid IS NULL) OR (s.sid IS NULL)'; - $qids = array(); - $questions = Question::model()->findAll(); - foreach ($questions as $question) $qids[] = $question['qid']; - $criteria->addNotInCondition('qid', $qids, 'OR'); - - $sids = array(); - $surveys = Survey::model()->findAll(); - foreach ($surveys as $survey) $sids[] = $survey['sid']; - $criteria->addNotInCondition('sid', $sids, 'OR'); - - QuotaMember::model()->deleteAll($criteria); + $aRecords=QuotaMember::model()->findAll($oCriteria); + foreach ($aRecords as $aRecord) + { + QuotaMember::model()->deleteAllByAttributes($aRecord); + } if (QuotaLanguageSetting::model()->hasErrors()) safeDie(QuotaLanguageSetting::model()->getError()); $aData['messages'][] = $clang->gT('Deleting orphaned quota members.'); return $aData; @@ -286,14 +278,15 @@ class CheckIntegrity extends Survey_Common_Action private function _deleteDefaultValues(array $aData, Limesurvey_lang $clang) { - $qids = array(); - $questions = Question::model()->findAll(); - foreach ($questions as $question) $qids[] = $question['qid']; $criteria = new CDbCriteria; - $criteria->addNotInCondition('qid', $qids); + $criteria->join = 'LEFT JOIN {{questions}} q ON t.qid=q.qid'; + $criteria->condition = 'q.qid IS NULL'; - DefaultValue::model()->deleteAll($criteria); - if (DefaultValue::model()->hasErrors()) safeDie(DefaultValue::model()->getError()); + $aRecords=DefaultValue::model()->findAll($criteria); + foreach ($aRecords as $aRecord) + { + DefaultValue::model()->deleteAllByAttributes($aRecord); + } $aData['messages'][] = $clang->gT('Deleting orphaned default values.'); return $aData; } @@ -336,36 +329,37 @@ class CheckIntegrity extends Survey_Common_Action $users = User::model()->findAll(); $uids = array(); foreach ($users as $user) $uids[] = $user['uid']; - $criteria = new CDbCriteria; - $criteria->addNotInCondition('uid', $uids, 'OR'); + $oCriteria = new CDbCriteria; + $oCriteria->addNotInCondition('uid', $uids, 'OR'); $surveys = Survey::model()->findAll(); $sids = array(); foreach ($surveys as $survey) $sids[] = $survey['sid']; - $criteria->addNotInCondition('entity_id', $sids, 'OR'); - $criteria->addCondition("entity='survey'"); + $oCriteria->addNotInCondition('entity_id', $sids, 'OR'); + $oCriteria->addCondition("entity='survey'"); + + Permission::model()->deleteAll($oCriteria); - Permission::model()->deleteAll($criteria); - // Deactivate surveys that have a missing response table - foreach ($surveys as $survey) + foreach ($surveys as $survey) { if ($survey['active']=='Y' && !tableExists("{{survey_{$survey['sid']}}}")) { Survey::model()->updateByPk($survey['sid'],array('active'=>'N')); } } - - - + unset($surveys); + + + // Fix subquestions fixSubquestions(); /*** Check for active survey tables with missing survey entry and rename them ***/ $sDBPrefix = Yii::app()->db->tablePrefix; $sQuery = dbSelectTablesLike('{{survey}}\_%'); - $aResult = dbQueryOrFalse($sQuery) or safeDie("Couldn't get list of conditions from database
    {$sQuery}
    "); + $aResult = dbQueryOrFalse($sQuery); foreach ($aResult->readAll() as $aRow) { $sTableName = substr(reset($aRow), strlen($sDBPrefix)); @@ -388,7 +382,7 @@ class CheckIntegrity extends Survey_Common_Action } /*** Check for active token tables with missing survey entry ***/ - $aResult = dbQueryOrFalse(dbSelectTablesLike('{{tokens}}\_%')) or safeDie("Couldn't get list of conditions from database
    {$sQuery}
    "); + $aResult = dbQueryOrFalse(dbSelectTablesLike('{{tokens}}\_%')); foreach ($aResult->readAll() as $aRow) { $sTableName = substr(reset($aRow), strlen($sDBPrefix)); @@ -408,16 +402,15 @@ class CheckIntegrity extends Survey_Common_Action /**********************************************************************/ /* Check conditions */ /**********************************************************************/ - // TMSW Condition->Relevance: Replace this with analysis of relevance - $conditions = Condition::model()->findAll(); - if (Condition::model()->hasErrors()) safeDie(Condition::model()->getError()); $okQuestion = array(); - foreach ($conditions as $condition) + $sQuery = 'SELECT cqid,cid,cfieldname FROM {{conditions}}'; + $aConditions = Yii::app()->db->createCommand($sQuery)->queryAll(); + foreach ($aConditions as $condition) { if ($condition['cqid'] != 0) { // skip case with cqid=0 for codnitions on {TOKEN:EMAIL} for instance if (!array_key_exists($condition['cqid'], $okQuestion)) { $iRowCount = Question::model()->countByAttributes(array('qid' => $condition['cqid'])); - if (Question::model()->hasErrors()) safeDie(Question::model()->getError()); + if (Question::model()->hasErrors()) safeDie(Question::model()->getError()); if (!$iRowCount) { $aDelete['conditions'][] = array('cid' => $condition['cid'], 'reason' => $clang->gT('No matching CQID')); } else { @@ -439,7 +432,8 @@ class CheckIntegrity extends Survey_Common_Action $aDelete['conditions'][] = array('cid' => $condition['cid'], 'reason' => $clang->gT('No CFIELDNAME field set!') . " ({$condition['cfieldname']})"); } } - + unset($okQuestion); + unset($aConditions); /**********************************************************************/ /* Check question attributes */ /**********************************************************************/ @@ -454,14 +448,11 @@ class CheckIntegrity extends Survey_Common_Action /**********************************************************************/ /* Check default values */ /**********************************************************************/ - $questions = Question::model()->findAll(); - if (Question::model()->hasErrors()) safeDie(Question::model()->getError()); - $qids = array(); - foreach ($questions as $question) $qids[] = $question['qid']; - $criteria = new CDbCriteria; - $criteria->addNotInCondition('qid', $qids); - - $aDelete['defaultvalues'] = count(DefaultValue::model()->findAll($criteria)); + $oCriteria = new CDbCriteria; + $oCriteria->join = 'LEFT JOIN {{questions}} q ON t.qid=q.qid'; + $oCriteria->condition = 'q.qid IS NULL'; + $aRecords=DefaultValue::model()->findAll($oCriteria); + $aDelete['defaultvalues'] = count($aRecords); if (DefaultValue::model()->hasErrors()) safeDie(DefaultValue::model()->getError()); /**********************************************************************/ @@ -471,10 +462,10 @@ class CheckIntegrity extends Survey_Common_Action if (Survey::model()->hasErrors()) safeDie(Survey::model()->getError()); $sids = array(); foreach ($surveys as $survey) $sids[] = $survey['sid']; - $criteria = new CDbCriteria; - $criteria->addNotInCondition('sid', $sids); + $oCriteria = new CDbCriteria; + $oCriteria->addNotInCondition('sid', $sids); - $aDelete['quotas'] = count(Quota::model()->findAll($criteria)); + $aDelete['quotas'] = count(Quota::model()->findAll($oCriteria)); if (Quota::model()->hasErrors()) safeDie(Quota::model()->getError()); /**********************************************************************/ @@ -484,40 +475,28 @@ class CheckIntegrity extends Survey_Common_Action if (Quota::model()->hasErrors()) safeDie(Quota::model()->getError()); $ids = array(); foreach ($quotas as $quota) $ids[] = $quota['id']; - $criteria = new CDbCriteria; - $criteria->addNotInCondition('quotals_quota_id', $ids); + $oCriteria = new CDbCriteria; + $oCriteria->addNotInCondition('quotals_quota_id', $ids); - $aDelete['quotals'] = count(QuotaLanguageSetting::model()->findAll($criteria)); + $aDelete['quotals'] = count(QuotaLanguageSetting::model()->findAll($oCriteria)); if (QuotaLanguageSetting::model()->hasErrors()) safeDie(QuotaLanguageSetting::model()->getError()); /**********************************************************************/ /* Check quota members */ /**********************************************************************/ - $quotas = Quota::model()->findAll(); - $quota_ids = array(); - foreach ($quotas as $quota) $quota_ids[] = $quota['id']; - $criteria = new CDbCriteria; - $criteria->addNotInCondition('quota_id', $quota_ids); + $oCriteria = new CDbCriteria; + $oCriteria->join = 'LEFT JOIN {{questions}} q ON t.qid=q.qid LEFT JOIN {{surveys}} s ON t.sid=s.sid'; + $oCriteria->condition = '(q.qid IS NULL) OR (s.sid IS NULL)'; - $questions = Question::model()->findAll(); - $qids = array(); - foreach ($questions as $question) $qids[] = $question['qid']; - $criteria->addNotInCondition('qid', $qids, 'OR'); - - $surveys = Survey::model()->findAll(); - $sids = array(); - foreach ($surveys as $survey) $sids[] = $survey['sid']; - $criteria->addNotInCondition('sid', $sids, 'OR'); - - $aDelete['quotamembers'] = count(QuotaMember::model()->findAll($criteria)); + $aDelete['quotamembers'] = count(QuotaMember::model()->findAll($oCriteria)); if (QuotaMember::model()->hasErrors()) safeDie(QuotaMember::model()->getError()); /**********************************************************************/ /* Check assessments */ /**********************************************************************/ - $criteria = new CDbCriteria; - $criteria->compare('scope', 'T'); - $assessments = Assessment::model()->findAll($criteria); + $oCriteria = new CDbCriteria; + $oCriteria->compare('scope', 'T'); + $assessments = Assessment::model()->findAll($oCriteria); if (Assessment::model()->hasErrors()) safeDie(Assessment::model()->getError()); foreach ($assessments as $assessment) { @@ -528,9 +507,9 @@ class CheckIntegrity extends Survey_Common_Action } } - $criteria = new CDbCriteria; - $criteria->compare('scope', 'G'); - $assessments = Assessment::model()->findAll($criteria); + $oCriteria = new CDbCriteria; + $oCriteria->compare('scope', 'G'); + $assessments = Assessment::model()->findAll($oCriteria); if (Assessment::model()->hasErrors()) safeDie(Assessment::model()->getError()); foreach ($assessments as $assessment) { @@ -540,25 +519,19 @@ class CheckIntegrity extends Survey_Common_Action $aDelete['assessments'][] = array('id' => $assessment['id'], 'assessment' => $assessment['name'], 'reason' => $clang->gT('No matching group')); } } + unset($assessments); /**********************************************************************/ /* Check answers */ /**********************************************************************/ - $answers = Answer::model()->findAll(); - if (Answer::model()->hasErrors()) safeDie(Answer::model()->getError()); - $okQuestion = array(); + $oCriteria = new CDbCriteria; + $oCriteria->join = 'LEFT JOIN {{questions}} q ON t.qid=q.qid'; + $oCriteria->condition = '(q.qid IS NULL)'; + + $answers = Answer::model()->findAll($oCriteria); foreach ($answers as $answer) { - if (!array_key_exists($answer['qid'], $okQuestion)) { - $iAnswerCount = Question::model()->countByAttributes(array('qid' => $answer['qid'])); - if (Question::model()->hasErrors()) safeDie(Question::model()->getError()); - if (!$iAnswerCount) { - $aDelete['answers'][] = array('qid' => $answer['qid'], 'code' => $answer['code'], 'reason' => $clang->gT('No matching question')); - } else { - $okQuestion[$answer['qid']] = $answer['qid']; - } - } + $aDelete['answers'][] = array('qid' => $answer['qid'], 'code' => $answer['code'], 'reason' => $clang->gT('No matching question')); } - /***************************************************************************/ /* Check survey languagesettings and restore them if they don't exist */ /***************************************************************************/ @@ -590,7 +563,7 @@ class CheckIntegrity extends Survey_Common_Action } } } - + /**********************************************************************/ /* Check survey language settings */ @@ -599,9 +572,9 @@ class CheckIntegrity extends Survey_Common_Action if (Survey::model()->hasErrors()) safeDie(Survey::model()->getError()); $sids = array(); foreach ($surveys as $survey) $sids[] = $survey['sid']; - $criteria = new CDbCriteria; - $criteria->addNotInCondition('surveyls_survey_id', $sids); - $surveys_languagesettings = SurveyLanguageSetting::model()->findAll($criteria); + $oCriteria = new CDbCriteria; + $oCriteria->addNotInCondition('surveyls_survey_id', $sids); + $surveys_languagesettings = SurveyLanguageSetting::model()->findAll($oCriteria); if (SurveyLanguageSetting::model()->hasErrors()) safeDie(SurveyLanguageSetting::model()->getError()); foreach ($surveys_languagesettings as $surveys_languagesetting) @@ -612,23 +585,14 @@ class CheckIntegrity extends Survey_Common_Action /**********************************************************************/ /* Check questions */ /**********************************************************************/ - $questions = Question::model()->findAll(); + $oCriteria = new CDbCriteria; + $oCriteria->join = 'LEFT JOIN {{surveys}} s ON t.sid=s.sid LEFT JOIN {{groups}} g ON t.gid=g.gid'; + $oCriteria->condition = '(g.gid IS NULL) OR (s.sid IS NULL)'; + $questions = Question::model()->findAll($oCriteria); if (Question::model()->hasErrors()) safeDie(Question::model()->getError()); - $groups = QuestionGroup::model()->findAll(); - if (QuestionGroup::model()->hasErrors()) safeDie(QuestionGroup::model()->getError()); - $gids = array(); - foreach ($groups as $group) $gids[] = $group['gid']; - foreach ($questions as $question) { - //Make sure the group exists - if (!in_array($question['gid'], $gids)) { - $aDelete['questions'][] = array('qid' => $question['qid'], 'reason' => $clang->gT('No matching group') . " ({$question['gid']})"); - } - //Make sure survey exists - if (!in_array($question['sid'], $sids)) { - $aDelete['questions'][] = array('qid' => $question['qid'], 'reason' => $clang->gT('There is no matching survey.') . " ({$question['sid']})"); - } + $aDelete['questions'][] = array('qid' => $question['qid'], 'reason' => $clang->gT('No matching group') . " ({$question['gid']})"); } /**********************************************************************/ @@ -638,9 +602,9 @@ class CheckIntegrity extends Survey_Common_Action if (Survey::model()->hasErrors()) safeDie(Survey::model()->getError()); $sids = array(); foreach ($surveys as $survey) $sids[] = $survey['sid']; - $criteria = new CDbCriteria; - $criteria->addNotInCondition('sid', $sids); - $groups = QuestionGroup::model()->findAll($criteria); + $oCriteria = new CDbCriteria; + $oCriteria->addNotInCondition('sid', $sids); + $groups = QuestionGroup::model()->findAll($oCriteria); foreach ($groups as $group) { $aDelete['groups'][] = array('gid' => $group['gid'], 'reason' => $clang->gT('There is no matching survey.') . ' SID:' . $group['sid']); @@ -653,14 +617,12 @@ class CheckIntegrity extends Survey_Common_Action //2: Check if that survey id still exists //3: If it doesn't offer it for deletion $sQuery = dbSelectTablesLike('{{old_survey}}%'); - $aResult = dbQueryOrFalse($sQuery) or safeDie("Couldn't get list of conditions from database
    $sQuery
    "); - $aTables = $aResult->readAll(); + $aTables = Yii::app()->db->createCommand($sQuery)->queryColumn(); $aOldSIDs = array(); $aSIDs = array(); foreach ($aTables as $sTable) { - $sTable = reset($sTable); list($sOldText, $SurveyText, $iSurveyID, $sDate) = explode('_', substr($sTable, strlen($sDBPrefix))); $aOldSIDs[] = $iSurveyID; $aFullOldSIDs[$iSurveyID][] = $sTable; @@ -724,8 +686,8 @@ class CheckIntegrity extends Survey_Common_Action //1: Get list of 'old_token' tables and extract the survey id //2: Check if that survey id still exists //3: If it doesn't offer it for deletion - $aResult = dbQueryOrFalse(dbSelectTablesLike('{{old_token}}%')) or safeDie("Couldn't get list of conditions from database
    $sQuery
    "); - $aTables = $aResult->readAll(); + $sQuery = dbSelectTablesLike('{{old_token}}%'); + $aTables = Yii::app()->db->createCommand($sQuery)->queryColumn(); $aOldTokenSIDs = array(); $aTokenSIDs = array(); @@ -733,8 +695,6 @@ class CheckIntegrity extends Survey_Common_Action foreach ($aTables as $sTable) { - $sTable = reset($sTable); - list($sOldText, $SurveyText, $iSurveyID, $sDateTime) = explode('_', substr($sTable, strlen($sDBPrefix))); $aTokenSIDs[] = $iSurveyID; $aFullOldTokenSIDs[$iSurveyID][] = $sTable; diff --git a/sources/application/controllers/admin/conditionsaction.php b/sources/application/controllers/admin/conditionsaction.php index dc103f5..3c3d59d 100644 --- a/sources/application/controllers/admin/conditionsaction.php +++ b/sources/application/controllers/admin/conditionsaction.php @@ -515,6 +515,7 @@ class conditionsaction extends Survey_Common_Action { //BEGIN: GATHER INFORMATION // 1: Get information for this question + // @todo : use viewHelper::getFieldText and getFieldCode for 2.06 for string show to user if (!isset($qid)) { $qid = returnGlobal('qid'); } if (!isset($iSurveyID)) { $iSurveyID = returnGlobal('sid'); } $thissurvey = getSurveyInfo($iSurveyID); @@ -814,8 +815,10 @@ class conditionsaction extends Survey_Common_Action { foreach ($aresult as $arows) { $attr = getQuestionAttributeValues($rows['qid']); - $label1 = isset($attr['dualscale_headerA']) ? $attr['dualscale_headerA'] : 'Label1'; - $label2 = isset($attr['dualscale_headerB']) ? $attr['dualscale_headerB'] : 'Label2'; + $sLanguage=Survey::model()->findByPk($iSurveyID)->language; + // dualscale_header are allways set, but can be empty + $label1 = empty($attr['dualscale_headerA'][$sLanguage]) ? gt('Scale 1') : $attr['dualscale_headerA'][$sLanguage]; + $label2 = empty($attr['dualscale_headerB'][$sLanguage]) ? gt('Scale 2') : $attr['dualscale_headerB'][$sLanguage]; $shortanswer = "{$arows['title']}: [" . strip_tags($arows['question']) . "][$label1]"; $shortquestion = $rows['title'].":$shortanswer ".strip_tags($rows['question']); $cquestions[] = array($shortquestion, $rows['qid'], $rows['type'], $rows['sid'].$X.$rows['gid'].$X.$rows['qid'].$arows['title']."#0"); @@ -1280,7 +1283,7 @@ class conditionsaction extends Survey_Common_Action { ->bindValue(":lang1", $sLanguage, PDO::PARAM_STR) ->bindValue(":lang2", $sLanguage, PDO::PARAM_STR) ->query() or safeDie ("Couldn't get other conditions for question $qid
    $query
    "); - + $querytoken = "SELECT count(*) as recordcount " ."FROM {{conditions}} " ."WHERE " @@ -1310,7 +1313,7 @@ class conditionsaction extends Survey_Common_Action { ->bindValue(":scenario", $scenarionr['scenario'], PDO::PARAM_INT) ->bindValue(":qid", $qid, PDO::PARAM_INT) ->query() or safeDie ("Couldn't get other conditions for question $qid
    $query
    "); - + $conditionscount=$conditionscount+$conditionscounttoken; if ($conditionscount > 0) @@ -1341,19 +1344,17 @@ class conditionsaction extends Survey_Common_Action { $markcidstyle="editedrow"; } - if (isset($currentfield) && $currentfield != $rows['cfieldname']) + if (isset($currentfield) && $currentfield != $rows['cfieldname'] ) { $aViewUrls['output'] .= "\n" - ."\t\n" - ."" - .$clang->gT("and").""; + ."\t\n" + .$clang->gT("and").""; } elseif (isset($currentfield)) { $aViewUrls['output'] .= "\n" - ."\t\n" - ."" - .$clang->gT("or").""; + ."\t\n" + .$clang->gT("or").""; } $aViewUrls['output'] .= "\t\n" @@ -1378,14 +1379,23 @@ class conditionsaction extends Survey_Common_Action { { $leftOperandType = 'tokenattr'; $aTokenAttrNames=getTokenFieldsAndNames($iSurveyID); - if (count($aTokenAttrNames) != 0) + if(isset($aTokenAttrNames[strtolower($extractedTokenAttr[1])])) { - $thisAttrName=HTMLEscape($aTokenAttrNames[strtolower($extractedTokenAttr[1])]['description'])." [".$clang->gT("From token table")."]"; + $thisAttrName=HTMLEscape($aTokenAttrNames[strtolower($extractedTokenAttr[1])]['description']); } else { - $thisAttrName=HTMLEscape($extractedTokenAttr[1])." [".$clang->gT("Inexistant token table")."]"; + $thisAttrName=HTMLEscape($extractedTokenAttr[1]); } + if(tableExists("{{tokens_$iSurveyID}}")) + { + $thisAttrName.= " [".$clang->gT("From token table")."]"; + } + else + { + $thisAttrName.= " [".$clang->gT("Inexistant token table")."]"; + } + $aViewUrls['output'] .= "\t$thisAttrName\n"; // TIBO not sure this is used anymore !! $conditionsList[]=array("cid"=>$rows['cid'], @@ -1473,7 +1483,7 @@ class conditionsaction extends Survey_Common_Action { } } } - // if $rightOperandType is still unkown then it is a simple constant + // if $rightOperandType is still unknown then it is a simple constant if ($rightOperandType == 'unknown') { $rightOperandType = 'constantVal'; @@ -1524,7 +1534,7 @@ class conditionsaction extends Survey_Common_Action { // now set the corresponding hidden input field // depending on the rightOperandType - // This is used when Editting a condition + // This is used when editing a condition if ($rightOperandType == 'predefinedAnsw') { $aViewUrls['output'] .= CHtml::hiddenField('EDITcanswers[]', HTMLEscape($rows['value']), array( diff --git a/sources/application/controllers/admin/database.php b/sources/application/controllers/admin/database.php index 68e8766..26b3092 100644 --- a/sources/application/controllers/admin/database.php +++ b/sources/application/controllers/admin/database.php @@ -95,11 +95,30 @@ class database extends Survey_Common_Action { foreach ($aSurveyLanguages as $sLanguage) { - if (!is_null(Yii::app()->request->getPost('defaultanswerscale_0_'.$sLanguage.'_0'))) - { - $this->_updateDefaultValues($iQuestionID,0,0,'',$sLanguage,Yii::app()->request->getPost('defaultanswerscale_0_'.$sLanguage.'_0'),true); + // Qick and dirty insert for yes/no defaul value + // write the the selectbox option, or if "EM" is slected, this value to table + if ($sQuestionType == 'Y'){ + /// value for all langs + if (Yii::app()->request->getPost('samedefault') == 1){ + $sLanguage = $aSurveyLanguages[0]; // turn + }else{ + $sCurrentLang = $sLanguage; // edit the next lines + } + if ( Yii::app()->request->getPost('defaultanswerscale_0_'.$sLanguage) == 'EM') { // Case EM, write expression to database + $this->_updateDefaultValues($iQuestionID,0,0,'',$sLanguage,Yii::app()->request->getPost('defaultanswerscale_0_'.$sLanguage.'_EM'),true); + } + else{ + // Case "other", write list value to database + $this->_updateDefaultValues($iQuestionID,0,0,'',$sLanguage,Yii::app()->request->getPost('defaultanswerscale_0_'.$sLanguage),true); + } + ///// end yes/no + }else{ + if (!is_null(Yii::app()->request->getPost('defaultanswerscale_0_'.$sLanguage.'_0'))) + { + $this->_updateDefaultValues($iQuestionID,0,0,'',$sLanguage,Yii::app()->request->getPost('defaultanswerscale_0_'.$sLanguage.'_0'),true); + } } - } + } } Yii::app()->session['flashmessage'] = $clang->gT("Default value settings were successfully saved."); LimeExpressionManager::SetDirtyFlag(); @@ -135,12 +154,6 @@ class database extends Survey_Common_Action for ($iSortOrderID=1;$iSortOrderID<$iMaxCount;$iSortOrderID++) { $sCode=sanitize_paranoid_string(Yii::app()->request->getPost('code_'.$iSortOrderID.'_'.$iScaleID)); - if (Yii::app()->request->getPost('oldcode_'.$iSortOrderID.'_'.$iScaleID)) { - $sOldCode=sanitize_paranoid_string(Yii::app()->request->getPost('oldcode_'.$iSortOrderID.'_'.$iScaleID)); - if($sCode !== $sOldCode) { - Condition::model()->updateAll(array('value'=>$sCode), 'cqid=:cqid AND value=:value', array(':cqid'=>$iQuestionID, ':value'=>$sOldCode)); - } - } $iAssessmentValue=(int) Yii::app()->request->getPost('assessment_'.$iSortOrderID.'_'.$iScaleID); foreach ($aSurveyLanguages as $sLanguage) @@ -161,8 +174,11 @@ class database extends Survey_Common_Action { Yii::app()->setFlashMessage($clang->gT("Failed to update answers"),'error'); } - } // foreach ($alllanguages as $language) - if(isset($sOldCode) && $sCode !== $sOldCode) { + } + // Updating code (oldcode!==null) => update condition with the new code + $sOldCode=Yii::app()->request->getPost('oldcode_'.$iSortOrderID.'_'.$iScaleID); + if(isset($sOldCode) && $sCode !== $sOldCode) + { Condition::model()->updateAll(array('value'=>$sCode), 'cqid=:cqid AND value=:value', array(':cqid'=>$iQuestionID, ':value'=>$sOldCode)); } } // for ($sortorderid=0;$sortorderid<$maxcount;$sortorderid++) @@ -283,7 +299,14 @@ class database extends Survey_Common_Action $oSubQuestion->scale_id=$iScaleID; } } - $bSubQuestionResult=$oSubQuestion->save(); + if ($oSubQuestion->qid) { + switchMSSQLIdentityInsert('questions',true); + $bSubQuestionResult=$oSubQuestion->save(); + switchMSSQLIdentityInsert('questions',false); + }else + { + $bSubQuestionResult=$oSubQuestion->save(); + } if($bSubQuestionResult) { if(substr($subquestionkey,0,3)!='new' && isset($aOldCodes[$iScaleID][$iPosition]) && $aCodes[$iScaleID][$iPosition] !== $aOldCodes[$iScaleID][$iPosition]) @@ -894,10 +917,6 @@ class database extends Survey_Common_Action $url = Yii::app()->request->getPost('url_'.$langname); if ($url == 'http://') {$url="";} - $short_title = html_entity_decode(Yii::app()->request->getPost('short_title_'.$langname), ENT_QUOTES, "UTF-8"); - $description = html_entity_decode(Yii::app()->request->getPost('description_'.$langname), ENT_QUOTES, "UTF-8"); - $welcome = html_entity_decode(Yii::app()->request->getPost('welcome_'.$langname), ENT_QUOTES, "UTF-8"); - $endtext = html_entity_decode(Yii::app()->request->getPost('endtext_'.$langname), ENT_QUOTES, "UTF-8"); $sURLDescription = html_entity_decode(Yii::app()->request->getPost('urldescrip_'.$langname), ENT_QUOTES, "UTF-8"); $sURL = html_entity_decode(Yii::app()->request->getPost('url_'.$langname), ENT_QUOTES, "UTF-8"); diff --git a/sources/application/controllers/admin/dataentry.php b/sources/application/controllers/admin/dataentry.php index 9d79fad..1f3ad30 100644 --- a/sources/application/controllers/admin/dataentry.php +++ b/sources/application/controllers/admin/dataentry.php @@ -138,9 +138,9 @@ class dataentry extends Survey_Common_Action $clang = $this->getController()->lang; $filePath = $this->_moveUploadedFile($aData); //$aFileContents = $this->_readFile($filePath); - + Yii::app()->loadHelper('admin/import'); - // Fill option + // Fill option $aOptions=array(); $aOptions['bDeleteFistLine']=(Yii::app()->request->getPost('dontdeletefirstline') == "dontdeletefirstline")?false:true;// Force, maybe function change ;) if(Yii::app()->request->getPost('noid')==="noid"){ @@ -157,7 +157,7 @@ class dataentry extends Survey_Common_Action $aData['class']=""; $aData['title']=$clang->gT("Import a VV response data file"); $aData['aResult']['success'][]=$clang->gT("File upload succeeded."); - if(isset($aResult['success'])){ + if(isset($aResult['success'])){ $aData['aResult']['success']=array_merge($aData['aResult']['success'],$aResult['success']); } $aData['aResult']['errors']=(isset($aResult['errors'])) ? $aResult['errors'] : false; @@ -251,7 +251,7 @@ class dataentry extends Survey_Common_Action { if (!App()->getRequest()->isPostRequest || App()->getRequest()->getPost('table') == 'none') { - + // Schema that serves as the base for compatibility checks. $baseSchema = SurveyDynamic::model($iSurveyId)->getTableSchema(); $tables = App()->getApi()->getOldResponseTables($iSurveyId); @@ -272,7 +272,7 @@ class dataentry extends Survey_Common_Action } } } - + $aData = array(); $aData['surveyid'] = $iSurveyId; $aData['settings']['table'] = array( @@ -297,10 +297,11 @@ class dataentry extends Survey_Common_Action } else { + $aSRIDConversions=array(); $targetSchema = SurveyDynamic::model($iSurveyId)->getTableSchema(); $sourceTable = PluginDynamic::model($_POST['table']); $sourceSchema = $sourceTable->getTableSchema(); - + $fieldMap = array(); $pattern = '/([\d]+)X([\d]+)X([\d]+.*)/'; foreach ($sourceSchema->getColumnNames() as $name) @@ -332,7 +333,7 @@ class dataentry extends Survey_Common_Action $sourceResponses = new CDataProviderIterator(new CActiveDataProvider($sourceTable), 500); foreach ($sourceResponses as $sourceResponse) { - + $iOldID=$sourceResponse->id; // Using plugindynamic model because I dont trust surveydynamic. $targetResponse = new PluginDynamic("{{survey_$iSurveyId}}"); @@ -342,37 +343,36 @@ class dataentry extends Survey_Common_Action } $imported++; $targetResponse->save(); + $aSRIDConversions[$iOldID]=$targetResponse->id; unset($targetResponse); } - + Yii::app()->session['flashmessage'] = sprintf(gT("%s old response(s) were successfully imported."), $imported); - $sOldTimingsTable=substr($sourceTable->tableName(),0,strrpos($sourceTable->tableName(),'_')).'_timings'.substr($sourceTable->tableName(),strrpos($sourceTable->tableName(),'_')); - $sNewTimingsTable = "{{{$surveyid}_timings}}"; + $sOldTimingsTable=substr(substr($sourceTable->tableName(),0,strrpos($sourceTable->tableName(),'_')).'_timings'.substr($sourceTable->tableName(),strrpos($sourceTable->tableName(),'_')),strlen(Yii::app()->db->tablePrefix)); + $sNewTimingsTable = "survey_{$surveyid}_timings"; if (isset($_POST['timings']) && $_POST['timings'] == 1 && tableExists($sOldTimingsTable) && tableExists($sNewTimingsTable)) { // Import timings - $aFieldsOldTimingTable=array_values($schema->getTable($sOldTimingsTable)->columnNames); - $aFieldsNewTimingTable=array_values($schema->getTable($sNewTimingsTable)->columnNames); + $arDestination=SurveyTimingDynamic::model($surveyid); + $aFieldsOldTimingTable=array_values(Yii::app()->db->schema->getTable('{{'.$sOldTimingsTable.'}}')->columnNames); + $aFieldsNewTimingTable=array_values(Yii::app()->db->schema->getTable('{{'.$sNewTimingsTable.'}}')->columnNames); $aValidTimingFields=array_intersect($aFieldsOldTimingTable,$aFieldsNewTimingTable); - $queryOldValues = "SELECT ".implode(", ",$aValidTimingFields)." FROM {$sOldTimingsTable} "; - $resultOldValues = dbExecuteAssoc($queryOldValues) or show_error("Error:
    $queryOldValues
    "); + $sQueryOldValues = "SELECT ".implode(", ",$aValidTimingFields)." FROM {{{$sOldTimingsTable}}} "; + $aQueryOldValues = Yii::app()->db->createCommand($sQueryOldValues)->query()->readAll(); //Checked $iRecordCountT=0; - $aSRIDConversions=array(); - foreach ($resultOldValues->readAll() as $sTable) + foreach ($aQueryOldValues as $sRecord) { - if (isset($aSRIDConversions[$sTable['id']])) + if (isset($aSRIDConversions[$sRecord['id']])) { - $sTable['id']=$aSRIDConversions[$sTable['id']]; + $sRecord['id']=$aSRIDConversions[$sRecord['id']]; } else continue; - //$sInsertSQL=Yii::app()->db->GetInsertSQL($sNewTimingsTable,$row); - $sInsertSQL="INSERT into {$sNewTimingsTable} (".implode(",", array_map("dbQuoteID", array_keys($sTable))).") VALUES (".implode(",", array_map("dbQuoteAll", array_values($sTable))).")"; - $aTables = dbExecuteAssoc($sInsertSQL) or show_error("Error:
    $sInsertSQL
    "); + Yii::app()->db->createCommand()->insert("{{{$sNewTimingsTable}}}",$sRecord); $iRecordCountT++; } Yii::app()->session['flashmessage'] = sprintf(gT("%s old response(s) and according timings were successfully imported."),$imported,$iRecordCountT); @@ -1828,7 +1828,7 @@ class dataentry extends Survey_Common_Action $message .= $clang->gT("Reload your survey by clicking on the following link (or pasting it into your browser):")."\n"; $message .= Yii::app()->getController()->createAbsoluteUrl("/survey/index/sid/{$iSurveyID}/loadall/reload/scid/{$scid}/loadname/".rawurlencode ($saver['identifier'])."/loadpass/".rawurlencode ($saver['password'])."/lang/".rawurlencode($saver['language'])); if (isset($tokendata['token'])) { $message .= "/token/".rawurlencode($tokendata['token']); } - + $from = $thissurvey['adminemail']; if (SendEmailMessage($message, $subject, $saver['email'], $from, $sitename, false, getBounceEmail($surveyid))) @@ -2120,7 +2120,7 @@ class dataentry extends Survey_Common_Action case "R": //RANKING TYPE QUESTION $thisqid=$deqrow['qid']; $ansquery = "SELECT * FROM {{answers}} WHERE qid=$thisqid AND language='{$sDataEntryLanguage}' ORDER BY sortorder, answer"; - $ansresult = dbExecuteAssoc($ansquery); + $ansresult = dbExecuteAssoc($ansquery); $ansresult = $ansresult->readAll(); $anscount = count($ansresult); @@ -2150,7 +2150,7 @@ class dataentry extends Survey_Common_Action } $meaquery = "SELECT title, question FROM {{questions}} WHERE parent_qid={$deqrow['qid']} AND language='{$sDataEntryLanguage}' ORDER BY question_order"; $mearesult = dbExecuteAssoc($meaquery); - + $cdata['mearesult'] = $mearesult->readAll(); $meacount = count($cdata['mearesult']); $cdata['meacount'] = $meacount; diff --git a/sources/application/controllers/admin/emailtemplates.php b/sources/application/controllers/admin/emailtemplates.php index 4c1661d..aad68dd 100644 --- a/sources/application/controllers/admin/emailtemplates.php +++ b/sources/application/controllers/admin/emailtemplates.php @@ -87,9 +87,9 @@ class emailtemplates extends Survey_Common_Action { $uploadUrl = Yii::app()->getBaseUrl(true) . substr(Yii::app()->getConfig('uploadurl'),strlen(Yii::app()->getConfig('publicurl'))-1); // We need the real path since we check that the resolved file name starts with this path. $uploadDir = realpath(Yii::app()->getConfig('uploaddir')); - $save=Yii::app()->request->getPost('save',''); + $sSaveMethod=Yii::app()->request->getPost('save',''); $clang = $this->getController()->lang; - if (Permission::model()->hasSurveyPermission($iSurveyId, 'surveylocale','update')) + if (Permission::model()->hasSurveyPermission($iSurveyId, 'surveylocale','update') && $sSaveMethod!='') { $languagelist = Survey::model()->findByPk($iSurveyId)->additionalLanguages; $languagelist[] = Survey::model()->findByPk($iSurveyId)->language; @@ -116,7 +116,7 @@ class emailtemplates extends Survey_Common_Action { unset($attachments[$index]); } } - else + else { unset($attachments[$index]); } @@ -128,7 +128,7 @@ class emailtemplates extends Survey_Common_Action { { $_POST['attachments'][$langname] = array(); } - + $attributes = array( 'surveyls_email_invite_subj' => $_POST['email_invitation_subj_'.$langname], 'surveyls_email_invite' => $_POST['email_invitation_'.$langname], @@ -147,8 +147,9 @@ class emailtemplates extends Survey_Common_Action { $usquery = SurveyLanguageSetting::model()->updateAll($attributes,'surveyls_survey_id = :ssid AND surveyls_language = :sl', array(':ssid' => $iSurveyId, ':sl' => $langname)); } Yii::app()->session['flashmessage'] = $clang->gT("Email templates successfully saved."); + $this->getController()->redirect(array('admin/emailtemplates/sa/index/surveyid/'.$iSurveyId)); } - if($save=='saveclose') + if($sSaveMethod=='saveclose') $this->getController()->redirect(array('admin/survey/sa/view/surveyid/'.$iSurveyId)); else self::index($iSurveyId); @@ -163,7 +164,7 @@ class emailtemplates extends Survey_Common_Action { * @param array $aData Data to be passed on. Optional. */ protected function _renderWrappedTemplate($sAction = 'emailtemplates', $aViewUrls = array(), $aData = array()) - { + { App()->getClientScript()->registerScriptFile(Yii::app()->getConfig('adminscripts') . 'emailtemplates.js'); $aData['display']['menu_bars']['surveysummary'] = 'editemailtemplates'; diff --git a/sources/application/controllers/admin/export.php b/sources/application/controllers/admin/export.php index ee90cec..b13d499 100644 --- a/sources/application/controllers/admin/export.php +++ b/sources/application/controllers/admin/export.php @@ -154,7 +154,7 @@ class export extends Survey_Common_Action { // Get info about the survey $thissurvey = getSurveyInfo($iSurveyID); - + // Load ExportSurveyResultsService so we know what exports are available $resultsService = new ExportSurveyResultsService(); $exports = $resultsService->getExports(); @@ -190,15 +190,16 @@ class export extends Survey_Common_Action { { $sCode=viewHelper::getFieldCode($fieldinfo); $aFields[$sFieldName]=$sCode.' - '.htmlspecialchars(ellipsize(html_entity_decode(viewHelper::getFieldText($fieldinfo)),30,.6,'...')); + $aFieldsOptions[$sFieldName]=array('title'=>viewHelper::getFieldText($fieldinfo),'data-fieldname'=>$fieldinfo['fieldname'],'data-emcode'=>viewHelper::getFieldCode($fieldinfo,array('LEMcompat'=>true))); // No need to filter title : Yii do it (remove all tag) } - + $data['SingleResponse']=(int)returnGlobal('id'); $data['selecthide'] = $selecthide; $data['selectshow'] = $selectshow; $data['selectinc'] = $selectinc; $data['afieldcount'] = $iFieldCount; $data['aFields'] = $aFields; - + $data['aFieldsOptions'] = $aFieldsOptions; //get max number of datasets $iMaximum = SurveyDynamic::model($iSurveyID)->getMaxId(); @@ -207,7 +208,7 @@ class export extends Survey_Common_Action { $data['imageurl'] = Yii::app()->getConfig('imageurl'); $data['thissurvey'] = $thissurvey; $data['display']['menu_bars']['browse'] = $clang->gT("Export results"); - + // Export plugins, leave out all entries that are not plugin $exports = array_filter($exports); $exportData = array(); @@ -223,7 +224,7 @@ class export extends Survey_Common_Action { 'tooltip' => $event->get('tooltip', null) ); } - + $data['exports'] = $exportData; // Pass available exports $this->_renderWrappedTemplate('export', 'exportresults_view', $data); @@ -321,7 +322,7 @@ class export extends Survey_Common_Action { { global $length_vallabel; $iSurveyID = sanitize_int(Yii::app()->request->getParam('sid')); - $clang = $this->getController()->lang; + $clang = $this->getController()->lang; //for scale 1=nominal, 2=ordinal, 3=scale // $typeMap = $this->_getTypeMap(); @@ -362,7 +363,7 @@ class export extends Survey_Common_Action { if ( isset($_POST['dldata']) ) $subaction = "dldata"; if ( isset($_POST['dlstructure']) ) $subaction = "dlstructure"; - + if ( ! isset($subaction) ) { $selecthide = ""; @@ -391,7 +392,7 @@ class export extends Survey_Common_Action { $this->_renderWrappedTemplate('export', 'spss_view', $data); return; } - + // Get Base language: $language = Survey::model()->findByPk($iSurveyID)->language; $clang = new limesurvey_lang($language); @@ -427,40 +428,33 @@ class export extends Survey_Common_Action { //Now get the query string with all fields to export $query = SPSSGetQuery($iSurveyID, 500, 0); // Sample first 500 responses for adjusting fieldmap - $result = $query->query(); + $result = $query->queryAll(); $num_fields = 0; //Now we check if we need to adjust the size of the field or the type of the field foreach ( $result as $row ) { - if($num_fields==0) { - $num_fields = count($row); - } - $row = array_values($row); - $fieldno = 0; - while ( $fieldno < $num_fields ) + foreach ( $fields as $iIndex=>$aField ) { //Performance improvement, don't recheck fields that have valuelabels - if ( ! isset($fields[$fieldno]['answers']) ) + if ( ! isset($aField['answers']) ) { - $strTmp = mb_substr(stripTagsFull($row[$fieldno]), 0, $iLength); + $strTmp = mb_substr(stripTagsFull($row[$aField['sql_name']]), 0, $iLength); $len = mb_strlen($strTmp); - if ( $len > $fields[$fieldno]['size'] ) $fields[$fieldno]['size'] = $len; + if ( $len > $fields[$iIndex]['size'] ) $fields[$iIndex]['size'] = $len; if ( trim($strTmp) != '' ) { - if ( $fields[$fieldno]['SPSStype'] == 'F' && (isNumericExtended($strTmp) === FALSE || $fields[$fieldno]['size'] > 16) ) + if ( $fields[$iIndex]['SPSStype'] == 'F' && (isNumericExtended($strTmp) === FALSE || $fields[$iIndex]['size'] > 16) ) { - $fields[$fieldno]['SPSStype'] = 'A'; + $fields[$iIndex]['SPSStype'] = 'A'; } } } - $fieldno++; } } - $result->close(); /** * End of DATA print out @@ -503,7 +497,7 @@ class export extends Survey_Common_Action { { $field['size'] .= '.' . ($field['size']-1); } - + if ( !$field['hide'] ) echo "\n {$field['id']} {$field['SPSStype']}{$field['size']}"; } @@ -872,6 +866,7 @@ class export extends Survey_Common_Action { public function dumplabel() { + if (!Permission::model()->hasGlobalPermission('labelsets','export')) die ('No permission.'); $lid = sanitize_int(Yii::app()->request->getParam('lid')); // DUMP THE RELATED DATA FOR A SINGLE QUESTION INTO A SQL FILE FOR IMPORTING LATER ON OR // ON ANOTHER SURVEY SETUP DUMP ALL DATA WITH RELATED QID FROM THE FOLLOWING TABLES @@ -895,7 +890,7 @@ class export extends Survey_Common_Action { $fn = "limesurvey_labelset_" . implode('_', $lids) . ".lsl"; $xml = getXMLWriter(); - $this->_addHeaders($fn, "text/html/force-download", "Mon, 26 Jul 1997 05:00:00 GMT", "cache"); + $this->_addHeaders($fn, "application/force-download", "Mon, 26 Jul 1997 05:00:00 GMT", "cache"); $xml->openURI('php://output'); @@ -948,27 +943,21 @@ class export extends Survey_Common_Action { if ( $aSurveyInfo['active'] == 'Y' ) { getXMLDataSingleTable($iSurveyID, 'survey_' . $iSurveyID, 'Responses', 'responses', $sLSRFileName, FALSE); - $this->_addToZip($zip, $sLSRFileName, 'survey_' . $iSurveyID . '_responses.lsr'); - unlink($sLSRFileName); } - if ( Yii::app()->db->schema->getTable('{{tokens_' . $iSurveyID . '}}') ) + if ( tableExists('{{tokens_' . $iSurveyID . '}}') ) { getXMLDataSingleTable($iSurveyID, 'tokens_' . $iSurveyID, 'Tokens', 'tokens', $sLSTFileName); - $this->_addToZip($zip, $sLSTFileName, 'survey_' . $iSurveyID . '_tokens.lst'); - unlink($sLSTFileName); } - if ( Yii::app()->db->schema->getTable('{{survey_' . $iSurveyID . '_timings}}') ) + if ( tableExists('{{survey_' . $iSurveyID . '_timings}}') ) { getXMLDataSingleTable($iSurveyID, 'survey_' . $iSurveyID . '_timings', 'Timings', 'timings', $sLSIFileName); - $this->_addToZip($zip, $sLSIFileName, 'survey_' . $iSurveyID . '_timings.lsi'); - unlink($sLSIFileName); } @@ -1027,7 +1016,7 @@ class export extends Survey_Common_Action { // now convert this xml into json format and then return echo _xmlToJson($surveyInXmlFormat); exit; - } + } elseif ( $action == "exportstructurequexml" ) { @@ -1096,7 +1085,7 @@ class export extends Survey_Common_Action { header("Cache-Control: must-revalidate, post-check=0, pre-check=0"); header("Pragma: {$pragma}"); // HTTP/1.0 } - + private function _xmlToJson($fileContents) { $fileContents = str_replace(array("\n", "\r", "\t"), '', $fileContents); $fileContents = trim(str_replace('"', "'", $fileContents)); diff --git a/sources/application/controllers/admin/globalsettings.php b/sources/application/controllers/admin/globalsettings.php index 1c290d3..bf61979 100644 --- a/sources/application/controllers/admin/globalsettings.php +++ b/sources/application/controllers/admin/globalsettings.php @@ -57,21 +57,19 @@ class GlobalSettings extends Survey_Common_Action updateCheck(); $this->getController()->redirect(array('admin/globalsettings')); } - + private function _displaySettings() { Yii::app()->loadHelper('surveytranslator'); //save refurl from where global settings screen is called! $refurl = Yii::app()->getRequest()->getUrlReferrer(); - + // Some URLs are not to be allowed to refered back to. // These exceptions can be added to the $aReplacements array - $aReplacements=array('admin/user/adduser'=>'admin/user/index', + $aReplacements=array('admin/update/sa/step4b'=>'admin/sa/index', 'admin/user/sa/adduser'=>'admin/user/sa/index', - 'admin/user/sa/setusertemplates'=>'admin/user/sa/index', - 'admin/user/setusertemplates'=>'admin/user/sa/index' - + 'admin/user/sa/setusertemplates'=>'admin/user/sa/index' ); $refurl= str_replace(array_keys($aReplacements),array_values($aReplacements),$refurl); Yii::app()->session['refurl'] = htmlspecialchars($refurl); //just to be safe! @@ -87,9 +85,9 @@ class GlobalSettings extends Survey_Common_Action $data['sUpdateNotification'] = getGlobalSetting('updatenotification'); Yii::app()->loadLibrary('Date_Time_Converter'); $dateformatdetails = getDateFormatData(Yii::app()->session['dateformat']); - $datetimeobj = new date_time_converter(dateShift(getGlobalSetting("updatelastcheck"),'Y-m-d H:i:s',getGlobalSetting('timeadjust')), 'Y-m-d H:i:s'); + $datetimeobj = new date_time_converter(dateShift(getGlobalSetting("updatelastcheck"),'Y-m-d H:i:s',getGlobalSetting('timeadjust')), 'Y-m-d H:i:s'); $data['updatelastcheck']=$datetimeobj->convert($dateformatdetails['phpdate'] . " H:i:s"); - + $data['updateavailable'] = (getGlobalSetting("updateavailable") && Yii::app()->getConfig("updatable")); $data['updatable'] = Yii::app()->getConfig("updatable"); $data['updateinfo'] = getGlobalSetting("updateinfo"); @@ -122,6 +120,18 @@ class GlobalSettings extends Survey_Common_Action $clang = $this->getController()->lang; Yii::app()->loadHelper('surveytranslator'); + $iPDFFontSize = sanitize_int($_POST['pdffontsize']); + if ($iPDFFontSize < 1) + { + $iPDFFontSize = 9; + } + + $iPDFLogoWidth = sanitize_int($_POST['pdflogowidth']); + if ($iPDFLogoWidth < 1) + { + $iPDFLogoWidth = 50; + } + $maxemails = $_POST['maxemails']; if (sanitize_int($_POST['maxemails']) < 1) { $maxemails = 1; @@ -148,7 +158,12 @@ class GlobalSettings extends Survey_Common_Action setGlobalSetting('defaulttemplateeditormode', sanitize_paranoid_string($_POST['defaulttemplateeditormode'])); if (!Yii::app()->getConfig('demoMode')) { - setGlobalSetting('defaulttemplate', sanitize_paranoid_string($_POST['defaulttemplate'])); + $sTemplate=Yii::app()->getRequest()->getPost("defaulttemplate"); + if(array_key_exists($sTemplate,getTemplateList()))// Filter template name + { + setGlobalSetting('defaulttemplate', $sTemplate); + } + } setGlobalSetting('admintheme', sanitize_paranoid_string($_POST['admintheme'])); setGlobalSetting('adminthemeiconsize', trim(file_get_contents(Yii::app()->getConfig("styledir").DIRECTORY_SEPARATOR.sanitize_paranoid_string($_POST['admintheme']).DIRECTORY_SEPARATOR.'iconsize'))); @@ -163,7 +178,7 @@ class GlobalSettings extends Survey_Common_Action setGlobalSetting('bounceaccountuser', strip_tags(returnGlobal('bounceaccountuser'))); if (returnGlobal('bounceaccountpass') != 'enteredpassword') setGlobalSetting('bounceaccountpass', strip_tags(returnGlobal('bounceaccountpass'))); - + setGlobalSetting('emailsmtpssl', sanitize_paranoid_string(Yii::app()->request->getPost('emailsmtpssl',''))); setGlobalSetting('emailsmtpdebug', sanitize_int(Yii::app()->request->getPost('emailsmtpdebug','0'))); setGlobalSetting('emailsmtpuser', strip_tags(returnGlobal('emailsmtpuser'))); @@ -196,6 +211,11 @@ class GlobalSettings extends Survey_Common_Action if ($iSessionExpirationTime == 0) $iSessionExpirationTime = 7200; setGlobalSetting('iSessionExpirationTime', $iSessionExpirationTime); setGlobalSetting('ipInfoDbAPIKey', $_POST['ipInfoDbAPIKey']); + setGlobalSetting('pdffontsize', $iPDFFontSize); + setGlobalSetting('pdfshowheader', $_POST['pdfshowheader']); + setGlobalSetting('pdflogowidth', $iPDFLogoWidth); + setGlobalSetting('pdfheadertitle', $_POST['pdfheadertitle']); + setGlobalSetting('pdfheaderstring', $_POST['pdfheaderstring']); setGlobalSetting('googleMapsAPIKey', $_POST['googleMapsAPIKey']); setGlobalSetting('googleanalyticsapikey',$_POST['googleanalyticsapikey']); setGlobalSetting('googletranslateapikey',$_POST['googletranslateapikey']); diff --git a/sources/application/controllers/admin/labels.php b/sources/application/controllers/admin/labels.php index a199e1e..660f2d6 100644 --- a/sources/application/controllers/admin/labels.php +++ b/sources/application/controllers/admin/labels.php @@ -319,37 +319,31 @@ class labels extends Survey_Common_Action */ public function process() { - if ( Permission::model()->hasGlobalPermission('labelsets','update')) - { - if (isset($_POST['method']) && get_magic_quotes_gpc()) - $_POST['method'] = stripslashes($_POST['method']); - $action = returnGlobal('action'); Yii::app()->loadHelper('admin/label'); $lid = returnGlobal('lid'); - if ($action == "updateset") + if ($action == "updateset" && Permission::model()->hasGlobalPermission('labelsets','update')) { updateset($lid); - Yii::app()->session['flashmessage'] = Yii::app()->lang->gT("Label set properties sucessfully updated."); + Yii::app()->setFlashMessage(Yii::app()->lang->gT("Label set properties sucessfully updated."),'success'); } - if ($action == "insertlabelset") + if ($action == "insertlabelset" && Permission::model()->hasGlobalPermission('labelsets','create')) $lid = insertlabelset(); - if (($action == "modlabelsetanswers") || ($action == "ajaxmodlabelsetanswers")) + if (($action == "modlabelsetanswers" || ($action == "ajaxmodlabelsetanswers")) && Permission::model()->hasGlobalPermission('labelsets','update')) modlabelsetanswers($lid); - if ($action == "deletelabelset") + if ($action == "deletelabelset" && Permission::model()->hasGlobalPermission('labelsets','delete')) + { if (deletelabelset($lid)) { - Yii::app()->session['flashmessage'] = Yii::app()->lang->gT("Label set sucessfully deleted."); + Yii::app()->setFlashMessage(Yii::app()->lang->gT("Label set sucessfully deleted."),'success'); $lid = 0; } - - + } if ($lid) $this->getController()->redirect(array("admin/labels/sa/view/lid/" . $lid)); else $this->getController()->redirect(array("admin/labels/sa/view")); - } } /** @@ -360,8 +354,11 @@ class labels extends Survey_Common_Action */ public function exportmulti() { - App()->getClientScript()->registerScriptFile(Yii::app()->getConfig('adminscripts') . 'labels.js'); - $this->_renderWrappedTemplate('labels', 'exportmulti_view'); + if (Permission::model()->hasGlobalPermission('labelsets','export')) + { + App()->getClientScript()->registerScriptFile(Yii::app()->getConfig('adminscripts') . 'labels.js'); + $this->_renderWrappedTemplate('labels', 'exportmulti_view'); + } } public function getAllSets() @@ -372,9 +369,9 @@ class labels extends Survey_Common_Action foreach($results as $row) { - $output[$row->lid] = $row->getAttribute('label_name'); + $output[$row->lid] = flattenText($row->getAttribute('label_name')); } - + header('Content-type: application/json'); echo ls_json_encode($output); } @@ -383,6 +380,7 @@ class labels extends Survey_Common_Action $lid = Yii::app()->getRequest()->getPost('lid'); $answers = Yii::app()->getRequest()->getPost('answers'); $code = Yii::app()->getRequest()->getPost('code'); + $aAssessmentValues = Yii::app()->getRequest()->getPost('assessmentvalues',array()); //Create new label set $language = ""; foreach ($answers as $lang => $answer) { @@ -412,6 +410,7 @@ class labels extends Survey_Common_Action $label->title = $ans; $label->sortorder = $key; $label->language = $lang; + $label->assessment_value = isset($aAssessmentValues[$key])?$aAssessmentValues[$key]:0; if(!$label->save()) $res = 'fail'; } diff --git a/sources/application/controllers/admin/participantsaction.php b/sources/application/controllers/admin/participantsaction.php index a679d70..d28f83f 100644 --- a/sources/application/controllers/admin/participantsaction.php +++ b/sources/application/controllers/admin/participantsaction.php @@ -51,7 +51,7 @@ class participantsaction extends Survey_Common_Action } - + /** * Loads jqGrid for the view * @param string $sScript Subaction @@ -77,23 +77,23 @@ class participantsaction extends Survey_Common_Action protected function _renderWrappedTemplate($sAction = 'participants', $aViewUrls = array(), $aData = array()) { App()->getClientScript()->registerPackage('bootstrap-multiselect'); - $aData['display']['menu_bars'] = false; + $aData['display']['menu_bars'] = false; foreach((array) $aViewUrls as $sViewUrl) { $a_ViewUrls[] = $sViewUrl . '_view'; } parent::_renderWrappedTemplate($sAction, $a_ViewUrls, $aData); } - + /** * Export to csv using optional search/filter - * + * * @param type $search CDCriteria? - * @paran mixed $mAttributeIDs Empty array for no attributes, or array of attribute IDs or null for all attributes + * @paran mixed $mAttributeIDs Empty array for no attributes, or array of attribute IDs or null for all attributes */ private function csvExport($search = null, $aAttributeIDs=null) { - Yii::app()->loadHelper('export'); - + Yii::app()->loadHelper('export'); + //If super admin all the participants will be visible if (Permission::model()->hasGlobalPermission('superadmin','read')) { @@ -101,7 +101,7 @@ class participantsaction extends Survey_Common_Action } else { $iUserID = Yii::app()->session['loginID']; } - + $aAttributeIDs=array_combine($aAttributeIDs,$aAttributeIDs); $query = Participant::model()->getParticipants(0, 0, $aAttributeIDs, null, $search, $iUserID); if (!$query) return false; @@ -109,14 +109,14 @@ class participantsaction extends Survey_Common_Action // Field names in the first row $fields = array('participant_id', 'firstname', 'lastname', 'email', 'language', 'blacklisted', 'owner_uid'); $outputarray = array(); // The array to be passed to the export helper to be written to a csv file - + $outputarray[0] = $fields; //fields written to output array // If attribute fields are selected, add them to the output if ($aAttributeIDs==null) { $aAttributes = ParticipantAttributeName::model()->getAllAttributes(); - } + } else { foreach ($aAttributeIDs as $value) @@ -126,29 +126,29 @@ class participantsaction extends Survey_Common_Action $attributename = ParticipantAttributeName::model()->getAttributeNames($value); $outputarray[0][] = $attributename[0]['attribute_name']; } - } + } + $fieldNeededKeys=array_fill_keys($fields, ''); $fieldKeys = array_flip($fields); - $fieldNeededKeys=array_fill_keys($outputarray[0], ''); foreach ($query as $field => $aData) { $outputarray[] = array_merge($fieldNeededKeys,array_intersect_key($aData, $fieldKeys)); } CPDBExport($outputarray, "central_" . time()); } - + /** * Returns a string with the number of participants available for export or 0 - * + * * @param type $search * @return string|0 */ protected function csvExportCount($search = null) { $clang = $this->getController()->lang; - + $attid = ParticipantAttributeName::model()->getVisibleAttributes(); - + //If super admin all the participants will be visible if (Permission::model()->hasGlobalPermission('superadmin','read')) { @@ -156,7 +156,7 @@ class participantsaction extends Survey_Common_Action } else { $iUserID = Yii::app()->session['loginID']; } - + $count = Participant::model()->getParticipantsCount($attid, $search, $iUserID); @@ -253,7 +253,7 @@ class participantsaction extends Survey_Common_Action ); App()->getClientScript()->registerPackage('jqgrid'); App()->getClientScript()->registerCssFile(Yii::app()->getConfig('adminstyleurl') . 'displayParticipants.css'); - + // loads the participant panel view and display participant view $this->_renderWrappedTemplate('participants', array('participantsPanel', 'displayParticipants'), $aData); @@ -400,16 +400,16 @@ class participantsaction extends Survey_Common_Action $aData->total = ceil(ParticipantAttributeName::model()->getCPDBAttributes(true) / $limit); $i = 0; foreach($records as $row) { //Iterate through each attribute - $sAttributeCaption=$row->defaultname; //Choose the first item by default + $sAttributeCaption=htmlspecialchars($row->defaultname); //Choose the first item by default foreach($row->participant_attribute_names_lang as $names) { //Iterate through each language version of this attribute - if($names->lang == Yii::app()->session['adminlang']) {$sAttributeCaption= $sAttributeCaption." ({$names->attribute_name})";} //Override the default with the admin language version if found + if($names->lang == Yii::app()->session['adminlang']) {$sAttributeCaption= $sAttributeCaption.htmlspecialchars(" ({$names->attribute_name})");} //Override the default with the admin language version if found } $aData->rows[$i]['id'] = $row->attribute_id; $aData->rows[$i]['cell'] = array('', $sAttributeCaption, $attribute_types[$row->attribute_type], $row->visible); $i++; } - + echo ls_json_encode($aData); } @@ -418,7 +418,7 @@ class participantsaction extends Survey_Common_Action * Basically takes the call on can_edit */ function editAttributeInfo() - { + { $clang = Yii::app()->lang; $operation = Yii::app()->request->getPost('oper'); @@ -584,7 +584,7 @@ class participantsaction extends Survey_Common_Action $i = 0; foreach ($records as $row) { - $oSurvey=Survey::model()->with(array('languagesettings'=>array('condition'=>'surveyls_language=language')))->findByAttributes(array('sid' => $row['survey_id'])); + $oSurvey=Survey::model()->with(array('languagesettings'=>array('condition'=>'surveyls_language=language')))->findByAttributes(array('sid' => $row['survey_id'])); foreach($oSurvey->languagesettings as $oLanguageSetting) { $surveyname= $oLanguageSetting->surveyls_title; @@ -614,7 +614,7 @@ class participantsaction extends Survey_Common_Action $searchconditionurl = Yii::app()->request->getPost('searchURL'); $searchcondition = Yii::app()->request->getPost('searchcondition'); $searchconditionurl = basename($searchconditionurl); - + if ($searchconditionurl != 'getParticipants_json') // if there is a search condition then only the participants that match the search criteria are counted { $condition = explode("||", $searchcondition); @@ -622,7 +622,7 @@ class participantsaction extends Survey_Common_Action } else { $search = null; } - + echo $this->csvExportCount($search); } @@ -763,24 +763,25 @@ class participantsaction extends Survey_Common_Action */ function getParticipants_json($search = null) { - $page = Yii::app()->request->getPost('page'); - $limit = Yii::app()->request->getPost('rows'); - $limit = isset($limit) ? $limit : 50; //Stop division by zero errors + $page = (int) Yii::app()->request->getPost('page'); + $limit = (int) Yii::app()->request->getPost('rows'); + $limit = empty($limit) ? 50:$limit; //Stop division by zero errors $attid = ParticipantAttributeName::model()->getVisibleAttributes(); $participantfields = array('participant_id', 'can_edit', 'firstname', 'lastname', 'email', 'blacklisted', 'survey', 'language', 'owner_uid'); foreach ($attid as $key => $value) { - array_push($participantfields, $value['attribute_id']); + array_push($participantfields, 'a'.$value['attribute_id']); } $sidx = Yii::app()->request->getPost('sidx'); - $sidx = !empty($sidx) ? $sidx : "lastname"; + $sidx = in_array($sidx,$participantfields) ? $sidx : "lastname"; $sord = Yii::app()->request->getPost('sord'); - $sord = !empty($sord) ? $sord : "asc"; + $sord = ($sord=='desc') ? 'desc' : 'asc'; $order = $sidx. " ". $sord; - + + $aData = new stdClass; - + //If super admin all the participants will be visible if (Permission::model()->hasGlobalPermission('superadmin','read')) { @@ -795,11 +796,11 @@ class participantsaction extends Survey_Common_Action } $aData->page = $page; $records = Participant::model()->getParticipants($page, $limit,$attid, $order, $search, $iUserID); - - + + $aRowToAdd=array(); foreach ($records as $key => $row) - { + { if (array_key_exists('can_edit', $row)) { $sCanEdit = $row['can_edit']; if (is_null($sCanEdit)) { @@ -810,7 +811,7 @@ class participantsaction extends Survey_Common_Action $sCanEdit = "true"; } if (trim($row['ownername'])=='') { - $row['ownername']=$row['username']; + $row['ownername']=$row['username']; } $aRowToAdd['cell'] = array($row['participant_id'], $sCanEdit, htmlspecialchars($row['firstname']), htmlspecialchars($row['lastname']), htmlspecialchars($row['email']), $row['blacklisted'], $row['survey'], $row['language'], $row['ownername']); $aRowToAdd['id'] = $row['participant_id']; @@ -822,7 +823,7 @@ class participantsaction extends Survey_Common_Action $aRowToAdd['cell'][] = $attvalue; } } - + $aData->rows[] = $aRowToAdd; } @@ -834,7 +835,7 @@ class participantsaction extends Survey_Common_Action */ function getAttribute_json() { - $iParticipantId = Yii::app()->request->getQuery('pid'); + $iParticipantId = strip_tags(Yii::app()->request->getQuery('pid')); $records = ParticipantAttributeName::model()->getParticipantVisibleAttribute($iParticipantId); $records = subval_sort($records, "attribute_name", "asc"); @@ -1056,7 +1057,7 @@ class participantsaction extends Survey_Common_Action $clang = $this->getController()->lang; if ($_FILES['the_file']['name']=='') - { + { Yii::app()->setFlashMessage($clang->gT('Please select a file to import!'),'error'); Yii::app()->getController()->redirect(array('admin/participants/sa/importCSV')); } @@ -1080,7 +1081,7 @@ class participantsaction extends Survey_Common_Action $this->_renderWrappedTemplate('participants', array('participantsPanel', 'uploadSummary'),$templateData); exit; } - + if (!$bMoveFileResult) { @@ -1095,10 +1096,20 @@ class participantsaction extends Survey_Common_Action $sFileName = $_FILES['the_file']['name']; $regularfields = array('firstname', 'participant_id', 'lastname', 'email', 'language', 'blacklisted', 'owner_uid'); - $csvread = fopen($sFilePath, 'r'); + $oCSVFile = fopen($sFilePath, 'r'); + $aFirstLine = fgets($oCSVFile); + rewind($oCSVFile); - $separator = Yii::app()->request->getPost('separatorused'); - $firstline = fgetcsv($csvread, 1000, ','); + $sSeparator = Yii::app()->request->getPost('separatorused'); + if ($sSeparator=='auto') + { + $aCount[',']=substr_count($aFirstLine,','); + $aCount[';']=substr_count($aFirstLine,';'); + $aCount['|']=substr_count($aFirstLine,'|'); + $aResult = array_keys($aCount, max($aCount)); + $sSeparator=$aResult[0]; + } + $firstline = fgetcsv($oCSVFile, 1000, $sSeparator[0]); $selectedcsvfields = array(); foreach ($firstline as $key => $value) { @@ -1124,7 +1135,7 @@ class participantsaction extends Survey_Common_Action App()->getClientScript()->registerPackage('qTip2'); App()->getClientScript()->registerPackage('jquery-nestedSortable'); App()->getClientScript()->registerScriptFile(Yii::app()->getConfig('adminscripts') . "attributeMapCSV.js"); - + $sAttributeMapJS="var copyUrl = '".App()->createUrl("admin/participants/sa/uploadCSV")."';\n" ."var displayParticipants = '".App()->createUrl("admin/participants/sa/displayParticipants")."';\n" ."var mapCSVcancelled = '".App()->createUrl("admin/participants/sa/mapCSVcancelled")."';\n" @@ -1242,7 +1253,7 @@ class participantsaction extends Survey_Common_Action $separator = ';'; else $separator = ','; } - $firstline = convertCSVRowToArray($buffer, $separator, '"'); + $firstline = str_getcsv($buffer, $separator, '"'); $firstline = array_map('trim', $firstline); $ignoredcolumns = array(); //now check the first line for invalid fields @@ -1264,7 +1275,7 @@ class participantsaction extends Survey_Common_Action } } else { // After looking at the first line, we now import the actual values - $line = convertCSVRowToArray($buffer, $separator, '"'); + $line = str_getcsv($buffer, $separator, '"'); // Discard lines where the number of fields do not match if (count($firstline) != count($line)) { @@ -1278,7 +1289,7 @@ class participantsaction extends Survey_Common_Action { unset($writearray[$column]); } - // Add aFilterDuplicateFields not in CSV to writearray : quick fix + // Add aFilterDuplicateFields not in CSV to writearray : quick fix foreach($aFilterDuplicateFields as $sFilterDuplicateField){ if(!in_array($sFilterDuplicateField, $firstline)) $writearray[$sFilterDuplicateField]=""; @@ -1428,7 +1439,7 @@ class participantsaction extends Survey_Common_Action } function summaryview() - { + { $this->_renderWrappedTemplate('participants', array('participantsPanel', 'uploadSummary'),array('aAttributes' => ParticipantAttributeName::model()->getAllAttributes())); } @@ -1512,30 +1523,6 @@ class participantsaction extends Survey_Common_Action } } - /* - * Responsible for adding the participant to the specified survey - */ - function addToToken() - { - $response = Participant::model()->copytoSurvey(Yii::app()->request - ->getPost('participantid'), - Yii::app()->request - ->getPost('surveyid'), Yii::app() - ->request->getPost('attributeid') - ); - $clang = $this->getController()->lang; - - printf($clang->gT("%s participants have been copied to the survey token table"), $response['success']); - if($response['duplicate']>0) { - echo "\r\n"; - printf($clang->gT("%s entries were not copied because they already existed"), $response['duplicate']); - } - if($response['overwrite']=="true") { - echo "\r\n"; - $clang->eT("Attribute values for existing participants have been updated from the participants records"); - } - } - /* * Responsible for adding the participant to the specified survey with attribute mapping */ diff --git a/sources/application/controllers/admin/printablesurvey.php b/sources/application/controllers/admin/printablesurvey.php index 3b982b1..de3f6bd 100644 --- a/sources/application/controllers/admin/printablesurvey.php +++ b/sources/application/controllers/admin/printablesurvey.php @@ -31,25 +31,26 @@ class printablesurvey extends Survey_Common_Action $surveyid = sanitize_int($surveyid); if(!Permission::model()->hasSurveyPermission($surveyid,'surveycontent','read')) { - $clang = $this->getController()->lang; $aData['surveyid'] = $surveyid; App()->getClientScript()->registerPackage('jquery-superfish'); - $message['title']= $clang->gT('Access denied!'); - $message['message']= $clang->gT('You do not have sufficient rights to access this page.'); + $message['title']= gT('Access denied!'); + $message['message']= gT('You do not have sufficient rights to access this page.'); $message['class']= "error"; $this->_renderWrappedTemplate('survey', array("message"=>$message), $aData); } else { - $aSurveyInfo=getSurveyInfo($surveyid,$lang); - if (!($aSurveyInfo)) + $oSurvey=Survey::model()->findByPk($surveyid); + if (!$oSurvey) $this->getController()->error('Invalid survey ID'); - // Be sure to have a valid language - $surveyprintlang=$aSurveyInfo['surveyls_language']; - - // Setting the selected language for printout - $clang = new limesurvey_lang($surveyprintlang); + //Language + if(!in_array($lang,$oSurvey->getAllLanguages())) + $lang=$oSurvey->language; + // Start EM fore expression + LimeExpressionManager::SetSurveyId($surveyid); + SetSurveyLanguage($surveyid,$lang); + $aSurveyInfo=getSurveyInfo($surveyid,$lang); $templatename = validateTemplateDir($aSurveyInfo['templatedir']); $welcome = $aSurveyInfo['surveyls_welcometext']; $end = $aSurveyInfo['surveyls_endtext']; @@ -77,7 +78,7 @@ class printablesurvey extends Survey_Common_Action { $surveyexpirydate .= ' – '.$expirytimeofday_h.':'.$expirytimeofday_m; }; - sprintf($clang->gT("Please submit by %s"), $surveyexpirydate); + sprintf(gT("Please submit by %s"), $surveyexpirydate); } else { @@ -104,7 +105,7 @@ class printablesurvey extends Survey_Common_Action LimeExpressionManager::StartSurvey($surveyid, 'survey',NULL,false,LEM_PRETTY_PRINT_ALL_SYNTAX); $moveResult = LimeExpressionManager::NavigateForwards(); - $condition = "sid = '{$surveyid}' AND language = '{$surveyprintlang}'"; + $condition = "sid = '{$surveyid}' AND language = '{$lang}'"; $degresult = QuestionGroup::model()->getAllGroups($condition, array('group_order')); //xiao, if (!isset($surveyfaxto) || !$surveyfaxto and isset($surveyfaxnumber)) @@ -119,7 +120,7 @@ class printablesurvey extends Survey_Common_Action $showsgqacode = Yii::app()->getConfig("showsgqacode"); if(isset($showsgqacode) && $showsgqacode == true) { - $surveyname = $surveyname."
    [".$clang->gT('Database')." ".$clang->gT('table').": $surveytable]"; + $surveyname = $surveyname."
    [".gT('Database')." ".gT('table').": $surveytable]"; } else { @@ -133,9 +134,9 @@ class printablesurvey extends Survey_Common_Action ,'WELCOME' => $welcome ,'END' => $end ,'THEREAREXQUESTIONS' => 0 - ,'SUBMIT_TEXT' => $clang->gT("Submit Your Survey.") + ,'SUBMIT_TEXT' => gT("Submit Your Survey.") ,'SUBMIT_BY' => $surveyexpirydate - ,'THANKS' => $clang->gT("Thank you for completing this survey.") + ,'THANKS' => gT("Thank you for completing this survey.") ,'HEADELEMENTS' => $headelements ,'TEMPLATEURL' => PRINT_TEMPLATE_URL ,'FAXTO' => $surveyfaxto @@ -146,7 +147,7 @@ class printablesurvey extends Survey_Common_Action $survey_output['FAX_TO'] =''; if(!empty($surveyfaxto) && $surveyfaxto != '000-00000000') //If no fax number exists, don't display faxing information! { - $survey_output['FAX_TO'] = $clang->gT("Please fax your completed survey to:")." $surveyfaxto"; + $survey_output['FAX_TO'] = gT("Please fax your completed survey to:")." $surveyfaxto"; } @@ -154,7 +155,7 @@ class printablesurvey extends Survey_Common_Action $mapquestionsNumbers=Array(); $answertext = ''; // otherwise can throw an error on line 1617 - $fieldmap = createFieldMap($surveyid,'full',false,false,$surveyprintlang); + $fieldmap = createFieldMap($surveyid,'full',false,false,$lang); // ========================================================= // START doin the business: @@ -162,7 +163,7 @@ class printablesurvey extends Survey_Common_Action { // --------------------------------------------------- // START doing groups - $deqresult=Question::model()->getQuestions($surveyid, $degrow['gid'], $surveyprintlang, 0, '"I"'); + $deqresult=Question::model()->getQuestions($surveyid, $degrow['gid'], $lang, 0, '"I"'); $deqrows = array(); //Create an empty array in case FetchRow does not return any rows foreach ($deqresult->readAll() as $deqrow) {$deqrows[] = $deqrow;} // Get table output into array @@ -228,7 +229,7 @@ class printablesurvey extends Survey_Common_Action } if($s > 0) { - $sExplanation .= '

    '.' -------- '.$clang->gT("or")." Scenario {$scenariorow['scenario']} --------

    \n\n"; + $sExplanation .= '

    '.' -------- '.gT("or")." Scenario {$scenariorow['scenario']} --------

    \n\n"; } $x=0; @@ -239,12 +240,12 @@ class printablesurvey extends Survey_Common_Action //Loop through each condition for a particular scenario. foreach ($distinctresult->readAll() as $distinctrow) { - $condition = "qid = '{$distinctrow['cqid']}' AND parent_qid = 0 AND language = '{$surveyprintlang}'"; + $condition = "qid = '{$distinctrow['cqid']}' AND parent_qid = 0 AND language = '{$lang}'"; $subresult=Question::model()->find($condition); if($x > 0) { - $sExplanation .= ' '.$clang->gT('and').' '; + $sExplanation .= ' '.gT('and').' '; } if(trim($distinctrow['method'])=='') //If there is no method chosen assume "equals" { @@ -254,35 +255,35 @@ class printablesurvey extends Survey_Common_Action if($distinctrow['cqid']){ // cqid != 0 ==> previous answer match if($distinctrow['method']=='==') { - $sExplanation .= $clang->gT("Answer was")." "; + $sExplanation .= gT("Answer was")." "; } elseif($distinctrow['method']=='!=') { - $sExplanation .= $clang->gT("Answer was NOT")." "; + $sExplanation .= gT("Answer was NOT")." "; } elseif($distinctrow['method']=='<') { - $sExplanation .= $clang->gT("Answer was less than")." "; + $sExplanation .= gT("Answer was less than")." "; } elseif($distinctrow['method']=='<=') { - $sExplanation .= $clang->gT("Answer was less than or equal to")." "; + $sExplanation .= gT("Answer was less than or equal to")." "; } elseif($distinctrow['method']=='>=') { - $sExplanation .= $clang->gT("Answer was greater than or equal to")." "; + $sExplanation .= gT("Answer was greater than or equal to")." "; } elseif($distinctrow['method']=='>') { - $sExplanation .= $clang->gT("Answer was greater than")." "; + $sExplanation .= gT("Answer was greater than")." "; } elseif($distinctrow['method']=='RX') { - $sExplanation .= $clang->gT("Answer matched (regexp)")." "; + $sExplanation .= gT("Answer matched (regexp)")." "; } else { - $sExplanation .= $clang->gT("Answer was")." "; + $sExplanation .= gT("Answer was")." "; } } if(!$distinctrow['cqid']) { // cqid == 0 ==> token attribute match @@ -291,40 +292,40 @@ class printablesurvey extends Survey_Common_Action $sExplanation .= "Your ".$tokenData[strtolower($extractedTokenAttr[1])]['description']." "; if($distinctrow['method']=='==') { - $sExplanation .= $clang->gT("is")." "; + $sExplanation .= gT("is")." "; } elseif($distinctrow['method']=='!=') { - $sExplanation .= $clang->gT("is NOT")." "; + $sExplanation .= gT("is NOT")." "; } elseif($distinctrow['method']=='<') { - $sExplanation .= $clang->gT("is less than")." "; + $sExplanation .= gT("is less than")." "; } elseif($distinctrow['method']=='<=') { - $sExplanation .= $clang->gT("is less than or equal to")." "; + $sExplanation .= gT("is less than or equal to")." "; } elseif($distinctrow['method']=='>=') { - $sExplanation .= $clang->gT("is greater than or equal to")." "; + $sExplanation .= gT("is greater than or equal to")." "; } elseif($distinctrow['method']=='>') { - $sExplanation .= $clang->gT("is greater than")." "; + $sExplanation .= gT("is greater than")." "; } elseif($distinctrow['method']=='RX') { - $sExplanation .= $clang->gT("is matched (regexp)")." "; + $sExplanation .= gT("is matched (regexp)")." "; } else { - $sExplanation .= $clang->gT("is")." "; + $sExplanation .= gT("is")." "; } $answer_section = ' '.$distinctrow['value'].' '; } - $conresult=Condition::model()->getConditionsQuestions($distinctrow['cqid'],$deqrow['qid'],$scenariorow['scenario'],$surveyprintlang); + $conresult=Condition::model()->getConditionsQuestions($distinctrow['cqid'],$deqrow['qid'],$scenariorow['scenario'],$lang); $conditions=array(); foreach ($conresult->readAll() as $conrow) @@ -337,15 +338,15 @@ class printablesurvey extends Survey_Common_Action case "Y": switch ($conrow['value']) { - case "Y": $conditions[]=$clang->gT("Yes"); break; - case "N": $conditions[]=$clang->gT("No"); break; + case "Y": $conditions[]=gT("Yes"); break; + case "N": $conditions[]=gT("No"); break; } break; case "G": switch($conrow['value']) { - case "M": $conditions[]=$clang->gT("Male"); break; - case "F": $conditions[]=$clang->gT("Female"); break; + case "M": $conditions[]=gT("Male"); break; + case "F": $conditions[]=gT("Female"); break; } // switch break; case "A": @@ -358,24 +359,24 @@ class printablesurvey extends Survey_Common_Action case "C": switch($conrow['value']) { - case "Y": $conditions[]=$clang->gT("Yes"); break; - case "U": $conditions[]=$clang->gT("Uncertain"); break; - case "N": $conditions[]=$clang->gT("No"); break; + case "Y": $conditions[]=gT("Yes"); break; + case "U": $conditions[]=gT("Uncertain"); break; + case "N": $conditions[]=gT("No"); break; } // switch break; case "E": switch($conrow['value']) { - case "I": $conditions[]=$clang->gT("Increase"); break; - case "D": $conditions[]=$clang->gT("Decrease"); break; - case "S": $conditions[]=$clang->gT("Same"); break; + case "I": $conditions[]=gT("Increase"); break; + case "D": $conditions[]=gT("Decrease"); break; + case "S": $conditions[]=gT("Same"); break; } case "1": $labelIndex=preg_match("/^[^#]+#([01]{1})$/",$conrow['cfieldname']); if ($labelIndex == 0) { // TIBO - $condition="qid='{$conrow['cqid']}' AND code='{$conrow['value']}' AND scale_id=0 AND language='{$surveyprintlang}'"; + $condition="qid='{$conrow['cqid']}' AND code='{$conrow['value']}' AND scale_id=0 AND language='{$lang}'"; $fresult=Answer::model()->getAllRecords($condition); foreach($fresult->readAll() as $frow) @@ -387,7 +388,7 @@ class printablesurvey extends Survey_Common_Action elseif ($labelIndex == 1) { - $condition="qid='{$conrow['cqid']}' AND code='{$conrow['value']}' AND scale_id=1 AND language='{$surveyprintlang}'"; + $condition="qid='{$conrow['cqid']}' AND code='{$conrow['value']}' AND scale_id=1 AND language='{$lang}'"; $fresult=Answer::model()->getAllRecords($condition); foreach($fresult->readAll() as $frow) { @@ -400,7 +401,7 @@ class printablesurvey extends Survey_Common_Action case "!": case "O": case "R": - $condition="qid='{$conrow['cqid']}' AND code='{$conrow['value']}' AND language='{$surveyprintlang}'"; + $condition="qid='{$conrow['cqid']}' AND code='{$conrow['value']}' AND language='{$lang}'"; $ansresult=Answer::model()->findAll($condition); foreach ($ansresult as $ansrow) @@ -408,13 +409,13 @@ class printablesurvey extends Survey_Common_Action $conditions[]=$ansrow['answer']; } if($conrow['value'] == "-oth-") { - $conditions[]=$clang->gT("Other"); + $conditions[]=gT("Other"); } $conditions = array_unique($conditions); break; case "M": case "P": - $condition=" parent_qid='{$conrow['cqid']}' AND title='{$conrow['value']}' AND language='{$surveyprintlang}'"; + $condition=" parent_qid='{$conrow['cqid']}' AND title='{$conrow['value']}' AND language='{$lang}'"; $ansresult=Question::model()->findAll($condition); foreach ($ansresult as $ansrow) { @@ -431,7 +432,7 @@ class printablesurvey extends Survey_Common_Action default: $value=substr($conrow['cfieldname'], strpos($conrow['cfieldname'], "X".$conrow['cqid'])+strlen("X".$conrow['cqid']), strlen($conrow['cfieldname'])); - $condition=" qid='{$conrow['cqid']}' AND code='{$conrow['value']}' AND language='{$surveyprintlang}'"; + $condition=" qid='{$conrow['cqid']}' AND code='{$conrow['value']}' AND language='{$lang}'"; $fresult=Answer::model()->getAllRecords($condition); foreach ($fresult->readAll() as $frow) @@ -454,7 +455,7 @@ class printablesurvey extends Survey_Common_Action case "H": case "K": $thiscquestion=$fieldmap[$conrow['cfieldname']]; - $condition="parent_qid='{$conrow['cqid']}' AND title='{$thiscquestion['aid']}' AND language='{$surveyprintlang}'"; + $condition="parent_qid='{$conrow['cqid']}' AND title='{$thiscquestion['aid']}' AND language='{$lang}'"; $ansresult= Question::model()->findAll($condition); foreach ($ansresult as $ansrow) @@ -466,39 +467,39 @@ class printablesurvey extends Survey_Common_Action case "1": // dual: (Label 1), (Label 2) $labelIndex=substr($conrow['cfieldname'],-1); $thiscquestion=$fieldmap[$conrow['cfieldname']]; - $condition="parent_qid='{$conrow['cqid']}' AND title='{$thiscquestion['aid']}' AND language='{$surveyprintlang}'"; + $condition="parent_qid='{$conrow['cqid']}' AND title='{$thiscquestion['aid']}' AND language='{$lang}'"; $ansresult= Question::model()->findAll($condition); $cqidattributes = getQuestionAttributeValues($conrow['cqid'], $conrow['type']); if ($labelIndex == 0) { - if (trim($cqidattributes['dualscale_headerA'][$surveyprintlang]) != '') { - $header = $clang->gT($cqidattributes['dualscale_headerA'][$surveyprintlang]); + if (trim($cqidattributes['dualscale_headerA'][$lang]) != '') { + $header = gT($cqidattributes['dualscale_headerA'][$lang]); } else { $header = '1'; } } elseif ($labelIndex == 1) { - if (trim($cqidattributes['dualscale_headerB'][$surveyprintlang]) != '') { - $header = $clang->gT($cqidattributes['dualscale_headerB'][$surveyprintlang]); + if (trim($cqidattributes['dualscale_headerB'][$lang]) != '') { + $header = gT($cqidattributes['dualscale_headerB'][$lang]); } else { $header = '2'; } } foreach ($ansresult as $ansrow) { - $answer_section=" (".$ansrow->question." ".sprintf($clang->gT("Label %s"),$header).")"; + $answer_section=" (".$ansrow->question." ".sprintf(gT("Label %s"),$header).")"; } break; case ":": case ";": //multi flexi: ( answer [label] ) $thiscquestion=$fieldmap[$conrow['cfieldname']]; - $condition="parent_qid='{$conrow['cqid']}' AND title='{$thiscquestion['aid']}' AND language='{$surveyprintlang}'"; + $condition="parent_qid='{$conrow['cqid']}' AND title='{$thiscquestion['aid']}' AND language='{$lang}'"; $ansresult= Question::model()->findAll($condition); foreach ($ansresult as $ansrow) { - $condition = "qid = '{$conrow['cqid']}' AND code = '{$conrow['value']}' AND language= '{$surveyprintlang}'"; + $condition = "qid = '{$conrow['cqid']}' AND code = '{$conrow['value']}' AND language= '{$lang}'"; $fresult= Answer::model()->findAll($condition); foreach ($fresult as $frow) { @@ -510,7 +511,7 @@ class printablesurvey extends Survey_Common_Action case "R": // (Rank 1), (Rank 2)... TIBO $thiscquestion=$fieldmap[$conrow['cfieldname']]; $rankid=$thiscquestion['aid']; - $answer_section=" (".$clang->gT("RANK")." $rankid)"; + $answer_section=" (".gT("RANK")." $rankid)"; break; default: // nothing to add break; @@ -519,7 +520,7 @@ class printablesurvey extends Survey_Common_Action if (count($conditions) > 1) { - $sExplanation .= "'".implode("' ".$clang->gT("or")." '", $conditions)."'"; + $sExplanation .= "'".implode("' ".gT("or")." '", $conditions)."'"; } elseif (count($conditions) == 1) { @@ -527,9 +528,9 @@ class printablesurvey extends Survey_Common_Action } unset($conditions); // Following line commented out because answer_section was lost, but is required for some question types - //$explanation .= " ".$clang->gT("to question")." '".$mapquestionsNumbers[$distinctrow['cqid']]."' $answer_section "; + //$explanation .= " ".gT("to question")." '".$mapquestionsNumbers[$distinctrow['cqid']]."' $answer_section "; if($distinctrow['cqid']){ - $sExplanation .= " ".$clang->gT("at question")." '".$mapquestionsNumbers[$distinctrow['cqid']]." [".$subresult['title']."]' (".strip_tags($subresult['question'])."$answer_section)" ; + $sExplanation .= " ".gT("at question")." '".$mapquestionsNumbers[$distinctrow['cqid']]." [".$subresult['title']."]' (".strip_tags($subresult['question'])."$answer_section)" ; } else{ $sExplanation .= " ".$distinctrow['value'] ; @@ -546,16 +547,16 @@ class printablesurvey extends Survey_Common_Action if (trim($relevance) != '' && trim($relevance) != '1') { - if (isset($qidattributes['printable_help'][$surveyprintlang]) && $qidattributes['printable_help'][$surveyprintlang]!='') + if (isset($qidattributes['printable_help'][$lang]) && $qidattributes['printable_help'][$lang]!='') { - $sExplanation=$qidattributes['printable_help'][$surveyprintlang]; + $sExplanation=$qidattributes['printable_help'][$lang]; } elseif ($sExplanation=='') // There is only a relevance equation without conditions { $sExplanation=$sEquation; $sEquation=' '; // No need to show it twice } - $sExplanation = "".$clang->gT('Only answer this question if the following conditions are met:')."
    ".$sExplanation; + $sExplanation = "".gT('Only answer this question if the following conditions are met:')."
    ".$sExplanation; if (Yii::app()->getConfig('showrelevance')) { $sExplanation.="
    ".$sEquation."
    "; @@ -577,8 +578,8 @@ class printablesurvey extends Survey_Common_Action if(isset($showsgqacode) && $showsgqacode == true) { - $deqrow['question'] = $deqrow['question']."
    ".$clang->gT("ID:")." $fieldname
    ". - $clang->gT("Question code:")." ".$deqrow['title']; + $deqrow['question'] = $deqrow['question']."
    ".gT("ID:")." $fieldname
    ". + gT("Question code:")." ".$deqrow['title']; } $question = array( @@ -613,7 +614,7 @@ class printablesurvey extends Survey_Common_Action if ($deqrow['mandatory'] == 'Y') { - $question['QUESTION_MANDATORY'] = $clang->gT('*'); + $question['QUESTION_MANDATORY'] = gT('*'); $question['QUESTION_CLASS'] .= ' mandatory'; } @@ -639,7 +640,7 @@ class printablesurvey extends Survey_Common_Action { // ================================================================== case "5": //5 POINT CHOICE - $question['QUESTION_TYPE_HELP'] .= $clang->gT('Please choose *only one* of the following:'); + $question['QUESTION_TYPE_HELP'] .= gT('Please choose *only one* of the following:'); $question['ANSWER'] .= "\n\t
      \n"; for ($i=1; $i<=5; $i++) { @@ -651,17 +652,17 @@ class printablesurvey extends Survey_Common_Action // ================================================================== case "D": //DATE - $question['QUESTION_TYPE_HELP'] .= $clang->gT('Please enter a date:'); + $question['QUESTION_TYPE_HELP'] .= gT('Please enter a date:'); $question['ANSWER'] .= "\t".self::_input_type_image('text',$question['QUESTION_TYPE_HELP'],30,1); break; // ================================================================== case "G": //GENDER - $question['QUESTION_TYPE_HELP'] .= $clang->gT("Please choose *only one* of the following:"); + $question['QUESTION_TYPE_HELP'] .= gT("Please choose *only one* of the following:"); $question['ANSWER'] .= "\n\t
        \n"; - $question['ANSWER'] .= "\t\t
      • \n\t\t\t".self::_input_type_image('radio',$clang->gT("Female"))."\n\t\t\t".$clang->gT("Female")." ".self::_addsgqacode("(F)")."\n\t\t
      • \n"; - $question['ANSWER'] .= "\t\t
      • \n\t\t\t".self::_input_type_image('radio',$clang->gT("Male"))."\n\t\t\t".$clang->gT("Male")." ".self::_addsgqacode("(M)")."\n\t\t
      • \n"; + $question['ANSWER'] .= "\t\t
      • \n\t\t\t".self::_input_type_image('radio',gT("Female"))."\n\t\t\t".gT("Female")." ".self::_addsgqacode("(F)")."\n\t\t
      • \n"; + $question['ANSWER'] .= "\t\t
      • \n\t\t\t".self::_input_type_image('radio',gT("Male"))."\n\t\t\t".gT("Male")." ".self::_addsgqacode("(M)")."\n\t\t
      • \n"; $question['ANSWER'] .= "\t
      \n"; break; @@ -686,10 +687,10 @@ class printablesurvey extends Survey_Common_Action unset($optCategorySeparator); } - $question['QUESTION_TYPE_HELP'] .= $clang->gT("Please choose *only one* of the following:"); - $question['QUESTION_TYPE_HELP'] .= self::_array_filter_help($qidattributes, $surveyprintlang, $surveyid); + $question['QUESTION_TYPE_HELP'] .= gT("Please choose *only one* of the following:"); + $question['QUESTION_TYPE_HELP'] .= self::_array_filter_help($qidattributes, $lang, $surveyid); - $dearesult=Answer::model()->getAllRecords(" qid='{$deqrow['qid']}' AND language='{$surveyprintlang}' ", array('sortorder','answer')); + $dearesult=Answer::model()->getAllRecords(" qid='{$deqrow['qid']}' AND language='{$lang}' ", array('sortorder','answer')); $dearesult=$dearesult->readAll(); $deacount=count($dearesult); if ($deqrow['other'] == "Y") {$deacount++;} @@ -737,10 +738,10 @@ class printablesurvey extends Survey_Common_Action } if ($deqrow['other'] == 'Y') { - if(trim($qidattributes["other_replace_text"][$surveyprintlang])=='') - {$qidattributes["other_replace_text"][$surveyprintlang]="Other";} - // $printablesurveyoutput .="\t".$wrapper['item-start']."\t\t".self::_input_type_image('radio' , $clang->gT("Other"))."\n\t\t\t".$clang->gT("Other")."\n\t\t\t\n".$wrapper['item-end']; - $question['ANSWER'] .= $wrapper['item-start-other'].self::_input_type_image('radio',$clang->gT($qidattributes["other_replace_text"][$surveyprintlang])).' '.$clang->gT($qidattributes["other_replace_text"][$surveyprintlang]).self::_addsgqacode(" (-oth-)")."\n\t\t\t".self::_input_type_image('other').self::_addsgqacode(" (".$deqrow['sid']."X".$deqrow['gid']."X".$deqrow['qid']."other)")."\n".$wrapper['item-end']; + if(trim($qidattributes["other_replace_text"][$lang])=='') + {$qidattributes["other_replace_text"][$lang]="Other";} + // $printablesurveyoutput .="\t".$wrapper['item-start']."\t\t".self::_input_type_image('radio' , gT("Other"))."\n\t\t\t".gT("Other")."\n\t\t\t\n".$wrapper['item-end']; + $question['ANSWER'] .= $wrapper['item-start-other'].self::_input_type_image('radio',gT($qidattributes["other_replace_text"][$lang])).' '.gT($qidattributes["other_replace_text"][$lang]).self::_addsgqacode(" (-oth-)")."\n\t\t\t".self::_input_type_image('other').self::_addsgqacode(" (".$deqrow['sid']."X".$deqrow['gid']."X".$deqrow['qid']."other)")."\n".$wrapper['item-end']; } $question['ANSWER'] .= $wrapper['whole-end']; //Let's break the presentation into columns. @@ -748,8 +749,8 @@ class printablesurvey extends Survey_Common_Action // ================================================================== case "O": //LIST WITH COMMENT - $question['QUESTION_TYPE_HELP'] .= $clang->gT("Please choose *only one* of the following:"); - $dearesult=Answer::model()->getAllRecords(" qid='{$deqrow['qid']}' AND language='{$surveyprintlang}'", array('sortorder', 'answer') ); + $question['QUESTION_TYPE_HELP'] .= gT("Please choose *only one* of the following:"); + $dearesult=Answer::model()->getAllRecords(" qid='{$deqrow['qid']}' AND language='{$lang}'", array('sortorder', 'answer') ); $question['ANSWER'] = "\t
        \n"; foreach ($dearesult->readAll() as $dearow) @@ -758,17 +759,17 @@ class printablesurvey extends Survey_Common_Action } $question['ANSWER'] .= "\t
      \n"; - $question['ANSWER'] .= "\t

      \n\t\t".$clang->gT("Make a comment on your choice here:")."\n"; - $question['ANSWER'] .= "\t\t".self::_input_type_image('textarea',$clang->gT("Make a comment on your choice here:"),50,8).self::_addsgqacode(" (".$deqrow['sid']."X".$deqrow['gid']."X".$deqrow['qid']."comment)")."\n\t

      \n"; + $question['ANSWER'] .= "\t

      \n\t\t".gT("Make a comment on your choice here:")."\n"; + $question['ANSWER'] .= "\t\t".self::_input_type_image('textarea',gT("Make a comment on your choice here:"),50,8).self::_addsgqacode(" (".$deqrow['sid']."X".$deqrow['gid']."X".$deqrow['qid']."comment)")."\n\t

      \n"; break; // ================================================================== case "R": //RANKING Type Question - $rearesult=Answer::model()->getAllRecords(" qid='{$deqrow['qid']}' AND language='{$surveyprintlang}'", array('sortorder', 'answer')); + $rearesult=Answer::model()->getAllRecords(" qid='{$deqrow['qid']}' AND language='{$lang}'", array('sortorder', 'answer')); $rearesult = $rearesult->readAll(); $reacount = count($rearesult); - $question['QUESTION_TYPE_HELP'] .= $clang->gT("Please number each box in order of preference from 1 to")." $reacount"; - $question['QUESTION_TYPE_HELP'] .= self::_min_max_answers_help($qidattributes, $surveyprintlang, $surveyid); + $question['QUESTION_TYPE_HELP'] .= gT("Please number each box in order of preference from 1 to")." $reacount"; + $question['QUESTION_TYPE_HELP'] .= self::_min_max_answers_help($qidattributes, $lang, $surveyid); $question['ANSWER'] = "\n
        \n"; foreach ($rearesult as $rearow) { @@ -788,10 +789,10 @@ class printablesurvey extends Survey_Common_Action { $dcols=0; } - $question['QUESTION_TYPE_HELP'] .= $clang->gT("Please choose *all* that apply:"); - $question['QUESTION_TYPE_HELP'] .= self::_array_filter_help($qidattributes, $surveyprintlang, $surveyid); + $question['QUESTION_TYPE_HELP'] .= gT("Please choose *all* that apply:"); + $question['QUESTION_TYPE_HELP'] .= self::_array_filter_help($qidattributes, $lang, $surveyid); - $mearesult = Question::model()->getAllRecords(" parent_qid='{$deqrow['qid']}' AND language='{$surveyprintlang}' ", array('question_order')); + $mearesult = Question::model()->getAllRecords(" parent_qid='{$deqrow['qid']}' AND language='{$lang}' ", array('question_order')); $mearesult = $mearesult->readAll(); $meacount = count($mearesult); if ($deqrow['other'] == 'Y') {$meacount++;} @@ -822,12 +823,12 @@ class printablesurvey extends Survey_Common_Action } if ($deqrow['other'] == "Y") { - if (trim($qidattributes['other_replace_text'][$surveyprintlang])=='') + if (trim($qidattributes['other_replace_text'][$lang])=='') { - $qidattributes["other_replace_text"][$surveyprintlang]="Other"; + $qidattributes["other_replace_text"][$lang]="Other"; } if(!isset($mearow['answer'])) $mearow['answer']=""; - $question['ANSWER'] .= $wrapper['item-start-other'].self::_input_type_image('checkbox',$mearow['answer']).$clang->gT($qidattributes["other_replace_text"][$surveyprintlang]).":\n\t\t".self::_input_type_image('other').self::_addsgqacode(" (".$fieldname."other) ").$wrapper['item-end']; + $question['ANSWER'] .= $wrapper['item-start-other'].self::_input_type_image('checkbox',$mearow['answer']).gT($qidattributes["other_replace_text"][$lang]).":\n\t\t".self::_input_type_image('other').self::_addsgqacode(" (".$fieldname."other) ").$wrapper['item-end']; } $question['ANSWER'] .= $wrapper['whole-end']; // } @@ -835,11 +836,11 @@ class printablesurvey extends Survey_Common_Action // ================================================================== case "P": //Multiple choice with comments - $question['QUESTION_TYPE_HELP'] .= $clang->gT("Please choose all that apply and provide a comment:"); + $question['QUESTION_TYPE_HELP'] .= gT("Please choose all that apply and provide a comment:"); - $question['QUESTION_TYPE_HELP'] .= self::_array_filter_help($qidattributes, $surveyprintlang, $surveyid); - $mearesult=Question::model()->getAllRecords("parent_qid='{$deqrow['qid']}' AND language='{$surveyprintlang}'", array('question_order')); - // $printablesurveyoutput .="\t\t\t".$clang->gT("Please choose all that apply and provide a comment:")."
        \n"; + $question['QUESTION_TYPE_HELP'] .= self::_array_filter_help($qidattributes, $lang, $surveyid); + $mearesult=Question::model()->getAllRecords("parent_qid='{$deqrow['qid']}' AND language='{$lang}'", array('question_order')); + // $printablesurveyoutput .="\t\t\t".gT("Please choose all that apply and provide a comment:")."
        \n"; $j=0; $longest_string = 0; foreach ($mearesult->readAll() as $mearow) @@ -850,7 +851,7 @@ class printablesurvey extends Survey_Common_Action } if ($deqrow['other'] == "Y") { - $question['ANSWER'] .= "\t
      • \n\t\t
        ".$clang->gT('Other:').self::_input_type_image('other','',1)."
        ".self::_input_type_image('othercomment','comment box',50).self::_addsgqacode(" (".$fieldname."other) ")."\n\t
      • \n"; + $question['ANSWER'] .= "\t
      • \n\t\t
        ".gT('Other:').self::_input_type_image('other','',1)."
        ".self::_input_type_image('othercomment','comment box',50).self::_addsgqacode(" (".$fieldname."other) ")."\n\t
      • \n"; $j++; } @@ -869,22 +870,22 @@ class printablesurvey extends Survey_Common_Action // if (!empty($qidattributes['equals_num_value'])) // { - // $question['QUESTION_TYPE_HELP'] .= "* ".sprintf($clang->gT('Total of all entries must equal %d'),$qidattributes['equals_num_value'])."
        \n"; + // $question['QUESTION_TYPE_HELP'] .= "* ".sprintf(gT('Total of all entries must equal %d'),$qidattributes['equals_num_value'])."
        \n"; // } // if (!empty($qidattributes['max_num_value'])) // { - // $question['QUESTION_TYPE_HELP'] .= sprintf($clang->gT('Total of all entries must not exceed %d'), $qidattributes['max_num_value'])."
        \n"; + // $question['QUESTION_TYPE_HELP'] .= sprintf(gT('Total of all entries must not exceed %d'), $qidattributes['max_num_value'])."
        \n"; // } // if (!empty($qidattributes['min_num_value'])) // { - // $question['QUESTION_TYPE_HELP'] .= sprintf($clang->gT('Total of all entries must be at least %s'),$qidattributes['min_num_value'])."
        \n"; + // $question['QUESTION_TYPE_HELP'] .= sprintf(gT('Total of all entries must be at least %s'),$qidattributes['min_num_value'])."
        \n"; // } - $question['QUESTION_TYPE_HELP'] .= $clang->gT("Please write your answer(s) here:"); + $question['QUESTION_TYPE_HELP'] .= gT("Please write your answer(s) here:"); $longest_string = 0; - $mearesult=Question::model()->getAllRecords("parent_qid='{$deqrow['qid']}' AND language='{$surveyprintlang}'", array('question_order')); + $mearesult=Question::model()->getAllRecords("parent_qid='{$deqrow['qid']}' AND language='{$lang}'", array('question_order')); foreach ($mearesult->readAll() as $mearow) { $longest_string = longestString($mearow['question'] , $longest_string ); @@ -901,21 +902,21 @@ class printablesurvey extends Survey_Common_Action // ================================================================== case "S": //SHORT TEXT - $question['QUESTION_TYPE_HELP'] .= $clang->gT("Please write your answer here:"); + $question['QUESTION_TYPE_HELP'] .= gT("Please write your answer here:"); $question['ANSWER'] = self::_input_type_image('text',$question['QUESTION_TYPE_HELP'], 50); break; // ================================================================== case "T": //LONG TEXT - $question['QUESTION_TYPE_HELP'] .= $clang->gT("Please write your answer here:"); + $question['QUESTION_TYPE_HELP'] .= gT("Please write your answer here:"); $question['ANSWER'] = self::_input_type_image('textarea',$question['QUESTION_TYPE_HELP'], '100%' , 8); break; // ================================================================== case "U": //HUGE TEXT - $question['QUESTION_TYPE_HELP'] .= $clang->gT("Please write your answer here:"); + $question['QUESTION_TYPE_HELP'] .= gT("Please write your answer here:"); $question['ANSWER'] = self::_input_type_image('textarea',$question['QUESTION_TYPE_HELP'], '100%' , 30); break; @@ -924,29 +925,29 @@ class printablesurvey extends Survey_Common_Action case "N": //NUMERICAL $prefix=""; $suffix=""; - if($qidattributes['prefix'][$surveyprintlang] != "") { - $prefix=$qidattributes['prefix'][$surveyprintlang]; + if($qidattributes['prefix'][$lang] != "") { + $prefix=$qidattributes['prefix'][$lang]; } - if($qidattributes['suffix'][$surveyprintlang] != "") { - $suffix=$qidattributes['suffix'][$surveyprintlang]; + if($qidattributes['suffix'][$lang] != "") { + $suffix=$qidattributes['suffix'][$lang]; } - $question['QUESTION_TYPE_HELP'] .= $clang->gT("Please write your answer here:"); + $question['QUESTION_TYPE_HELP'] .= gT("Please write your answer here:"); $question['ANSWER'] = "
          \n\t
        • \n\t\t$prefix\n\t\t".self::_input_type_image('text',$question['QUESTION_TYPE_HELP'],20)."\n\t\t$suffix\n\t\t
        • \n\t
        "; break; // ================================================================== case "Y": //YES/NO - $question['QUESTION_TYPE_HELP'] .= $clang->gT("Please choose *only one* of the following:"); - $question['ANSWER'] = "\n
          \n\t
        • \n\t\t".self::_input_type_image('radio',$clang->gT('Yes'))."\n\t\t".$clang->gT('Yes').self::_addsgqacode(" (Y)")."\n\t
        • \n"; - $question['ANSWER'] .= "\n\t
        • \n\t\t".self::_input_type_image('radio',$clang->gT('No'))."\n\t\t".$clang->gT('No').self::_addsgqacode(" (N)")."\n\t
        • \n
        \n"; + $question['QUESTION_TYPE_HELP'] .= gT("Please choose *only one* of the following:"); + $question['ANSWER'] = "\n
          \n\t
        • \n\t\t".self::_input_type_image('radio',gT('Yes'))."\n\t\t".gT('Yes').self::_addsgqacode(" (Y)")."\n\t
        • \n"; + $question['ANSWER'] .= "\n\t
        • \n\t\t".self::_input_type_image('radio',gT('No'))."\n\t\t".gT('No').self::_addsgqacode(" (N)")."\n\t
        • \n
        \n"; break; // ================================================================== case "A": //ARRAY (5 POINT CHOICE) - $condition = "parent_qid = '{$deqrow['qid']}' AND language= '{$surveyprintlang}'"; - $question['QUESTION_TYPE_HELP'] .= $clang->gT("Please choose the appropriate response for each item:"); - $question['QUESTION_TYPE_HELP'] .= self::_array_filter_help($qidattributes, $surveyprintlang, $surveyid); + $condition = "parent_qid = '{$deqrow['qid']}' AND language= '{$lang}'"; + $question['QUESTION_TYPE_HELP'] .= gT("Please choose the appropriate response for each item:"); + $question['QUESTION_TYPE_HELP'] .= self::_array_filter_help($qidattributes, $lang, $surveyid); $question['ANSWER'] = " @@ -1003,8 +1004,8 @@ class printablesurvey extends Survey_Common_Action // ================================================================== case "B": //ARRAY (10 POINT CHOICE) - $question['QUESTION_TYPE_HELP'] .= $clang->gT("Please choose the appropriate response for each item:"); - $question['QUESTION_TYPE_HELP'] .= self::_array_filter_help($qidattributes, $surveyprintlang, $surveyid); + $question['QUESTION_TYPE_HELP'] .= gT("Please choose the appropriate response for each item:"); + $question['QUESTION_TYPE_HELP'] .= self::_array_filter_help($qidattributes, $lang, $surveyid); $question['ANSWER'] .= "\n
        \n\t\n\t\t\n\t\t\t\n"; for ($i=1; $i<=10; $i++) @@ -1014,7 +1015,7 @@ class printablesurvey extends Survey_Common_Action $question['ANSWER'] .= "\t\n\n\t\n"; $j=0; $rowclass = 'array1'; - $mearesult=Question::model()->getAllRecords(" parent_qid='{$deqrow['qid']}' AND language='{$surveyprintlang}' ", array('question_order')); + $mearesult=Question::model()->getAllRecords(" parent_qid='{$deqrow['qid']}' AND language='{$lang}' ", array('question_order')); foreach ($mearesult->readAll() as $mearow) { @@ -1034,17 +1035,17 @@ class printablesurvey extends Survey_Common_Action // ================================================================== case "C": //ARRAY (YES/UNCERTAIN/NO) - $question['QUESTION_TYPE_HELP'] .= $clang->gT("Please choose the appropriate response for each item:"); - $question['QUESTION_TYPE_HELP'] .= self::_array_filter_help($qidattributes, $surveyprintlang, $surveyid); + $question['QUESTION_TYPE_HELP'] .= gT("Please choose the appropriate response for each item:"); + $question['QUESTION_TYPE_HELP'] .= self::_array_filter_help($qidattributes, $lang, $surveyid); $question['ANSWER'] = '
         
        - - - + + + @@ -1053,14 +1054,14 @@ class printablesurvey extends Survey_Common_Action $rowclass = 'array1'; - $mearesult=Question::model()->getAllRecords(" parent_qid='{$deqrow['qid']}' AND language='{$surveyprintlang}' ", array('question_order')); + $mearesult=Question::model()->getAllRecords(" parent_qid='{$deqrow['qid']}' AND language='{$lang}' ", array('question_order')); foreach ($mearesult->readAll() as $mearow) { $question['ANSWER'] .= "\t\t\n"; $question['ANSWER'] .= "\t\t\t\n"; - $question['ANSWER'] .= "\t\t\t\n"; - $question['ANSWER'] .= "\t\t\t\n"; - $question['ANSWER'] .= "\t\t\t\n"; + $question['ANSWER'] .= "\t\t\t\n"; + $question['ANSWER'] .= "\t\t\t\n"; + $question['ANSWER'] .= "\t\t\t\n"; $question['ANSWER'] .= "\t\t\n"; $j++; @@ -1070,17 +1071,17 @@ class printablesurvey extends Survey_Common_Action break; case "E": //ARRAY (Increase/Same/Decrease) - $question['QUESTION_TYPE_HELP'] .= $clang->gT("Please choose the appropriate response for each item:"); - $question['QUESTION_TYPE_HELP'] .= self::_array_filter_help($qidattributes, $surveyprintlang, $surveyid); + $question['QUESTION_TYPE_HELP'] .= gT("Please choose the appropriate response for each item:"); + $question['QUESTION_TYPE_HELP'] .= self::_array_filter_help($qidattributes, $lang, $surveyid); $question['ANSWER'] = '
         '.$clang->gT("Yes").self::_addsgqacode(" (Y)").''.$clang->gT("Uncertain").self::_addsgqacode(" (U)").''.$clang->gT("No").self::_addsgqacode(" (N)").''.gT("Yes").self::_addsgqacode(" (Y)").''.gT("Uncertain").self::_addsgqacode(" (U)").''.gT("No").self::_addsgqacode(" (N)").'
        {$mearow['question']}".self::_addsgqacode(" (".$fieldname.$mearow['title'].")")."".self::_input_type_image('radio',$clang->gT("Yes"))."".self::_input_type_image('radio',$clang->gT("Uncertain"))."".self::_input_type_image('radio',$clang->gT("No"))."".self::_input_type_image('radio',gT("Yes"))."".self::_input_type_image('radio',gT("Uncertain"))."".self::_input_type_image('radio',gT("No"))."
        - - - + + + @@ -1088,14 +1089,14 @@ class printablesurvey extends Survey_Common_Action $j=0; $rowclass = 'array1'; - $mearesult=Question::model()->getAllRecords(" parent_qid='{$deqrow['qid']}' AND language='{$surveyprintlang}' ", array('question_order')); + $mearesult=Question::model()->getAllRecords(" parent_qid='{$deqrow['qid']}' AND language='{$lang}' ", array('question_order')); foreach ($mearesult->readAll() as $mearow) { $question['ANSWER'] .= "\t\t\n"; $question['ANSWER'] .= "\t\t\t\n"; - $question['ANSWER'] .= "\t\t\t\n"; - $question['ANSWER'] .= "\t\t\t\n"; - $question['ANSWER'] .= "\t\t\t\n"; + $question['ANSWER'] .= "\t\t\t\n"; + $question['ANSWER'] .= "\t\t\t\n"; + $question['ANSWER'] .= "\t\t\t\n"; $question['ANSWER'] .= "\t\t\n"; $j++; $rowclass = alternation($rowclass,'row'); @@ -1138,10 +1139,10 @@ class printablesurvey extends Survey_Common_Action $checkboxlayout=false; } - $question['QUESTION_TYPE_HELP'] .= self::_array_filter_help($qidattributes, $surveyprintlang, $surveyid); + $question['QUESTION_TYPE_HELP'] .= self::_array_filter_help($qidattributes, $lang, $surveyid); $question['ANSWER'] .= "\n
         '.$clang->gT("Increase").self::_addsgqacode(" (I)").''.$clang->gT("Same").self::_addsgqacode(" (S)").''.$clang->gT("Decrease").self::_addsgqacode(" (D)").''.gT("Increase").self::_addsgqacode(" (I)").''.gT("Same").self::_addsgqacode(" (S)").''.gT("Decrease").self::_addsgqacode(" (D)").'
        {$mearow['question']}".self::_addsgqacode(" (".$fieldname.$mearow['title'].")")."".self::_input_type_image('radio',$clang->gT("Increase"))."".self::_input_type_image('radio',$clang->gT("Same"))."".self::_input_type_image('radio',$clang->gT("Decrease"))."".self::_input_type_image('radio',gT("Increase"))."".self::_input_type_image('radio',gT("Same"))."".self::_input_type_image('radio',gT("Decrease"))."
        \n\t\n\t\t\n\t\t\t\n"; - $fresult=Question::model()->getAllRecords(" parent_qid='{$deqrow['qid']}' and scale_id=1 AND language='{$surveyprintlang}' ", array('question_order')); + $fresult=Question::model()->getAllRecords(" parent_qid='{$deqrow['qid']}' and scale_id=1 AND language='{$lang}' ", array('question_order')); $fresult = $fresult->readAll(); $fcount = count($fresult); $fwidth = "120"; @@ -1161,7 +1162,7 @@ class printablesurvey extends Survey_Common_Action $a=1; //Counter for pdfoutput $rowclass = 'array1'; - $mearesult=Question::model()->getAllRecords(" parent_qid='{$deqrow['qid']}' and scale_id=0 AND language='{$surveyprintlang}' ", array('question_order')); + $mearesult=Question::model()->getAllRecords(" parent_qid='{$deqrow['qid']}' and scale_id=0 AND language='{$lang}' ", array('question_order')); $result = $mearesult->readAll(); foreach ($result as $frow) { @@ -1201,13 +1202,13 @@ class printablesurvey extends Survey_Common_Action // ================================================================== case ";": //ARRAY (Multi Flexible) (text) $headstyle="style='padding-left: 20px; padding-right: 7px'"; - $mearesult=Question::model()->getAllRecords(" parent_qid='{$deqrow['qid']}' AND scale_id=0 AND language='{$surveyprintlang}' ", array('question_order')); + $mearesult=Question::model()->getAllRecords(" parent_qid='{$deqrow['qid']}' AND scale_id=0 AND language='{$lang}' ", array('question_order')); $mearesult=$mearesult->readAll(); - $question['QUESTION_TYPE_HELP'] .= self::_array_filter_help($qidattributes, $surveyprintlang, $surveyid); + $question['QUESTION_TYPE_HELP'] .= self::_array_filter_help($qidattributes, $lang, $surveyid); $question['ANSWER'] .= "\n
         
        \n\t\n\t\t\n\t\t\t\n"; - $fresult=Question::model()->getAllRecords(" parent_qid='{$deqrow['qid']}' AND scale_id=1 AND language='{$surveyprintlang}' ", array('question_order')); + $fresult=Question::model()->getAllRecords(" parent_qid='{$deqrow['qid']}' AND scale_id=1 AND language='{$lang}' ", array('question_order')); $fresult = $fresult->readAll(); $fcount = count($fresult); $fwidth = "120"; @@ -1254,10 +1255,10 @@ class printablesurvey extends Survey_Common_Action // ================================================================== case "F": //ARRAY (Flexible Labels) - $question['QUESTION_TYPE_HELP'] .= $clang->gT("Please choose the appropriate response for each item:"); - $question['QUESTION_TYPE_HELP'] .= self::_array_filter_help($qidattributes, $surveyprintlang, $surveyid); + $question['QUESTION_TYPE_HELP'] .= gT("Please choose the appropriate response for each item:"); + $question['QUESTION_TYPE_HELP'] .= self::_array_filter_help($qidattributes, $lang, $surveyid); - $fresult=Answer::model()->getAllRecords(" scale_id=0 AND qid='{$deqrow['qid']}' AND language='{$surveyprintlang}'", array('sortorder','code')); + $fresult=Answer::model()->getAllRecords(" scale_id=0 AND qid='{$deqrow['qid']}' AND language='{$lang}'", array('sortorder','code')); $fresult = $fresult->readAll(); $fcount = count($fresult); $fwidth = "120"; @@ -1295,7 +1296,7 @@ class printablesurvey extends Survey_Common_Action $counter = 1; $rowclass = 'array1'; - $mearesult=Question::model()->getAllRecords(" parent_qid='{$deqrow['qid']}' AND language='{$surveyprintlang}' ", array('question_order')); + $mearesult=Question::model()->getAllRecords(" parent_qid='{$deqrow['qid']}' AND language='{$lang}' ", array('question_order')); foreach ($mearesult->readAll() as $mearow) { $question['ANSWER'] .= "\t\t\n"; @@ -1345,17 +1346,17 @@ class printablesurvey extends Survey_Common_Action // ================================================================== case "1": //ARRAY (Flexible Labels) multi scale - $leftheader= $qidattributes['dualscale_headerA'][$surveyprintlang]; - $rightheader= $qidattributes['dualscale_headerB'][$surveyprintlang]; + $leftheader= $qidattributes['dualscale_headerA'][$lang]; + $rightheader= $qidattributes['dualscale_headerB'][$lang]; $headstyle = 'style="padding-left: 20px; padding-right: 7px"'; - $question['QUESTION_TYPE_HELP'] .= $clang->gT("Please choose the appropriate response for each item:"); - $question['QUESTION_TYPE_HELP'] .= self::_array_filter_help($qidattributes, $surveyprintlang, $surveyid); + $question['QUESTION_TYPE_HELP'] .= gT("Please choose the appropriate response for each item:"); + $question['QUESTION_TYPE_HELP'] .= self::_array_filter_help($qidattributes, $lang, $surveyid); $question['ANSWER'] .= "\n
         
        \n\t\n"; - $condition = "qid= '{$deqrow['qid']}' AND language= '{$surveyprintlang}' AND scale_id=0"; + $condition = "qid= '{$deqrow['qid']}' AND language= '{$lang}' AND scale_id=0"; $fresult= Answer::model()->getAllRecords( $condition, array('sortorder', 'code')); $fresult = $fresult->readAll(); $fcount = count($fresult); @@ -1372,9 +1373,9 @@ class printablesurvey extends Survey_Common_Action } // second scale $printablesurveyoutput2 .="\t\t\t\n"; - //$fquery1 = "SELECT * FROM {{answers}} WHERE qid='{$deqrow['qid']}' AND language='{$surveyprintlang}' AND scale_id=1 ORDER BY sortorder, code"; + //$fquery1 = "SELECT * FROM {{answers}} WHERE qid='{$deqrow['qid']}' AND language='{$lang}' AND scale_id=1 ORDER BY sortorder, code"; // $fresult1 = Yii::app()->db->createCommand($fquery1)->query(); - $fresult1 = Answer::model()->getAllRecords(" qid='{$deqrow['qid']}' AND language='{$surveyprintlang}' AND scale_id=1 ", array('sortorder','code')); + $fresult1 = Answer::model()->getAllRecords(" qid='{$deqrow['qid']}' AND language='{$lang}' AND scale_id=1 ", array('sortorder','code')); $fresult1 = $fresult1->readAll(); $fcount1 = count ($fresult1); $fwidth = "120"; @@ -1418,7 +1419,7 @@ class printablesurvey extends Survey_Common_Action //counter for each subquestion $sqcounter = 0; - $mearesult=Question::model()->getAllRecords(" parent_qid={$deqrow['qid']} AND language='{$surveyprintlang}' ", array('question_order')); + $mearesult=Question::model()->getAllRecords(" parent_qid={$deqrow['qid']} AND language='{$lang}' ", array('question_order')); foreach ($mearesult->readAll() as $mearow) { $question['ANSWER'] .= "\t\t\n"; @@ -1455,10 +1456,10 @@ class printablesurvey extends Survey_Common_Action //$headstyle="style='border-left-style: solid; border-left-width: 1px; border-left-color: #AAAAAA'"; $headstyle="style='padding-left: 20px; padding-right: 7px'"; - $condition = "parent_qid= '{$deqrow['qid']}' AND language= '{$surveyprintlang}'"; + $condition = "parent_qid= '{$deqrow['qid']}' AND language= '{$lang}'"; $fresult= Question::model()->getAllRecords( $condition, array('question_order', 'title')); $fresult = $fresult->readAll(); - $question['QUESTION_TYPE_HELP'] .= $clang->gT("Please choose the appropriate response for each item:"); + $question['QUESTION_TYPE_HELP'] .= gT("Please choose the appropriate response for each item:"); $question['ANSWER'] .= "\n
         
        \n\t\n\t\t\n\t\t\t\n"; $fcount = count($fresult); @@ -1473,7 +1474,7 @@ class printablesurvey extends Survey_Common_Action $a=1; $rowclass = 'array1'; - $mearesult=Answer::model()->getAllRecords(" qid='{$deqrow['qid']}' AND scale_id=0 AND language='{$surveyprintlang}' ", array('sortorder','code')); + $mearesult=Answer::model()->getAllRecords(" qid='{$deqrow['qid']}' AND scale_id=0 AND language='{$lang}' ", array('sortorder','code')); foreach ($mearesult->readAll() as $mearow) { //$_POST['type']=$type; @@ -1508,7 +1509,7 @@ class printablesurvey extends Survey_Common_Action } } - $survey_output['THEREAREXQUESTIONS'] = str_replace( '{NUMBEROFQUESTIONS}' , $total_questions , $clang->gT('There are {NUMBEROFQUESTIONS} questions in this survey')); + $survey_output['THEREAREXQUESTIONS'] = str_replace( '{NUMBEROFQUESTIONS}' , $total_questions , gT('There are {NUMBEROFQUESTIONS} questions in this survey')); // START recursive tag stripping. // PHP 5.1.0 introduced the count parameter for preg_replace() and thus allows this procedure to run with only one regular expression. @@ -1653,14 +1654,14 @@ class printablesurvey extends Survey_Common_Action } } - private function _min_max_answers_help($qidattributes, $surveyprintlang, $surveyid) { + private function _min_max_answers_help($qidattributes, $lang, $surveyid) { $clang = $this->getController()->lang; $output = ""; if(!empty($qidattributes['min_answers'])) { - $output .= "\n

        ".sprintf($clang->gT("Please choose at least %s items."), $qidattributes['min_answers'])."

        \n"; + $output .= "\n

        ".sprintf(gT("Please choose at least %s items."), $qidattributes['min_answers'])."

        \n"; } if(!empty($qidattributes['max_answers'])) { - $output .= "\n

        ".sprintf($clang->gT("Please choose no more than %s items."),$qidattributes['max_answers'])."

        \n"; + $output .= "\n

        ".sprintf(gT("Please choose no more than %s items."),$qidattributes['max_answers'])."

        \n"; } return $output; } @@ -1740,35 +1741,45 @@ class printablesurvey extends Survey_Common_Action ); } - private function _array_filter_help($qidattributes, $surveyprintlang, $surveyid) + private function _array_filter_help($qidattributes, $lang, $surveyid) { $clang = $this->getController()->lang; $output = ""; if(!empty($qidattributes['array_filter'])) { - $newquestiontext = Question::model()->findByAttributes(array('title' => $qidattributes['array_filter'], 'language' => $surveyprintlang, 'sid' => $surveyid))->getAttribute('question'); - $output .= "\n

        - ".sprintf($clang->gT("Only answer this question for the items you selected in question %s ('%s')"),$qidattributes['array_filter'], flattenText(breakToNewline($newquestiontext)))." -

        \n"; + $aFilter=explode(';',$qidattributes['array_filter']); + $output .= "\n

        "; + foreach ($aFilter as $sFilter) + { + $oQuestion=Question::model()->findByAttributes(array('title' => $sFilter, 'language' => $lang, 'sid' => $surveyid)); + if ($oQuestion) + { + $sNewQuestionText = flattenText(breakToNewline($oQuestion->getAttribute('question'))); + $output .= sprintf(gT("Only answer this question for the items you selected in question %s ('%s')"),$qidattributes['array_filter'], $sNewQuestionText ); + + } + } + $output .= "

        \n"; } - if(!empty($qidattributes['array_filter_exclude'])) + if(!empty($qidattributes['array_filter'])) { - $arQuestion = Question::model()->findByAttributes(array('title' => $qidattributes['array_filter_exclude'], 'language' => $surveyprintlang, 'sid' => $surveyid)); - if ($arQuestion) + $aFilter=explode(';',$qidattributes['array_filter']); + $output .= "\n

        "; + foreach ($aFilter as $sFilter) { - $newquestiontext=$arQuestion->getAttribute('question'); + $oQuestion=Question::model()->findByAttributes(array('title' => $sFilter, 'language' => $lang, 'sid' => $surveyid)); + if ($oQuestion) + { + $sNewQuestionText = flattenText(breakToNewline($oQuestion->getAttribute('question'))); + $output .= sprintf(gT("Only answer this question for the items you did not select in question %s ('%s')"),$qidattributes['array_filter'], $sNewQuestionText ); + } } - else - { - return ''; - } - $output .= "\n

        - ".sprintf($clang->gT("Only answer this question for the items you did not select in question %s ('%s')"),$qidattributes['array_filter_exclude'], breakToNewline($newquestiontext))." -

        \n"; - } + $output .= "

        \n"; + } return $output; } + /* * $code: Text string containing the reference (column heading) for the current (sub-) question * diff --git a/sources/application/controllers/admin/questions.php b/sources/application/controllers/admin/questions.php index fa29e4d..26778ba 100644 --- a/sources/application/controllers/admin/questions.php +++ b/sources/application/controllers/admin/questions.php @@ -1020,10 +1020,48 @@ class questions extends Survey_Common_Action $language=null; } $resultdata=getlabelsets($language); + // Label set title really don't need HTML + foreach($resultdata as &$aResult) + { + $aResult = array_map('flattenText', $aResult); + } header('Content-type: application/json'); echo ls_json_encode($resultdata); } + public function ajaxchecklabel() + { + $iLabelID = (int) Yii::app()->request->getParam('lid'); + $aNewLanguages = Yii::app()->request->getParam('languages'); + $bCheckAssessments = Yii::app()->request->getParam('bCheckAssessments',0); + $arLabelSet=LabelSet::model()->find('lid=:lid',array(':lid' => $iLabelID)); + $iLabelsWithAssessmentValues=Label::model()->count('lid=:lid AND assessment_value<>0',array(':lid' => $iLabelID)); + $aLabelSetLanguages=explode(' ',$arLabelSet->languages); + $aErrorMessages=array(); + if ($bCheckAssessments && $iLabelsWithAssessmentValues) + { + $aErrorMessages[]=gT('The existing label set has some assessment values assigned.').''.gT('If you replace the label set the existing asssessment values will be lost.').''; + } + if (count(array_diff($aLabelSetLanguages,$aNewLanguages))) + { + $aErrorMessages[]=gT('The existing label has different/more languages.').''.gT('If you replace the label set these translations will be lost.').''; + } + if (count($aErrorMessages)){ + foreach ($aErrorMessages as $sErrorMessage) + { + echo $sErrorMessage.'
        '; + } + eT('Do you really want to continue?'); + } + else + { + eT('You are about to replace a given label set with the current answer options'); + echo '
        '; + eT('Continue?'); + } + } + + /** * Load preview of a question screen. * @@ -1073,8 +1111,6 @@ class questions extends Survey_Common_Action setNoAnswerMode($thissurvey); - Yii::app()->session['dateformats'] = getDateFormatData($thissurvey['surveyls_dateformat']); - $qrows = Question::model()->findByAttributes(array('sid' => $surveyid, 'qid' => $qid, 'language' => $language))->getAttributes(); $ia = array( diff --git a/sources/application/controllers/admin/quotas.php b/sources/application/controllers/admin/quotas.php index 90f6985..74c7ade 100644 --- a/sources/application/controllers/admin/quotas.php +++ b/sources/application/controllers/admin/quotas.php @@ -453,6 +453,8 @@ class quotas extends Survey_Common_Action $sBaseLang = $aData['sBaseLang']; $clang = $aData['clang']; $this->_checkPermissions($iSurveyId, 'read'); + + $aQuestion = Question::model()->findByPk(array('qid' => $iQuestionId, 'language' => $sBaseLang)); $aQuestionType = $aQuestion['type']; @@ -473,7 +475,8 @@ class quotas extends Survey_Common_Action 'F' => array('Title' => $aQuestion['title'], 'Display' => $clang->gT("Female"), 'code' => 'F')); } elseif ($aQuestionType == 'L' || $aQuestionType == 'O' || $aQuestionType == '!') { - $aAnsResults = Answer::model()->findAllByAttributes(array('qid' => $iQuestionId)); + + $aAnsResults = Answer::model()->findAllByAttributes(array('qid' => $iQuestionId, 'language' => $sBaseLang)); $aAnswerList = array(); @@ -481,6 +484,7 @@ class quotas extends Survey_Common_Action { $aAnswerList[$aDbAnsList['code']] = array('Title' => $aQuestion['title'], 'Display' => substr($aDbAnsList['answer'], 0, 40), 'code' => $aDbAnsList['code']); } + } elseif ($aQuestionType == 'A') { $aAnsResults = Question::model()->findAllByAttributes(array('parent_qid' => $iQuestionId)); @@ -497,7 +501,7 @@ class quotas extends Survey_Common_Action } } elseif ($aQuestionType == 'B') { - $aAnsResults = Answer::model()->findAllByAttributes(array('qid' => $iQuestionId)); + $aAnsResults = Answer::model()->findAllByAttributes(array('qid' => $iQuestionId, 'language' => $sBaseLang)); $aAnswerList = array(); diff --git a/sources/application/controllers/admin/remotecontrol.php b/sources/application/controllers/admin/remotecontrol.php index ae4b987..08792a8 100644 --- a/sources/application/controllers/admin/remotecontrol.php +++ b/sources/application/controllers/admin/remotecontrol.php @@ -93,12 +93,16 @@ class remotecontrol extends Survey_Common_Action */ public function test() { + die(); // Remove if you want to test this function $RPCType=Yii::app()->getConfig("RPCInterface"); $serverUrl = App()->createAbsoluteUrl('/admin/remotecontrol'); $sFileToImport=dirname(Yii::app()->basePath).DIRECTORY_SEPARATOR.'docs'.DIRECTORY_SEPARATOR.'demosurveys'.DIRECTORY_SEPARATOR.'limesurvey2_sample_survey_english.lss'; if ($RPCType == 'xml') { + $cur_path = get_include_path(); + set_include_path($cur_path . PATH_SEPARATOR . APPPATH . 'helpers'); require_once('Zend/XmlRpc/Client.php'); + $client = new Zend_XmlRpc_Client($serverUrl); } elseif ($RPCType == 'json') { Yii::app()->loadLibrary('jsonRPCClient'); @@ -113,7 +117,7 @@ class remotecontrol extends Survey_Common_Action { echo 'Retrieved session key'.'
        '; } - + $sLSSData=base64_encode(file_get_contents($sFileToImport)); $iSurveyID=$client->call('import_survey', array($sSessionKey, $sLSSData, 'lss','Test import by JSON_RPC',1000)); echo 'Created new survey SID:'.$iSurveyID.'
        '; diff --git a/sources/application/controllers/admin/responses.php b/sources/application/controllers/admin/responses.php index 1d30323..447d755 100644 --- a/sources/application/controllers/admin/responses.php +++ b/sources/application/controllers/admin/responses.php @@ -125,7 +125,7 @@ class responses extends Survey_Common_Action continue; if ($field['type'] == 'answer_time') continue; - + //$question = $field['question']; $question = viewHelper::getFieldText($field); @@ -359,8 +359,8 @@ class responses extends Survey_Common_Action } Response::model($iSurveyID)->deleteByPk(Yii::app()->request->getPost('markedresponses')); - - + + Yii::app()->session['flashmessage'] = sprintf(ngT("%s response was successfully deleted.","%s responses were successfully deleted.",count(Yii::app()->request->getPost('markedresponses'))),count(Yii::app()->request->getPost('markedresponses')),'js'); } else @@ -396,7 +396,7 @@ class responses extends Survey_Common_Action $iId = (int) Yii::app()->request->getParam('id'); $downloadindividualfile = Yii::app()->request->getParam('downloadindividualfile'); $fieldname = Yii::app()->request->getParam('fieldname'); - + $oRow = SurveyDynamic::model($iSurveyID)->findByAttributes(array('id' => $iId)); $phparray = json_decode_ls($oRow->$fieldname); @@ -405,7 +405,7 @@ class responses extends Survey_Common_Action if (rawurldecode($phparray[$i]['name']) == rawurldecode($downloadindividualfile)) { $file = Yii::app()->getConfig('uploaddir') . "/surveys/" . $iSurveyID . "/files/" . $phparray[$i]['filename']; - + if (file_exists($file)) { @ob_clean(); @@ -420,6 +420,10 @@ class responses extends Survey_Common_Action readfile($file); exit; } + else + { + Yii::app()->session['flashmessage']=gT("The requested file does not exist on the server."); + } break; } } @@ -497,8 +501,8 @@ class responses extends Survey_Common_Action $fncount = count($fnames); - $start = Yii::app()->request->getParam('start', 0); - $limit = Yii::app()->request->getParam('limit', 50); + $start = (int)Yii::app()->request->getParam('start', 0); + $limit = (int)Yii::app()->request->getParam('limit', 50); $order = Yii::app()->request->getParam('order', 'asc'); if(!$limit){$limit=50;} $oCriteria = new CDbCriteria; @@ -527,7 +531,7 @@ class responses extends Survey_Common_Action //NOW LETS SHOW THE DATA if (Yii::app()->request->getPost('sql') && stripcslashes(Yii::app()->request->getPost('sql')) !== "" && Yii::app()->request->getPost('sql') != "NULL") $oCriteria->addCondition(stripcslashes(Yii::app()->request->getPost('sql'))); - + if (!is_null($tokenRequest)) { $oCriteria->addCondition('t.token = ' . Yii::app()->db->quoteValue($tokenRequest)); } @@ -622,7 +626,7 @@ class responses extends Survey_Common_Action if ($aData['surveyinfo']['savetimings'] != "Y") die(); - if (Yii::app()->request->getPost('deleteanswer') && Yii::app()->request->getPost('deleteanswer') != '' && Yii::app()->request->getPost('deleteanswer') != 'marked' + if (Yii::app()->request->getPost('deleteanswer') && Yii::app()->request->getPost('deleteanswer') != '' && Yii::app()->request->getPost('deleteanswer') != 'marked' && Permission::model()->hasSurveyPermission($iSurveyID, 'responses', 'delete')) { $iResponseID=(int) Yii::app()->request->getPost('deleteanswer'); @@ -632,7 +636,7 @@ class responses extends Survey_Common_Action if (Yii::app()->request->getPost('markedresponses') && count(Yii::app()->request->getPost('markedresponses')) > 0) { - if (Yii::app()->request->getPost('deleteanswer') && Yii::app()->request->getPost('deleteanswer') === 'marked' && + if (Yii::app()->request->getPost('deleteanswer') && Yii::app()->request->getPost('deleteanswer') === 'marked' && Permission::model()->hasSurveyPermission($iSurveyID, 'responses', 'delete')) { foreach (Yii::app()->request->getPost('markedresponses') as $iResponseID) @@ -796,7 +800,7 @@ class responses extends Survey_Common_Action * @todo Move this to model. */ Yii::app()->loadLibrary('admin/pclzip'); - + $tmpdir = Yii::app()->getConfig('uploaddir') . DIRECTORY_SEPARATOR."surveys". DIRECTORY_SEPARATOR . $iSurveyID . DIRECTORY_SEPARATOR."files".DIRECTORY_SEPARATOR; $filelist = array(); @@ -844,6 +848,8 @@ class responses extends Survey_Common_Action exit; } } + else Yii::app()->session['flashmessage']=gT("The requested file does not exist on the server."); + } /** diff --git a/sources/application/controllers/admin/surveyadmin.php b/sources/application/controllers/admin/surveyadmin.php index 20a7570..cc922b7 100644 --- a/sources/application/controllers/admin/surveyadmin.php +++ b/sources/application/controllers/admin/surveyadmin.php @@ -66,43 +66,40 @@ class SurveyAdmin extends Survey_Common_Action public function regenquestioncodes($iSurveyID, $sSubAction ) { - if (Permission::model()->hasSurveyPermission($iSurveyID, 'surveycontent', 'update')) + $clang = $this->getController()->lang; + if (!Permission::model()->hasSurveyPermission($iSurveyID, 'surveycontent', 'update')) { - $clang = $this->getController()->lang; - - //Automatically renumbers the "question codes" so that they follow - //a methodical numbering method - $iQuestionNumber=1; - $iGroupNumber=0; - $iSequence=0; - $sQuery="SELECT a.qid, a.gid\n" - ."FROM {{questions}} as a, {{groups}} g " - ."WHERE a.gid=g.gid AND a.sid={$iSurveyID} AND a.parent_qid=0 " - ."GROUP BY a.gid, a.qid, g.group_order, question_order " - ."ORDER BY g.group_order, question_order"; - $arResult=dbExecuteAssoc($sQuery) or safe_die ("Error: ".$connect->ErrorMsg()); // Checked - $grows = array(); //Create an empty array in case FetchRow does not return any rows - foreach ($arResult->readAll() as $grow) {$grows[] = $grow;} // Get table output into array - foreach($grows as $grow) - { - //Go through all the questions - if ($sSubAction == 'bygroup' && (!isset($iGroupNumber) || $iGroupNumber != $grow['gid'])) - { //If we're doing this by group, restart the numbering when the group number changes - $iQuestionNumber=1; - $iGroupNumber = $grow['gid']; - $iSequence++; - } - $usql="UPDATE {{questions}} " - ."SET title='".(($sSubAction == 'bygroup') ? ('G' . $iSequence ) : '')."Q".str_pad($iQuestionNumber, 5, "0", STR_PAD_LEFT)."'\n" - ."WHERE qid=".$grow['qid']; - //$databaseoutput .= "[$sql]"; - $uresult=dbExecuteAssoc($usql) or safe_die("Error: ".$connect->ErrorMsg()); // Checked - $iQuestionNumber++; - $iGroupNumber=$grow['gid']; - } - $_SESSION['flashmessage'] = $clang->gT("Question codes were successfully regenerated."); - LimeExpressionManager::SetDirtyFlag(); // so refreshes syntax highlighting + Yii::app()->setFlashMessage($clang->gT("You do not have sufficient rights to access this page."),'error'); + $this->getController()->redirect(array('admin/survey','sa'=>'view','surveyid'=>$iSurveyID)); } + $oSurvey=Survey::model()->findByPk($iSurveyID); + if ($oSurvey->active=='Y') + { + Yii::app()->setFlashMessage($clang->gT("You can't update question code for an active survey."),'error'); + $this->getController()->redirect(array('admin/survey','sa'=>'view','surveyid'=>$iSurveyID)); + } + //Automatically renumbers the "question codes" so that they follow + //a methodical numbering method + $iQuestionNumber=1; + $iGroupNumber=0; + $iGroupSequence=0; + $oQuestions=Question::model()->with('groups')->findAll(array('select'=>'t.qid,t.gid','condition'=>"t.sid=:sid and t.language=:language and parent_qid=0",'order'=>'groups.group_order, question_order','params'=>array(':sid'=>$iSurveyID,':language'=>$oSurvey->language))); + foreach($oQuestions as $oQuestion) + { + if ($sSubAction == 'bygroup' && $iGroupNumber != $oQuestion->gid) + { //If we're doing this by group, restart the numbering when the group number changes + $iQuestionNumber=1; + $iGroupNumber = $oQuestion->gid; + $iGroupSequence++; + } + $sNewTitle=(($sSubAction == 'bygroup') ? ('G' . $iGroupSequence ) : '')."Q".str_pad($iQuestionNumber, 5, "0", STR_PAD_LEFT); + Question::model()->updateAll(array('title'=>$sNewTitle),'qid=:qid',array(':qid'=>$oQuestion->qid)); + $iQuestionNumber++; + $iGroupNumber=$oQuestion->gid; + } + + Yii::app()->setFlashMessage($clang->gT("Question codes were successfully regenerated.")); + LimeExpressionManager::SetDirtyFlag(); // so refreshes syntax highlighting $this->getController()->redirect(array('admin/survey/sa/view/surveyid/' . $iSurveyID)); } @@ -137,12 +134,12 @@ class SurveyAdmin extends Survey_Common_Action $this->_renderWrappedTemplate('survey', $aViewUrls, $arrayed_data); } - + function fakebrowser() { $aData['clang'] = $this->getController()->lang; Yii::app()->getController()->renderPartial('/admin/survey/newSurveyBrowserMessage', $aData); - } + } /** * This function prepares the view for editing a survey @@ -167,7 +164,7 @@ class SurveyAdmin extends Survey_Common_Action Yii::app()->loadHelper('/admin/htmleditor'); initKcfinder(); - + $esrow = array(); $esrow = self::_fetchSurveyInfo('editsurvey', $iSurveyID); $aData['esrow'] = $esrow; @@ -307,15 +304,15 @@ class SurveyAdmin extends Survey_Common_Action $iSurveyID = Yii::app()->request->getPost('sid', $iSurveyID); $iSurveyID = sanitize_int($iSurveyID); $clang = $this->getController()->lang; - if (!tableExists('survey_'.$iSurveyID)) - { - $_SESSION['flashmessage'] = $clang->gT("Error: Response table does not exist. Survey cannot be deactivated."); - $this->getController()->redirect($this->getController()->createUrl("admin/survey/sa/view/surveyid/{$iSurveyID}")); - } $date = date('YmdHis'); //'His' adds 24hours+minutes to name to allow multiple deactiviations in a day if (empty($_POST['ok'])) { + if (!tableExists('survey_'.$iSurveyID)) + { + $_SESSION['flashmessage'] = $clang->gT("Error: Response table does not exist. Survey cannot be deactivated."); + $this->getController()->redirect($this->getController()->createUrl("admin/survey/sa/view/surveyid/{$iSurveyID}")); + } $aData['surveyid'] = $iSurveyID; $aData['date'] = $date; $aData['dbprefix'] = Yii::app()->db->tablePrefix; @@ -326,18 +323,19 @@ class SurveyAdmin extends Survey_Common_Action //See if there is a tokens table for this survey if (tableExists("{{tokens_{$iSurveyID}}}")) { - if (Yii::app()->db->getDriverName() == 'postgre') + $toldtable = Yii::app()->db->tablePrefix."tokens_{$iSurveyID}"; + $tnewtable = Yii::app()->db->tablePrefix."old_tokens_{$iSurveyID}_{$date}"; + if (Yii::app()->db->getDriverName() == 'pgsql') { - $deactivateresult = Yii::app()->db->createCommand()->renameTable($toldtable . '_tid_seq', $tnewtable . '_tid_seq'); - $setsequence = "ALTER TABLE ".Yii::app()->db->quoteTableName($tnewtable)." ALTER COLUMN tid SET DEFAULT nextval('{{{$tnewtable}}}_tid_seq'::regclass);"; - $deactivateresult = Yii::app()->db->createCommand($setsequence)->query(); - $setidx = "ALTER INDEX {{{$toldtable}}}_idx RENAME TO {{{$tnewtable}}}_idx;"; - $deactivateresult = Yii::app()->db->createCommand($setidx)->query(); + $tidDefault = Yii::app()->db->createCommand("SELECT pg_attrdef.adsrc FROM pg_attribute JOIN pg_class ON (pg_attribute.attrelid=pg_class.oid) JOIN pg_attrdef ON(pg_attribute.attrelid=pg_attrdef.adrelid AND pg_attribute.attnum=pg_attrdef.adnum) WHERE pg_class.relname='$toldtable' and pg_attribute.attname='tid'")->queryScalar(); + if(preg_match("/nextval\('(tokens_\d+_tid_seq\d*)'::regclass\)/", $tidDefault, $matches)){ + $oldSeq = $matches[1]; + $deactivateresult = Yii::app()->db->createCommand()->renameTable($oldSeq, $tnewtable . '_tid_seq'); + $setsequence = "ALTER TABLE ".Yii::app()->db->quoteTableName($toldtable)." ALTER COLUMN tid SET DEFAULT nextval('{$tnewtable}_tid_seq'::regclass);"; + $deactivateresult = Yii::app()->db->createCommand($setsequence)->query(); + } } - $toldtable = "{{tokens_{$iSurveyID}}}"; - $tnewtable = "{{old_tokens_{$iSurveyID}_{$date}}}"; - $tdeactivateresult = Yii::app()->db->createCommand()->renameTable($toldtable, $tnewtable); $aData['tnewtable'] = $tnewtable; @@ -346,7 +344,7 @@ class SurveyAdmin extends Survey_Common_Action //Remove any survey_links to the CPDB SurveyLink::model()->deleteLinksBySurvey($iSurveyID); - + // IF there are any records in the saved_control table related to this survey, they have to be deleted $result = SavedControl::model()->deleteSomeRecords(array('sid' => $iSurveyID)); //Yii::app()->db->createCommand($query)->query(); @@ -362,11 +360,15 @@ class SurveyAdmin extends Survey_Common_Action $survey = Survey::model()->findByAttributes(array('sid' => $iSurveyID)); $survey->autonumber_start = $new_autonumber_start; $survey->save(); - if (Yii::app()->db->getDrivername() == 'postgre') + if (Yii::app()->db->getDriverName() == 'pgsql') { - $deactivateresult = Yii::app()->db->createCommand()->renameTable($sOldSurveyTableName . '_id_seq', $sNewSurveyTableName . '_id_seq'); - $setsequence = "ALTER TABLE $newtable ALTER COLUMN id SET DEFAULT nextval('{$sNewSurveyTableName}_id_seq'::regclass);"; - $deactivateresult = Yii::app()->db->createCommand($setsequence)->execute(); + $idDefault = Yii::app()->db->createCommand("SELECT pg_attrdef.adsrc FROM pg_attribute JOIN pg_class ON (pg_attribute.attrelid=pg_class.oid) JOIN pg_attrdef ON(pg_attribute.attrelid=pg_attrdef.adrelid AND pg_attribute.attnum=pg_attrdef.adnum) WHERE pg_class.relname='$sOldSurveyTableName' and pg_attribute.attname='id'")->queryScalar(); + if(preg_match("/nextval\('(survey_\d+_id_seq\d*)'::regclass\)/", $idDefault, $matches)){ + $oldSeq = $matches[1]; + $deactivateresult = Yii::app()->db->createCommand()->renameTable($oldSeq, $sNewSurveyTableName . '_id_seq'); + $setsequence = "ALTER TABLE ".Yii::app()->db->quoteTableName($sOldSurveyTableName)." ALTER COLUMN id SET DEFAULT nextval('{{{$sNewSurveyTableName}}}_id_seq'::regclass);"; + $deactivateresult = Yii::app()->db->createCommand($setsequence)->query(); + } } $deactivateresult = Yii::app()->db->createCommand()->renameTable($sOldSurveyTableName, $sNewSurveyTableName); @@ -572,14 +574,13 @@ class SurveyAdmin extends Survey_Common_Action $clang = $this->getController()->lang; $dateformatdetails = getDateFormatData(Yii::app()->session['dateformat']); - $surveys = Survey::model(); - //!!! Is this even possible to execute? - if (!Permission::model()->hasGlobalPermission('superadmin','read')) - $surveys->permission(Yii::app()->user->getId()); - $surveys = $surveys->with(array('languagesettings'=>array('condition'=>'surveyls_language=language'), 'owner'))->findAll(); + $oSurvey = new Survey; + $oSurvey->permission(Yii::app()->user->getId()); + + $aSurveys = $oSurvey->with(array('languagesettings'=>array('condition'=>'surveyls_language=language'), 'owner'))->findAll(); $aSurveyEntries = new stdClass(); $aSurveyEntries->page = 1; - foreach ($surveys as $rows) + foreach ($aSurveys as $rows) { if (!isset($rows->owner->attributes)) $aOwner=array('users_name'=>$clang->gT('(None)')); else $aOwner=$rows->owner->attributes; $rows = array_merge($rows->attributes, $rows->defaultlanguage->attributes, $aOwner); @@ -705,7 +706,7 @@ class SurveyAdmin extends Survey_Common_Action * @param string $sa * @return void */ - public function delete($iSurveyID, $delete = 'no') + public function delete($iSurveyID) { $aData = $aViewUrls = array(); $aData['surveyid'] = $iSurveyID = (int) $iSurveyID; @@ -713,7 +714,7 @@ class SurveyAdmin extends Survey_Common_Action if (Permission::model()->hasSurveyPermission($iSurveyID, 'survey', 'delete')) { - if ($delete == 'yes') + if (Yii::app()->request->getPost("delete") == 'yes') { $aData['issuperadmin'] = Permission::model()->hasGlobalPermission('superadmin','read'); $this->_deleteSurvey($iSurveyID); @@ -842,8 +843,8 @@ class SurveyAdmin extends Survey_Common_Action else { $sExtension = ""; - } - + } + } elseif ($action == 'copysurvey') { @@ -852,7 +853,7 @@ class SurveyAdmin extends Survey_Common_Action } // Start traitment and messagebox $aData['bFailed'] = false; // Put a var for continue - + if ($action == 'importsurvey') { @@ -923,11 +924,11 @@ class SurveyAdmin extends Survey_Common_Action if ($action == 'importsurvey' && !$aData['bFailed']) { $aImportResults=importSurveyFile($sFullFilepath,(isset($_POST['translinksfields']))); - if (is_null($aImportResults) || isset($aImportResults['error'])) + if (is_null($aImportResults) || !empty($aImportResults['error']) ) { $aData['sErrorMessage']=$aImportResults['error']; $aData['bFailed'] = true; - } + } } elseif ($action == 'copysurvey' && !$aData['bFailed']) { @@ -951,8 +952,6 @@ class SurveyAdmin extends Survey_Common_Action unlink($sFullFilepath); } - // if (isset($aImportResults['error']) && $aImportResults['error']) safeDie($aImportResults['error']); - if (!$aData['bFailed']) { $aData['action'] = $action; @@ -987,7 +986,7 @@ class SurveyAdmin extends Survey_Common_Action { // Prepare data for the view $sBaseLanguage = Survey::model()->findByPk($iSurveyID)->language; - + LimeExpressionManager::StartSurvey($iSurveyID, 'survey'); LimeExpressionManager::StartProcessingPage(true, Yii::app()->baseUrl); $aGrouplist = QuestionGroup::model()->getGroups($iSurveyID); @@ -1160,16 +1159,16 @@ class SurveyAdmin extends Survey_Common_Action $aData['sRadixDefault'] = $aLanguageDetails['radixpoint']; $aData['sDateFormatDefault'] = $aLanguageDetails['dateformat']; foreach (getRadixPointData() as $index=>$radixptdata){ - $aRadixPointData[$index]=$radixptdata['desc']; + $aRadixPointData[$index]=$radixptdata['desc']; } $aData['aRadixPointData']=$aRadixPointData; - - foreach (getDateFormatData (0,Yii::app()->session['adminlang']) as $index => $dateformatdata) + + foreach (getDateFormatData (0,Yii::app()->session['adminlang']) as $index => $dateformatdata) { - $aDateFormatData[$index]=$dateformatdata['dateformat']; + $aDateFormatData[$index]=$dateformatdata['dateformat']; } $aData['aDateFormatData']=$aDateFormatData; - + return $aData; } @@ -1187,7 +1186,7 @@ class SurveyAdmin extends Survey_Common_Action $aData['clang'] = $clang; $aData['esrow'] = $esrow; $aData['surveyid'] = $iSurveyID; - + $beforeSurveySettings = new PluginEvent('beforeSurveySettings'); $beforeSurveySettings->set('survey', $iSurveyID); App()->getPluginManager()->dispatchEvent($beforeSurveySettings); @@ -1362,12 +1361,12 @@ class SurveyAdmin extends Survey_Common_Action function getUrlParamsJSON($iSurveyID) { $iSurveyID = (int) $iSurveyID; - Yii::app()->loadHelper('database'); - $oResult = dbExecuteAssoc("select '' as act, up.*,q.title, sq.title as sqtitle, q.question, sq.question as sqquestion from {{survey_url_parameters}} up + $sBaseLanguage = Survey::model()->findByPk($iSurveyID)->language; + $sQuery = "select '' as act, up.*,q.title, sq.title as sqtitle, q.question, sq.question as sqquestion from {{survey_url_parameters}} up left join {{questions}} q on q.qid=up.targetqid left join {{questions}} sq on sq.qid=up.targetsqid - where up.sid={$iSurveyID}"); - $oResult= $oResult->readAll(); + where up.sid={$iSurveyID} and q.language='{$sBaseLanguage}' and (sq.language='{$sBaseLanguage}' or sq.language is null)"; + $oResult = Yii::app()->db->createCommand($sQuery)->queryAll(); $i = 0; $clang = $this->getController()->lang; $aData = new stdClass(); @@ -1427,7 +1426,7 @@ class SurveyAdmin extends Survey_Common_Action $generalscripts_path = Yii::app()->getConfig('generalscripts'); $adminscripts_path = Yii::app()->getConfig('adminscripts'); $styleurl = Yii::app()->getConfig('styleurl'); - + $js_files = array( $adminscripts_path . 'surveysettings.js', ); @@ -1440,7 +1439,7 @@ class SurveyAdmin extends Survey_Common_Action { App()->getClientScript()->registerScriptFile($file); - + } App()->getClientScript()->registerPackage('jquery-json'); App()->getClientScript()->registerPackage('jqgrid'); @@ -1496,7 +1495,7 @@ class SurveyAdmin extends Survey_Common_Action $converter = new Date_Time_Converter($sExpiryDate, $aDateFormatData['phpdate'] . ' H:i:s'); $sExpiryDate = $converter->convert("Y-m-d H:i:s"); } - + $iTokenLength=$_POST['tokenlength']; //token length has to be at least 5, otherwise set it to default (15) if($iTokenLength < 5) @@ -1507,7 +1506,7 @@ class SurveyAdmin extends Survey_Common_Action { $iTokenLength = 36; } - + // Insert base settings into surveys table $aInsertData = array( 'expires' => $sExpiryDate, @@ -1560,14 +1559,14 @@ class SurveyAdmin extends Survey_Common_Action $aInsertData['adminemail'] = Yii::app()->request->getPost('adminemail'); } else { $aInsertData['adminemail'] = ''; - $warning .= $this->getController()->lang->gT("Warning! Notification email was not updated because it was not valid.").'
        '; + $warning .= $this->getController()->lang->gT("Warning! Notification email was not updated because it was not valid.").'
        '; } if (Yii::app()->request->getPost('bounce_email', '') == '' || validateEmailAddress(Yii::app()->request->getPost('bounce_email'))) { $aInsertData['bounce_email'] = Yii::app()->request->getPost('bounce_email'); } else { $aInsertData['bounce_email'] = ''; - $warning .= $this->getController()->lang->gT("Warning! Bounce email was not updated because it was not valid.").'
        '; + $warning .= $this->getController()->lang->gT("Warning! Bounce email was not updated because it was not valid.").'
        '; } if (!is_null($iSurveyID)) diff --git a/sources/application/controllers/admin/surveypermission.php b/sources/application/controllers/admin/surveypermission.php index b17e41d..9101bf9 100644 --- a/sources/application/controllers/admin/surveypermission.php +++ b/sources/application/controllers/admin/surveypermission.php @@ -10,7 +10,7 @@ * other free or open source software licenses. * See COPYRIGHT.php for copyright notices and details. */ - + /** * surveypermission * @@ -31,7 +31,7 @@ class surveypermission extends Survey_Common_Action { $aViewUrls = array(); $clang = Yii::app()->lang; $imageurl = Yii::app()->getConfig('adminimageurl'); - + if(Permission::model()->hasSurveyPermission($surveyid,'surveysecurity','read')) { $aBaseSurveyPermissions=Permission::model()->getSurveyBasePermissions(); @@ -83,7 +83,7 @@ class surveypermission extends Survey_Common_Action { { $group_ids_query = implode(",", $group_ids); unset($group_ids); - $result4 = UserGroup::model()->findAll("ugid IN ($group_ids_query)"); + $result4 = UserGroup::model()->findAll("ugid IN ($group_ids_query)"); foreach ($result4 as $resul4row) { @@ -96,7 +96,7 @@ class surveypermission extends Survey_Common_Action { $surveysecurity .= "\n"; $surveysecurity .= "\n"; //content - + $aBasePermissions=Permission::model()->getSurveyBasePermissions(); $oddcolumn=false; foreach($aBasePermissions as $sPermissionKey=>$aCRUDPermissions) { $oddcolumn=!$oddcolumn; - $usersummary .= ""; + $usersummary .= ""; $usersummary .= ""; $usersummary .= ""; foreach ($aCRUDPermissions as $sCRUDKey=>$CRUDValue) @@ -451,8 +451,17 @@ class surveypermission extends Survey_Common_Action { if (!($sPermissionKey=='survey' && $sCRUDKey=='read')) { $usersummary .= "hasSurveyPermission( $surveyid,$sPermissionKey,$sCRUDKey,$postuserid)) { - $usersummary .= ' checked="checked" '; + if($action=='setsurveysecurity') + { + if(Permission::model()->hasPermission($surveyid,'survey',$sPermissionKey,$sCRUDKey,$postuserid)) + { + $usersummary .= ' checked="checked" ';// User have this permission set for this survey + + } + elseif(Permission::model()->hasSurveyPermission( $surveyid,$sPermissionKey,$sCRUDKey,$postuserid)) + { + $usersummary .= ' data-indeterminate=true ';// User have this permission for this survey by another system (global or owner) + } } $usersummary .=" />"; } @@ -478,6 +487,7 @@ class surveypermission extends Survey_Common_Action { $usersummary .= "\n"; $aViewUrls['output'] = $usersummary; + App()->getClientScript()->registerScript("data-indeterminate","$(':checkbox[data-indeterminate]').prop('indeterminate', true);",CClientScript::POS_READY); } else { @@ -524,7 +534,7 @@ class surveypermission extends Survey_Common_Action { { if (isset($postuserid)) { - $dbresult = Permission::model()->deleteAll('uid = :uid AND entity_id = :sid AND entity = :entity',array(':uid' => $postuserid, ':sid' => $surveyid, ':entity' => 'survey')); + $dbresult = Permission::model()->deleteAll("uid = :uid AND entity_id = :sid AND entity = 'survey'",array(':uid' => $postuserid, ':sid' => $surveyid)); $addsummary .= "
        ".$clang->gT("Username").": ".sanitize_xss_string($_POST['user'])."

        \n"; $addsummary .= "
        ".$clang->gT("Success!")."
        \n"; } diff --git a/sources/application/controllers/admin/templates.php b/sources/application/controllers/admin/templates.php index 985884f..5d67964 100644 --- a/sources/application/controllers/admin/templates.php +++ b/sources/application/controllers/admin/templates.php @@ -111,9 +111,9 @@ class templates extends Survey_Common_Action Yii::app()->loadLibrary('admin.pclzip'); $zip = new PclZip($_FILES['the_file']['tmp_name']); - + // Create temporary directory so that if dangerous content is unzipped it would be unaccessible - $sNewDirectoryName=sanitize_dirname($_FILES['the_file']['name']); + $sNewDirectoryName=sanitize_dirname(pathinfo($_FILES['the_file']['name'], PATHINFO_FILENAME )); $destdir = Yii::app()->getConfig('usertemplaterootdir').DIRECTORY_SEPARATOR.$sNewDirectoryName; if (!is_writeable(dirname($destdir))) @@ -282,7 +282,7 @@ class templates extends Survey_Common_Action } Yii::app()->session['flashmessage'] = $uploadresult; } - $this->getController()->redirect(array("admin/templates/view/editfile/" . $editfile . "/screenname/" . $screenname . "/templatename/" . $templatename)); + $this->getController()->redirect(array("admin/templates/sa/view/editfile/" . $editfile . "/screenname/" . $screenname . "/templatename/" . $templatename)); } /** diff --git a/sources/application/controllers/admin/tokens.php b/sources/application/controllers/admin/tokens.php index 7a76622..82c1a39 100644 --- a/sources/application/controllers/admin/tokens.php +++ b/sources/application/controllers/admin/tokens.php @@ -33,8 +33,8 @@ class tokens extends Survey_Common_Action $thissurvey = getSurveyInfo($iSurveyId); if (!Permission::model()->hasSurveyPermission($iSurveyId, 'tokens', 'read') && !Permission::model()->hasSurveyPermission($iSurveyId, 'tokens', 'create') && !Permission::model()->hasSurveyPermission($iSurveyId, 'tokens', 'update') && !Permission::model()->hasSurveyPermission($iSurveyId, 'tokens', 'export') && !Permission::model()->hasSurveyPermission($iSurveyId, 'tokens', 'import') - && !Permission::model()->hasSurveyPermission($iSurveyID, 'surveysettings', 'update') - ) + && !Permission::model()->hasSurveyPermission($iSurveyId, 'surveysettings', 'update') + ) { Yii::app()->session['flashmessage'] = $clang->gT("You do not have sufficient rights to access this page."); $this->getController()->redirect(array("/admin/survey/sa/view/surveyid/{$iSurveyId}")); @@ -71,7 +71,7 @@ class tokens extends Survey_Common_Action function bounceprocessing($iSurveyId) { $iSurveyId = sanitize_int($iSurveyId); - $clang = $this->getController()->lang; + $clang = $this->getController()->lang; $bTokenExists = tableExists('{{tokens_' . $iSurveyId . '}}'); if (!$bTokenExists) //If no tokens table exists { @@ -331,7 +331,13 @@ class tokens extends Survey_Common_Action $aData['order'] = $order; $aData['surveyprivate'] = $aData['thissurvey']['anonymized']; $aData['dateformatdetails'] = $dateformatdetails; - + $aLanguageCodes=Survey::model()->findByPk($iSurveyId)->getAllLanguages(); + $aLanguages=array(); + foreach ($aLanguageCodes as $aCode) + { + $aLanguages[$aCode]=getLanguageNameFromCode($aCode,false); + } + $aData['aLanguages'] = $aLanguages; $this->_renderWrappedTemplate('token', array('tokenbar', 'browse'), $aData); } @@ -361,25 +367,29 @@ class tokens extends Survey_Common_Action $sidx = Yii::app()->request->getPost('sidx', 'lastname'); $sord = Yii::app()->request->getPost('sord', 'asc'); $limit = Yii::app()->request->getPost('rows', 25); - + $aData = new stdClass; $aData->page = $page; - + + $aSearchArray=Yii::app()->request->getPost('searcharray'); + if(empty($search) && !empty($aSearchArray)){ + $search=$aSearchArray; + } if (!empty($search)) { $condition = TokenDynamic::model($iSurveyId)->getSearchMultipleCondition($search); - } else { + }else{ $condition = new CDbCriteria(); } - + $condition->order = $sidx. " ". $sord; $condition->offset = ($page - 1) * $limit; $condition->limit = $limit; $tokens = Token::model($iSurveyId)->findAll($condition); - + $condition->offset=0; - $condition->limit=0; + $condition->limit=0; $aData->records = Token::model($iSurveyId)->count($condition); - + if ($limit>$aData->records) { $limit=$aData->records; @@ -399,7 +409,7 @@ class tokens extends Survey_Common_Action $aSurveyInfo = Survey::model()->findByPk($iSurveyId)->getAttributes(); //Get survey settings $attributes = getAttributeFieldNames($iSurveyId); - + // Now find all responses for the visible tokens $visibleTokens = array(); $answeredTokens = array(); @@ -413,7 +423,7 @@ class tokens extends Survey_Common_Action $answeredTokens[$answer['token']] = $answer['token']; } } - + $bReadPermission = Permission::model()->hasSurveyPermission($iSurveyId, 'responses', 'read'); $bCreatePermission = Permission::model()->hasSurveyPermission($iSurveyId, 'responses', 'create'); $bTokenUpdatePermission = Permission::model()->hasSurveyPermission($iSurveyId, 'tokens', 'update'); @@ -447,7 +457,7 @@ class tokens extends Survey_Common_Action $action .= '
        '; } // Check if the token can be taken - if ($token['token'] != "" && ($token['completed'] == "N" || $token['completed'] == "") && $bCreatePermission) { + if ($token['token'] != "" && ($token['completed'] == "N" || $token['completed'] == "" || $aSurveyInfo['alloweditaftercompletion']=="Y") && $bCreatePermission) { $action .= viewHelper::getImageLink('do_16.png', "survey/index/sid/{$iSurveyId}/token/{$token['token']}/lang/{$token['language']}/newtest/Y", $clang->gT("Do survey"), '_blank'); } else { $action .= '
        '; @@ -499,10 +509,10 @@ class tokens extends Survey_Common_Action /** * Called by jqGrid if a token is saved after editing - * + * * @param mixed $iSurveyId The Survey ID */ - function editToken($iSurveyId) + function editToken($iSurveyId) { $clang = $this->getController()->lang; if (!Permission::model()->hasSurveyPermission($iSurveyId, 'tokens', 'update') && !Permission::model()->hasSurveyPermission($iSurveyId, 'tokens', 'create')) @@ -540,7 +550,7 @@ class tokens extends Survey_Common_Action // { // $sLang = Yii::app()->request->getPost('language'); // } - + echo $from . ',' . $until; $aData = array( 'firstname' => Yii::app()->request->getPost('firstname'), @@ -866,7 +876,7 @@ class tokens extends Survey_Common_Action SurveyLink::model()->deleteTokenLink($aTokenIds, $iSurveyID); //Then delete the tokens - Token::model($iSurveyID)->deleteByPk($aTokenIds); + Token::model($iSurveyID)->deleteByPk($aTokenIds); } } @@ -920,7 +930,6 @@ class tokens extends Survey_Common_Action $aData = array('firstname' => Yii::app()->request->getPost('firstname'), 'lastname' => Yii::app()->request->getPost('lastname'), 'email' => Yii::app()->request->getPost('email'), - 'emailstatus' => 'OK', 'token' => $santitizedtoken, 'language' => sanitize_languagecode(Yii::app()->request->getPost('language')), 'sent' => 'N', @@ -955,14 +964,14 @@ class tokens extends Survey_Common_Action $existingtokens[$tokenRow['token']] = true; } $result->close(); - + $invalidtokencount=0; $newDummyToken=0; while ($newDummyToken < $amount && $invalidtokencount < 50) { $token = Token::create($iSurveyId); $token->setAttributes($aData, false); - + $token->firstname = str_replace('{TOKEN_COUNTER}', $newDummyToken, $token->firstname); $token->lastname = str_replace('{TOKEN_COUNTER}', $newDummyToken, $token->lastname); $token->email = str_replace('{TOKEN_COUNTER}', $newDummyToken, $token->email); @@ -1027,7 +1036,7 @@ class tokens extends Survey_Common_Action { $clang = $this->getController()->lang; $iSurveyId = sanitize_int($iSurveyId); - if (!Permission::model()->hasSurveyPermission($iSurveyId, 'tokens', 'update') && !Permission::model()->hasSurveyPermission($iSurveyID, 'surveysettings', 'update')) + if (!Permission::model()->hasSurveyPermission($iSurveyId, 'tokens', 'update') && !Permission::model()->hasSurveyPermission($iSurveyId, 'surveysettings', 'update')) { Yii::app()->session['flashmessage'] = $clang->gT("You do not have sufficient rights to access this page."); $this->getController()->redirect(array("/admin/survey/sa/view/surveyid/{$iSurveyId}")); @@ -1054,7 +1063,7 @@ class tokens extends Survey_Common_Action $descrition=sprintf($clang->gT("Attribute %s (%s)"),str_replace("attribute_","",$tokenfield),$descrition); $tokenfieldlist[]=array("id"=>$tokenfield,"descrition"=>$descrition); } - $aData['tokenfieldlist'] = $tokenfieldlist; + $aData['tokenfieldlist'] = $tokenfieldlist; $languages = array_merge((array) Survey::model()->findByPk($iSurveyId)->language, Survey::model()->findByPk($iSurveyId)->additionalLanguages); $captions = array(); foreach ($languages as $language) @@ -1062,11 +1071,11 @@ class tokens extends Survey_Common_Action $aData['languages'] = $languages; $aData['tokencaptions'] = $captions; $aData['nrofattributes'] = 0; - $aData['examplerow'] = TokenDynamic::model($iSurveyId)->find(); + $aData['examplerow'] = TokenDynamic::model($iSurveyId)->find(); $aData['aCPDBAttributes']['']=$clang->gT('(none)'); foreach (ParticipantAttributeName::model()->getCPDBAttributes() as $aCPDBAttribute) { - $aData['aCPDBAttributes'][$aCPDBAttribute['attribute_id']]=$aCPDBAttribute['attribute_name']; + $aData['aCPDBAttributes'][$aCPDBAttribute['attribute_id']]=$aCPDBAttribute['attribute_name']; } $this->_renderWrappedTemplate('token', array('tokenbar', 'managetokenattributes'), $aData); } @@ -1078,7 +1087,7 @@ class tokens extends Survey_Common_Action { $clang = $this->getController()->lang; $iSurveyId = sanitize_int($iSurveyId); - if (!Permission::model()->hasSurveyPermission($iSurveyId, 'tokens', 'update') && !Permission::model()->hasSurveyPermission($iSurveyID, 'surveysettings', 'update')) + if (!Permission::model()->hasSurveyPermission($iSurveyId, 'tokens', 'update') && !Permission::model()->hasSurveyPermission($iSurveyId, 'surveysettings', 'update')) { Yii::app()->session['flashmessage'] = $clang->gT("You do not have sufficient rights to access this page."); $this->getController()->redirect(array("/admin/survey/sa/view/surveyid/{$iSurveyId}")); @@ -1127,7 +1136,7 @@ class tokens extends Survey_Common_Action Yii::app()->session['flashmessage'] = $clang->gT("No token table."); $this->getController()->redirect($this->getController()->createUrl("/admin/survey/sa/view/surveyid/{$iSurveyId}")); } - if (!Permission::model()->hasSurveyPermission($iSurveyId, 'tokens', 'update') && !Permission::model()->hasSurveyPermission($iSurveyID, 'surveysettings', 'update')) + if (!Permission::model()->hasSurveyPermission($iSurveyId, 'tokens', 'update') && !Permission::model()->hasSurveyPermission($iSurveyId, 'surveysettings', 'update')) { Yii::app()->session['flashmessage'] = $clang->gT("You do not have sufficient rights to access this page."); $this->getController()->redirect($this->getController()->createUrl("/admin/survey/sa/view/surveyid/{$iSurveyId}")); @@ -1161,9 +1170,14 @@ class tokens extends Survey_Common_Action } elseif($sAttributeToDelete) { + // Update field attributedescriptions in survey table + $aTokenAttributeDescriptions=decodeTokenAttributes(Survey::model()->findByPk($iSurveyId)->attributedescriptions); + unset($aTokenAttributeDescriptions[$sAttributeToDelete]); + Survey::model()->updateByPk($iSurveyId, array('attributedescriptions' => json_encode($aTokenAttributeDescriptions))); + $sTableName="{{tokens_".intval($iSurveyId)."}}"; Yii::app()->db->createCommand(Yii::app()->db->getSchema()->dropColumn($sTableName, $sAttributeToDelete))->execute(); - Yii::app()->db->schema->getTable($sTableName, true); // Refresh schema cache just in case the table existed in the past + Yii::app()->db->schema->getTable($sTableName, true); // Refresh schema cache LimeExpressionManager::SetDirtyFlag(); Yii::app()->session['flashmessage'] = sprintf($clang->gT("Attribute %s was deleted."), $sAttributeToDelete); Yii::app()->getController()->redirect(Yii::app()->getController()->createUrl("/admin/tokens/sa/managetokenattributes/surveyid/$iSurveyId")); @@ -1182,7 +1196,7 @@ class tokens extends Survey_Common_Action { $clang = $this->getController()->lang; $iSurveyId = sanitize_int($iSurveyId); - if (!Permission::model()->hasSurveyPermission($iSurveyId, 'tokens', 'update') && !Permission::model()->hasSurveyPermission($iSurveyID, 'surveysettings', 'update')) + if (!Permission::model()->hasSurveyPermission($iSurveyId, 'tokens', 'update') && !Permission::model()->hasSurveyPermission($iSurveyId, 'surveysettings', 'update')) { Yii::app()->session['flashmessage'] = $clang->gT("You do not have sufficient rights to access this page."); $this->getController()->redirect(array("/admin/survey/sa/view/surveyid/{$iSurveyId}")); @@ -1211,7 +1225,7 @@ class tokens extends Survey_Common_Action $captions[$language][$fieldname] = $_POST["caption_{$fieldname}_$language"]; } - Survey::model()->updateByPk($iSurveyId, array('attributedescriptions' => serialize($fieldcontents))); + Survey::model()->updateByPk($iSurveyId, array('attributedescriptions' => json_encode($fieldcontents))); foreach ($languages as $language) { $ls = SurveyLanguageSetting::model()->findByAttributes(array('surveyls_survey_id' => $iSurveyId, 'surveyls_language' => $language)); @@ -1229,7 +1243,7 @@ class tokens extends Survey_Common_Action /** * Handle email action */ - function email($iSurveyId, $tokenids = null) + function email($iSurveyId, $tokenids = null) { $clang = $this->getController()->lang; $iSurveyId = sanitize_int($iSurveyId); @@ -1256,7 +1270,7 @@ class tokens extends Survey_Common_Action $aTokenIds = array_filter($aTokenIds); $aTokenIds = array_map('sanitize_int', $aTokenIds); } - $aTokenIds=array_unique(array_filter((array) $aTokenIds)); + $aTokenIds=array_unique(array_filter((array) $aTokenIds)); $sSubAction = Yii::app()->request->getParam('action'); $sSubAction = !in_array($sSubAction, array('email', 'remind')) ? 'email' : $sSubAction; @@ -1281,7 +1295,7 @@ class tokens extends Survey_Common_Action $aData['thissurvey'] = getSurveyInfo($iSurveyId); foreach($aSurveyLangs as $sSurveyLanguage) { - $aData['thissurvey'][$sSurveyLanguage] = getSurveyInfo($iSurveyId, $sSurveyLanguage); + $aData['thissurvey'][$sSurveyLanguage] = getSurveyInfo($iSurveyId, $sSurveyLanguage); } $aData['surveyid'] = $iSurveyId; $aData['sSubAction'] = $sSubAction; @@ -1451,7 +1465,7 @@ class tokens extends Survey_Common_Action if (isset($aAttachments[$sTemplate])) { LimeExpressionManager::singleton()->loadTokenInformation($aData['thissurvey']['sid'], $emrow['token']); - + foreach ($aAttachments[$sTemplate] as $aAttachment) { if (LimeExpressionManager::singleton()->ProcessRelevance($aAttachment['relevance'])) @@ -1558,7 +1572,7 @@ class tokens extends Survey_Common_Action } else { - $aData['tokenoutput'].='All emails were sent.'; + $aData['tokenoutput'].="".gT("All emails were sent.").""; } $this->_renderWrappedTemplate('token', $aViewUrls, $aData); @@ -1570,7 +1584,7 @@ class tokens extends Survey_Common_Action 'message' => $clang->gT("There were no eligible emails to send. This will be because none satisfied the criteria of:") . "
         
        • " . $clang->gT("having a valid email address") . "
        • " . "
        • " . $clang->gT("not having been sent an invitation already") . "
        • " - . "
        • " . $clang->gT("having already completed the survey") . "
        • " + . "
        • " . $clang->gT("not having already completed the survey") . "
        • " . "
        • " . $clang->gT("having a token") . "
        " )), $aData); } @@ -1651,7 +1665,7 @@ class tokens extends Survey_Common_Action { $filterduplicatetoken = (Yii::app()->request->getPost('filterduplicatetoken') && Yii::app()->request->getPost('filterduplicatetoken') == 'on'); $filterblankemail = (Yii::app()->request->getPost('filterblankemail') && Yii::app()->request->getPost('filterblankemail') == 'on'); - + $ldap_queries = Yii::app()->getConfig('ldap_queries'); $ldap_server = Yii::app()->getConfig('ldap_server'); @@ -1922,6 +1936,7 @@ class tokens extends Survey_Common_Action $duplicatelist = array(); $invalidemaillist = array(); $invalidformatlist = array(); + $errorlist = array(); $firstline = array(); $sPath = Yii::app()->getConfig('tempdir'); @@ -1960,12 +1975,12 @@ class tokens extends Survey_Common_Action $buffer = @mb_convert_encoding($buffer, "UTF-8", $uploadcharset); if ($recordcount == 0) { - // Parse first line (header) from CSV + // Parse first line (header) from CSV $buffer = removeBOM($buffer); // We alow all field except tid because this one is really not needed. $allowedfieldnames = array('participant_id','firstname','lastname','email','emailstatus','token','language','blacklisted','sent','remindersent','remindercount','validfrom','validuntil','completed','usesleft'); $allowedfieldnames = array_merge($attrfieldnames, $allowedfieldnames); - // Some header don't have same column name + // Some header don't have same column name $aReplacedFields=array( 'invited'=>'sent' ); @@ -1984,7 +1999,7 @@ class tokens extends Survey_Common_Action $separator = ';'; else $separator = ','; } - $firstline = convertCSVRowToArray($buffer, $separator, '"'); + $firstline = str_getcsv($buffer, $separator, '"'); $firstline = array_map('trim', $firstline); $ignoredcolumns = array(); // Now check the first line for invalid fields @@ -2010,16 +2025,15 @@ class tokens extends Survey_Common_Action else { - $line = convertCSVRowToArray($buffer, $separator, '"'); + $line = str_getcsv($buffer, $separator, '"'); if (count($firstline) != count($line)) { - $invalidformatlist[] = $recordcount; + $invalidformatlist[] = sprintf(gt("Line %s"),$recordcount); $recordcount++; continue; } $writearray = array_combine($firstline, $line); - //kick out ignored columns foreach ($ignoredcolumns as $column) { @@ -2030,29 +2044,34 @@ class tokens extends Survey_Common_Action if ($filterduplicatetoken != false) { - $dupquery = "SELECT count(tid) from {{tokens_".intval($iSurveyId)."}} where 1=1"; + $aParams=array(); + $oCriteria= new CDbCriteria; + $oCriteria->condition=""; foreach ($filterduplicatefields as $field) { if (isset($writearray[$field])) { - $dupquery.= " and ".Yii::app()->db->quoteColumnName($field)." = " . Yii::app()->db->quoteValue($writearray[$field]); + $oCriteria->addCondition("{$field} = :{$field}"); + $aParams[":{$field}"]=$writearray[$field]; } } - $dupresult = Yii::app()->db->createCommand($dupquery)->queryScalar(); + if(!empty($aParams)) + $oCriteria->params=$aParams; + $dupresult = TokenDynamic::model($iSurveyId)->count($oCriteria); if ($dupresult > 0) { $dupfound = true; - $duplicatelist[] = Yii::app()->db->quoteValue($writearray['firstname']) . " " . Yii::app()->db->quoteValue($writearray['lastname']) . " (" . Yii::app()->db->quoteValue($writearray['email']) . ")"; + $duplicatelist[] = sprintf(gt("Line %s : %s %s (%s)"),$recordcount,$writearray['firstname'],$writearray['lastname'],$writearray['email']); } } $writearray['email'] = trim($writearray['email']); //treat blank emails - if ($filterblankemail && $writearray['email'] == '') + if (!$dupfound && $filterblankemail && $writearray['email'] == '') { $invalidemail = true; $invalidemaillist[] = $line[0] . " " . $line[1] . " ( )"; } - if ($writearray['email'] != '') + if (!$dupfound && $writearray['email'] != '') { $aEmailAddresses = explode(';', $writearray['email']); foreach ($aEmailAddresses as $sEmailaddress) @@ -2068,6 +2087,15 @@ class tokens extends Survey_Common_Action if (isset($writearray['token'])) { $writearray['token'] = sanitize_token($writearray['token']); + if(!$dupfound && $writearray['token']) // We allways filter duplicate token + { + $dupresult = TokenDynamic::model($iSurveyId)->count("token=:token",array('token'=>$writearray['token'])); + if($dupresult>0) + { + $duplicatelist[] = sprintf(gt("Line %s : token %s already used."),$recordcount,$writearray['token']); + $dupfound=true; + } + } } if (!$dupfound && !$invalidemail) @@ -2075,25 +2103,27 @@ class tokens extends Survey_Common_Action // unset all empty value foreach ($writearray as $key=>$value) { - if($writearray[$key]=="") + if($writearray[$key]=="" && !in_array($key,array('firstname','lastname','email'))) unset($writearray[$key]); if (substr($value, 0, 1)=='"' && substr($value, -1)=='"')// Fix CSV quote $value = substr($value, 1, -1); } // Some default value : to be moved to Token model rules in future release ? // But think we have to accept invalid email etc ... then use specific scenario - $writearray['emailstatus']=isset($writearray['emailstatus'])?$writearray['emailstatus']:"OK"; + //$writearray['emailstatus']=isset($writearray['emailstatus'])?$writearray['emailstatus']:"OK"; $writearray['language']=isset($writearray['language'])?$writearray['language']:$sBaseLanguage; - $oToken = Token::create($iSurveyId); + //$oToken = Token::create($iSurveyId);// + TokenDynamic::sid($iSurveyId); + $oToken = new TokenDynamic; foreach ($writearray as $key => $value) { //if(in_array($key,$oToken->attributes)) Not needed because we filter attributes before $oToken->$key=$value; } - $ir=$oToken->save(); - if (!$ir) + if (!$oToken->save()) { - $duplicatelist[] = $writearray['firstname'] . " " . $writearray['lastname'] . " (" . $writearray['email'] . ")"; + $errorlist[] = sprintf(gt("Line %s : %s %s (%s)"),$recordcount,$writearray['firstname'],$writearray['lastname'],$writearray['email']); + tracevar($oToken->getErrors()); } else { @@ -2116,6 +2146,7 @@ class tokens extends Survey_Common_Action $aData['duplicatelist'] = $duplicatelist; $aData['invalidformatlist'] = $invalidformatlist; $aData['invalidemaillist'] = $invalidemaillist; + $aData['errorlist'] = $errorlist; $aData['thissurvey'] = getSurveyInfo($iSurveyId); $aData['iSurveyId'] = $aData['surveyid'] = $iSurveyId; @@ -2135,13 +2166,13 @@ class tokens extends Survey_Common_Action unset($aTokenTableFields['usesleft']); foreach ($aTokenTableFields as $sKey=>$sValue) { - if ($sValue['description']!=$sKey) + if ($sValue['description']!=$sKey) { - $sValue['description'] .= ' - '.$sKey; + $sValue['description'] .= ' - '.$sKey; } $aNewTokenTableFields[$sKey]= $sValue['description']; } - $aData['aTokenTableFields'] = $aNewTokenTableFields; + $aData['aTokenTableFields'] = $aNewTokenTableFields; $this->_renderWrappedTemplate('token', array('tokenbar', 'csvupload'), $aData); } } @@ -2309,7 +2340,6 @@ class tokens extends Survey_Common_Action } else { - App()->getClientScript()->registerScriptFile(Yii::app()->getConfig('adminscripts') . "tokenbounce.js"); $this->_renderWrappedTemplate('token', array('tokenbar', 'bounce'), $aData); } } @@ -2355,10 +2385,10 @@ class tokens extends Survey_Common_Action { if (strpos($sTokenFieldName,'attribute_')===0 && (!isset($aData['attrfieldnames']) || !isset($aData['attrfieldnames'][$sTokenFieldName]))) { - $aData['attrfieldnames'][$sTokenFieldName]=array('description'=>$sTokenFieldName,'mandatory'=>'N'); + $aData['attrfieldnames'][$sTokenFieldName]=array('description'=>$sTokenFieldName,'mandatory'=>'N'); } - } - + } + $aData['thissurvey'] = $thissurvey; $aData['surveyid'] = $iSurveyId; $aData['subaction'] = $subaction; @@ -2404,7 +2434,7 @@ class tokens extends Survey_Common_Action //Rebuild attributedescription value for the surveys table $table = Yii::app()->db->schema->getTable(Yii::app()->request->getPost('oldtable')); $fields=array_filter(array_keys($table->columns), 'filterForAttributes'); - $fieldcontents = $aSurveyInfo['attributedescriptions']; + $fieldcontents = $aSurveyInfo['attributedescriptions']; if (!is_array($fieldcontents)) $fieldcontents=array(); foreach ($fields as $fieldname) { @@ -2423,12 +2453,12 @@ class tokens extends Survey_Common_Action ); } } - Survey::model()->updateByPk($iSurveyId, array('attributedescriptions' => serialize($fieldcontents))); + Survey::model()->updateByPk($iSurveyId, array('attributedescriptions' => json_encode($fieldcontents))); Yii::app()->db->createCommand()->renameTable(Yii::app()->request->getPost('oldtable'), Yii::app()->db->tablePrefix."tokens_".intval($iSurveyId)); Yii::app()->db->schema->getTable(Yii::app()->db->tablePrefix."tokens_".intval($iSurveyId), true); // Refresh schema cache just in case the table existed in the past - + //Check that the tokens table has the required fields TokenDynamic::model($iSurveyId)->checkColumns(); @@ -2466,6 +2496,7 @@ class tokens extends Survey_Common_Action $this->_renderWrappedTemplate('token', 'tokenwarning', $aData); } + Yii::app()->end(); } /** @@ -2476,7 +2507,7 @@ class tokens extends Survey_Common_Action * @param array $aData Data to be passed on. Optional. */ protected function _renderWrappedTemplate($sAction = 'token', $aViewUrls = array(), $aData = array()) - { + { $aData['imageurl'] = Yii::app()->getConfig('adminimageurl'); $aData['display']['menu_bars'] = false; parent::_renderWrappedTemplate($sAction, $aViewUrls, $aData); diff --git a/sources/application/controllers/admin/translate.php b/sources/application/controllers/admin/translate.php index f2c48b5..b37ba1f 100644 --- a/sources/application/controllers/admin/translate.php +++ b/sources/application/controllers/admin/translate.php @@ -1017,29 +1017,35 @@ class translate extends Survey_Common_Action { return $image; } + public function ajaxtranslategoogleapi() + { + // Ensure YII_CSRF_TOKEN, we are in admin, then only user with admin rigth can post + if(Yii::app()->request->isPostRequest) + { + echo self::translate_google_api(); + } + } /* * translate_google_api.php * Creates a JSON interface for the auto-translate feature */ private function translate_google_api() { - header('Content-type: application/json'); - $sBaselang = Yii::app()->getRequest()->getPost('baselang'); $sTolang = Yii::app()->getRequest()->getPost('tolang'); $sToconvert = Yii::app()->getRequest()->getPost('text'); - $aSearch = array('zh-Hans','zh-Hant-HK','zh-Hant-TW', - 'nl-informal','de-informal','it-formal','pt-BR','es-MX','nb','nn'); + $aSearch = array('zh-Hans','zh-Hant-HK','zh-Hant-TW','nl-informal','de-informal','it-formal','pt-BR','es-MX','nb','nn'); $aReplace = array('zh-CN','zh-TW','zh-TW','nl','de','it','pt','es','no','no'); - + $sBaselang = str_replace($aSearch, $aReplace, $sBaselang); $sTolang = str_replace($aSearch, $aReplace, $sTolang); - $error = FALSE; + $error = false; + try - { + { Yii::app()->loadLibrary('admin/gtranslate/GTranslate'); - $gtranslate = new Gtranslate(); + $gtranslate = new Gtranslate(); $objGt = $gtranslate; // Gtranslate requires you to run function named XXLANG_to_XXLANG @@ -1078,7 +1084,9 @@ class translate extends Survey_Common_Action { 'converted' => $sOutput ); - return ls_json_encode($aOutput) . "\n"; + header('Content-type: application/json'); + return ls_json_encode($aOutput); + Yii::app()->end(); } /** diff --git a/sources/application/controllers/admin/update.php b/sources/application/controllers/admin/update.php index 3018a02..5e5e586 100644 --- a/sources/application/controllers/admin/update.php +++ b/sources/application/controllers/admin/update.php @@ -147,16 +147,21 @@ class update extends Survey_Common_Action function step2() { - + $aReadOnlyFiles=array(); $clang = $this->getController()->lang; $buildnumber = Yii::app()->getConfig("buildnumber"); $updatebuild = getGlobalSetting("updatebuild"); - list($error, $updateinfo, $cookies) = $this->_getChangedFiles($buildnumber, $updatebuild); $aData = $this->_getFileStatus($updateinfo); - $aReadOnlyFiles=array_unique($aData['readonlyfiles']); - sort($aReadOnlyFiles); - $aData['readonlyfiles']=$aReadOnlyFiles; + if(count($aData['readonlyfiles'])) + { + foreach (array_unique($aData['readonlyfiles']) as $aFile) + { + $aReadOnlyFiles[]=substr($aFile,strlen(Yii::app()->getConfig("rootdir"))); + } + sort($aReadOnlyFiles); + $aData['readonlyfiles']=$aReadOnlyFiles; + } Yii::app()->session['updateinfo'] = $updateinfo; Yii::app()->session['updatesession'] = $cookies; @@ -292,7 +297,7 @@ class update extends Survey_Common_Action if ((in_array($aDatabasetype, array('mysql', 'mysqli'))) && Yii::app()->getConfig('demoMode') != true) { Yii::app()->loadHelper("admin/backupdb"); $sfilename = $tempdir.DIRECTORY_SEPARATOR."backup_db_".randomChars(20)."_".dateShift(date("Y-m-d H:i:s"), "Y-m-d", Yii::app()->getConfig('timeadjust')).".sql"; - $dfilename = $tempdir.DIRECTORY_SEPARATOR."LimeSurvey_database_backup_".$basefilename.".sql.gz"; + $dfilename = $tempdir.DIRECTORY_SEPARATOR."LimeSurvey_database_backup_".$basefilename.".zip"; outputDatabase('',false,$sfilename); // Before try to zip: test size of file diff --git a/sources/application/controllers/admin/useraction.php b/sources/application/controllers/admin/useraction.php index bca9e32..6a2d0b5 100644 --- a/sources/application/controllers/admin/useraction.php +++ b/sources/application/controllers/admin/useraction.php @@ -119,7 +119,7 @@ class UserAction extends Survey_Common_Action $body = sprintf($clang->gT("Hello %s,"), $new_full_name) . "

        \n"; $body .= sprintf($clang->gT("this is an automated email to notify that a user has been created for you on the site '%s'."), Yii::app()->getConfig("sitename")) . "

        \n"; $body .= $clang->gT("You can use now the following credentials to log into the site:") . "
        \n"; - $body .= $clang->gT("Username") . ": " . $new_user . "
        \n"; + $body .= $clang->gT("Username") . ": " . htmlspecialchars($new_user) . "
        \n"; if (Yii::app()->getConfig("auth_webserver") === false) { // authent is not delegated to web server // send password (if authorized by config) if (Yii::app()->getConfig("display_user_password_in_email") === true) { diff --git a/sources/application/controllers/admin/usergroups.php b/sources/application/controllers/admin/usergroups.php index 2928228..be97588 100644 --- a/sources/application/controllers/admin/usergroups.php +++ b/sources/application/controllers/admin/usergroups.php @@ -337,11 +337,18 @@ class Usergroups extends Survey_Common_Action $clang = Yii::app()->lang; $uid = (int) Yii::app()->request->getPost('uid'); - $group = UserGroup::model()->findByAttributes(array('ugid' => $ugid, 'owner_id' => Yii::app()->session['loginID'])); + if (Permission::model()->hasGlobalPermission('superadmin','read')) + { + $group = UserGroup::model()->findByAttributes(array('ugid' => $ugid)); + } + else + { + $group = UserGroup::model()->findByAttributes(array('ugid' => $ugid, 'owner_id' => Yii::app()->session['loginID'])); + } if (empty($group)) { - list($aViewUrls, $aData) = $this->index(0, array('type' => 'warning', 'message' => $clang->gT('Failed.') . '
        ' . $clang->gT('Group not found.'))); + list($aViewUrls, $aData) = $this->index(0, array('type' => 'warning', 'message' => $clang->gT('Failed.') . ' ' . $clang->gT('You are '))); } else { @@ -349,35 +356,36 @@ class Usergroups extends Survey_Common_Action { if ($group->owner_id == $uid) { - list($aViewUrls, $aData) = $this->index($ugid, array('type' => 'warning', 'message' => $clang->gT('Failed.') . '
        ' . $clang->gT('You can not add or remove the group owner from the group.'))); + list($aViewUrls, $aData) = $this->index($ugid, array('type' => 'warning', 'message' => $clang->gT('Failed.') . ' ' . $clang->gT('You can not add or remove the group owner from the group.'))); } + else { + $user_in_group = UserInGroup::model()->findByPk(array('ugid' => $ugid, 'uid' => $uid)); - $user_in_group = UserInGroup::model()->findByPk(array('ugid' => $ugid, 'uid' => $uid)); + switch ($action) + { + case 'add' : + if (empty($user_in_group) && UserInGroup::model()->insertRecords(array('ugid' => $ugid, 'uid' => $uid))) + { + list($aViewUrls, $aData) = $this->index($ugid, array('type' => 'success', 'message' => $clang->gT('User added.'))); + } + else + { + list($aViewUrls, $aData) = $this->index($ugid, array('type' => 'warning', 'message' => $clang->gT('Failed to add user.') . ' ' . $clang->gT('User already exists in the group.'))); + } - switch ($action) - { - case 'add' : - if (empty($user_in_group) && UserInGroup::model()->insertRecords(array('ugid' => $ugid, 'uid' => $uid))) - { - list($aViewUrls, $aData) = $this->index($ugid, array('type' => 'success', 'message' => $clang->gT('User added.'))); - } - else - { - list($aViewUrls, $aData) = $this->index($ugid, array('type' => 'warning', 'message' => $clang->gT('Failed to add user.') . '
        ' . $clang->gT('User already exists in the group.'))); - } + break; + case 'remove' : + if (!empty($user_in_group) && UserInGroup::model()->deleteByPk(array('ugid' => $ugid, 'uid' => $uid))) + { + list($aViewUrls, $aData) = $this->index($ugid, array('type' => 'success', 'message' => $clang->gT('User removed.'))); + } + else + { + list($aViewUrls, $aData) = $this->index($ugid, array('type' => 'warning', 'message' => $clang->gT('Failed to remove user.') . ' ' . $clang->gT('User does not exist in the group.'))); + } - break; - case 'remove' : - if (!empty($user_in_group) && UserInGroup::model()->deleteByPk(array('ugid' => $ugid, 'uid' => $uid))) - { - list($aViewUrls, $aData) = $this->index($ugid, array('type' => 'success', 'message' => $clang->gT('User removed.'))); - } - else - { - list($aViewUrls, $aData) = $this->index($ugid, array('type' => 'warning', 'message' => $clang->gT('Failed to remove user.') . '
        ' . $clang->gT('User does not exist in the group.'))); - } - - break; + break; + } } } else diff --git a/sources/application/controllers/survey/index.php b/sources/application/controllers/survey/index.php index 272c702..14ada89 100644 --- a/sources/application/controllers/survey/index.php +++ b/sources/application/controllers/survey/index.php @@ -69,7 +69,7 @@ class index extends CAction { $thisstep = $param['thisstep']; $move=getMove(); Yii::app()->setConfig('move',$move); - $clienttoken = $param['token']; + $clienttoken = trim($param['token']); $standardtemplaterootdir = Yii::app()->getConfig('standardtemplaterootdir'); if (is_null($thissurvey) && !is_null($surveyid)) $thissurvey = getSurveyInfo($surveyid); @@ -313,11 +313,8 @@ class index extends CAction { } } - $_SESSION['survey_'.$surveyid]['holdname'] = $sLoadName; - $_SESSION['survey_'.$surveyid]['holdpass'] = $sLoadPass; - if ($errormsg == "") { - LimeExpressionManager::SetDirtyFlag(); + LimeExpressionManager::SetDirtyFlag(); buildsurveysession($surveyid); if (loadanswers()){ Yii::app()->setConfig('move','movenext'); @@ -378,27 +375,35 @@ class index extends CAction { } if (!isset($tokenInstance)) { - $tk = Token::model($surveyid)->findByAttributes(array('token' => $token)); - if($tk->completed == 'N') + $oToken = Token::model($surveyid)->findByAttributes(array('token' => $token)); + if($oToken) { $now = dateShift(date("Y-m-d H:i:s"), "Y-m-d H:i:s", Yii::app()->getConfig("timeadjust")); - if(strtotime($now) < strtotime($tk->validfrom)) + if($oToken->completed != 'N' && !empty($oToken->completed)) { - $err = $clang->gT("This invitation is not valid yet."); + $sError = $clang->gT("This invitation has already been used."); } - else + elseif(strtotime($now) < strtotime($oToken->validfrom)) { - $err = $clang->gT("This invitation is not valid anymore."); + $sError = $clang->gT("This invitation is not valid yet."); + } + elseif(strtotime($now) > strtotime($oToken->validuntil)) + { + $sError = $clang->gT("This invitation is not valid anymore."); + } + else // This can not happen + { + $sError = $clang->gT("This is a controlled survey. You need a valid token to participate."); } } else { - $err = $clang->gT("This invitation has already been used."); + $sError = $clang->gT("This is a controlled survey. You need a valid token to participate."); } $asMessage = array( null, $clang->gT("We are sorry but you are not allowed to enter this survey."), - $err, + $sError, sprintf($clang->gT("For further information please contact %s"), $thissurvey['adminname']." ("."{$thissurvey['adminemail']})") ); @@ -499,25 +504,52 @@ class index extends CAction { if (!isset($_SESSION['survey_'.$surveyid]['srid']) && $thissurvey['anonymized'] == "N" && $thissurvey['active'] == "Y" && isset($token) && $token !='') { // load previous answers if any (dataentry with nosubmit) - //$oSurveyTokenInstance=SurveyDynamic::model($surveyid)->find(array('select'=>'id,submitdate,lastpage', 'condition'=>'token=:token', 'order'=>'id DESC','params'=>array('token' => $token))); - $oSurveyTokenInstance=SurveyDynamic::model($surveyid)->find(array('condition'=>'token=:token', 'order'=>'id DESC','params'=>array('token' => $token))); - if ( $oSurveyTokenInstance ) + $oResponses = Response::model($surveyid)->findAllByAttributes(array( + 'token' => $token + ), array('order' => 'id DESC')); + if (!empty($oResponses)) { - if((empty($oSurveyTokenInstance->submitdate) || $thissurvey['alloweditaftercompletion'] == 'Y' ) && $thissurvey['tokenanswerspersistence'] == 'Y') + /** + * We fire the response selection event when at least 1 response was found. + * If there is just 1 response the plugin still has to option to choose + * NOT to use it. + */ + $event = new PluginEvent('beforeLoadResponse'); + $event->set('responses', $oResponses); + $event->set('surveyId', $surveyid); + App()->pluginManager->dispatchEvent($event); + + $oResponse = $event->get('response'); + // If $oResponse is false we act as if no response was found. + // This allows a plugin to deny continuing a response. + if ($oResponse !== false) { - $_SESSION['survey_'.$surveyid]['srid'] = $oSurveyTokenInstance->id; - if (!empty($oSurveyTokenInstance->lastpage)) + // If plugin does not set a response we use the first one found, (this replicates pre-plugin behavior) + if (!isset($oResponse) && (!isset($oResponses[0]->submitdate) || $thissurvey['alloweditaftercompletion'] == 'Y') && $thissurvey['tokenanswerspersistence'] == 'Y') { - $_SESSION['survey_'.$surveyid]['LEMtokenResume'] = true; - $_SESSION['survey_'.$surveyid]['step'] = $oSurveyTokenInstance->lastpage; + $oResponse = $oResponses[0]; + } + + if (isset($oResponse)) + { + $_SESSION['survey_'.$surveyid]['srid'] = $oResponse->id; + if (!empty($oResponse->lastpage)) + { + $_SESSION['survey_'.$surveyid]['LEMtokenResume'] = true; + // If the response was completed and user is allowed to edit after completion start at the beginning and not at the last page - just makes more sense + if (!($oResponse->submitdate && $thissurvey['alloweditaftercompletion'] == 'Y')) + { + $_SESSION['survey_'.$surveyid]['step'] = $oResponse->lastpage; + } + } + buildsurveysession($surveyid); + if(!empty($oResponse->submitdate)) // alloweditaftercompletion + { + $_SESSION['survey_'.$surveyid]['maxstep'] = $_SESSION['survey_'.$surveyid]['totalsteps']; + } + loadanswers(); } } - buildsurveysession($surveyid); - if(!empty($oSurveyTokenInstance->submitdate)) // alloweditaftercompletion - { - $_SESSION['survey_'.$surveyid]['maxstep'] = $_SESSION['survey_'.$surveyid]['totalsteps']; - } - loadanswers(); } } // Preview action : Preview right already tested before @@ -567,7 +599,7 @@ class index extends CAction { foreach(array('lang','action','newtest','qid','gid','sid','loadname','loadpass','scid','thisstep','move','token') as $sNeededParam) { $param[$sNeededParam]=returnGlobal($sNeededParam,true); - } + } return $param; } diff --git a/sources/application/core/LSUserIdentity.php b/sources/application/core/LSUserIdentity.php index 8cfeda2..5e56eb3 100644 --- a/sources/application/core/LSUserIdentity.php +++ b/sources/application/core/LSUserIdentity.php @@ -66,7 +66,7 @@ class LSUserIdentity extends CUserIdentity { // Delegate actual authentication to plugin $authEvent = new PluginEvent('newUserSession', $this); $authEvent->set('identity', $this); - App()->getPluginManager()->dispatchEvent($authEvent, array($this->plugin)); + App()->getPluginManager()->dispatchEvent($authEvent); $pluginResult = $authEvent->get('result'); if ($pluginResult instanceof LSAuthResult) { $result = $pluginResult; diff --git a/sources/application/core/LSYii_CaseValidator.php b/sources/application/core/LSYii_CaseValidator.php new file mode 100644 index 0000000..7d8f73e --- /dev/null +++ b/sources/application/core/LSYii_CaseValidator.php @@ -0,0 +1,47 @@ +type=='upper') + { + if (strtoupper($object->$attribute)==$object->$attribute){ + return; + } + else + { + $this->addError($object, $attribute, gT('Text needs to be uppercase.')); + return; + } + } + else // default to lowercase + { + if (strtolower($object->$attribute)==$object->$attribute){ + return; + } + else + { + $this->addError($object, $attribute, gT('Text needs to be lowercase.')); + return; + } + } + return; + } + +} diff --git a/sources/application/core/LSYii_EmailIDNAValidator.php b/sources/application/core/LSYii_EmailIDNAValidator.php index 530d029..42086ff 100644 --- a/sources/application/core/LSYii_EmailIDNAValidator.php +++ b/sources/application/core/LSYii_EmailIDNAValidator.php @@ -36,7 +36,7 @@ class LSYii_EmailIDNAValidator extends CValidator { foreach ($aEmailAdresses as $sEmailAddress) { - if (!validateEmailAddress($object->$attribute)) + if (!validateEmailAddress($sEmailAddress)) { $this->addError($object, $attribute, gT('Invalid email address.')); return; diff --git a/sources/application/core/LSYii_Validators.php b/sources/application/core/LSYii_Validators.php index b6aa934..6414e82 100644 --- a/sources/application/core/LSYii_Validators.php +++ b/sources/application/core/LSYii_Validators.php @@ -11,7 +11,7 @@ * See COPYRIGHT.php for copyright notices and details. * */ - + class LSYii_Validators extends CValidator { /** @@ -54,7 +54,7 @@ class LSYii_Validators extends CValidator { if($this->isUrl) { if ($object->$attribute== 'http://' || $object->$attribute=='https://') {$object->$attribute="";} - $object->$attribute=html_entity_decode($object->$attribute, ENT_QUOTES, "UTF-8"); // 140219 : Why not urlencode ? + $object->$attribute=str_replace(array('"',"'",' ','<','>'),'',html_entity_decode($object->$attribute, ENT_QUOTES, "UTF-8")); // 140219 : Why not urlencode ? } if($this->isLanguage) { @@ -69,7 +69,7 @@ class LSYii_Validators extends CValidator { /** * Remove some empty characters put by CK editor * Did we need to do if user don't use inline HTML editor ? - * + * * @param string $value */ public function fixCKeditor($value) @@ -95,8 +95,8 @@ class LSYii_Validators extends CValidator { return $value; } /** - * Remove any script or dangerous HTML - * + * Remove any script or dangerous HTML + * * @param string $value */ public function xssFilter($value) @@ -104,11 +104,12 @@ class LSYii_Validators extends CValidator { $filter = new CHtmlPurifier(); $filter->options = array( 'AutoFormat.RemoveEmpty'=>false, + 'Core.NormalizeNewlines'=>false, 'CSS.AllowTricky'=>true, // Allow display:none; (and other) 'HTML.SafeObject'=>true, // To allow including youtube 'Output.FlashCompat'=>true, 'Attr.EnableID'=>true, // Allow to set id - 'Attr.AllowedFrameTargets'=>array('_blank','_self'), + 'Attr.AllowedFrameTargets'=>array('_blank','_self'), 'URI.AllowedSchemes'=>array( 'http' => true, 'https' => true, @@ -119,22 +120,29 @@ class LSYii_Validators extends CValidator { ) ); // To allow script BUT purify : HTML.Trusted=true (plugin idea for admin or without XSS filtering ?) + + /** Start to get complete filtered value with url decode {QCODE} (bug #09300). This allow only question number in url, seems OK with XSS protection **/ + $sFiltered=preg_replace('#%7B([a-zA-Z0-9\.]*)%7D#','{$1}',$filter->purify($value)); Yii::import('application.helpers.expressions.em_core_helper');// Already imported in em_manager_helper.php ? $oExpressionManager= new ExpressionManager; + /** We get 2 array : one filtered, other unfiltered **/ $aValues=$oExpressionManager->asSplitStringOnExpressions($value);// Return array of array : 0=>the string,1=>string length,2=>string type (STRING or EXPRESSION) + $aFilteredValues=$oExpressionManager->asSplitStringOnExpressions($sFiltered);// Same but for the filtered string + $bCountIsOk=count($aValues)==count($aFilteredValues); + /** Construction of new string with unfiltered EM and filtered HTML **/ $sNewValue=""; - foreach($aValues as $aValue){ + foreach($aValues as $key=>$aValue){ if($aValue[2]=="STRING") - $sNewValue.=$filter->purify($aValue[0]); + $sNewValue.=$bCountIsOk ? $aFilteredValues[$key][0]:$filter->purify($aValue[0]);// If EM is broken : can throw invalid $key else { $sExpression=trim($aValue[0], '{}'); $sNewValue.="{"; - $aParsedExpressions=$oExpressionManager->Tokenize($sExpression,true);// Return array of array : 0=>the string,1=>string length,2=>string type + $aParsedExpressions=$oExpressionManager->Tokenize($sExpression,true); foreach($aParsedExpressions as $aParsedExpression) { if($aParsedExpression[2]=='DQ_STRING') - $sNewValue.="\"".$filter->purify($aParsedExpression[0])."\""; + $sNewValue.="\"".$filter->purify($aParsedExpression[0])."\""; // This disallow complex HTML construction with XSS elseif($aParsedExpression[2]=='SQ_STRING') $sNewValue.="'".$filter->purify($aParsedExpression[0])."'"; else @@ -143,11 +151,12 @@ class LSYii_Validators extends CValidator { $sNewValue.="}"; } } + gc_collect_cycles(); // To counter a high memory usage of HTML-Purifier return $sNewValue; } /** * Defines the customs validation rule for language string - * + * * @param mixed $value */ public function languageFilter($value) @@ -157,7 +166,7 @@ class LSYii_Validators extends CValidator { } /** * Defines the customs validation rule for multi language string - * + * * @param mixed $value */ public function multiLanguageFilter($value) @@ -166,5 +175,5 @@ class LSYii_Validators extends CValidator { $aValue=array_map("sanitize_languagecode",$aValue); return implode(" ",$aValue); } - + } diff --git a/sources/application/core/Survey_Common_Action.php b/sources/application/core/Survey_Common_Action.php index a9ff11b..e001a93 100644 --- a/sources/application/core/Survey_Common_Action.php +++ b/sources/application/core/Survey_Common_Action.php @@ -31,7 +31,7 @@ class Survey_Common_Action extends CAction // Make sure viewHelper can be autoloaded Yii::import('application.helpers.viewHelper'); } - + /** * Override runWithParams() implementation in CAction to help us parse * requests with subactions. @@ -344,7 +344,7 @@ class Survey_Common_Action extends CAction if(!isset($aData['display']['footer']) || $aData['display']['footer'] !== false) Yii::app()->getController()->_getAdminFooter('http://manual.limesurvey.org', $clang->gT('LimeSurvey online manual')); - + $out = ob_get_contents(); ob_clean(); App()->getClientScript()->render($out); @@ -816,7 +816,7 @@ class Survey_Common_Action extends CAction if ($aSurveyInfo['surveyls_url'] != "") { - $aData['endurl'] = " ".flattenText($aSurveyInfo['surveyls_urldescription']).""; + $aData['endurl'] = " ".flattenText($aSurveyInfo['surveyls_urldescription']).""; } else { @@ -922,7 +922,7 @@ class Survey_Common_Action extends CAction { $sQuery .=" AND gu.uid = ".Yii::app()->session['loginID']; } - + $grpresult = Yii::app()->db->createCommand($sQuery)->queryRow(); //Checked if ($grpresult) { diff --git a/sources/application/core/plugins/AuthLDAP/AuthLDAP.php b/sources/application/core/plugins/AuthLDAP/AuthLDAP.php index 1cd4933..f9dacf4 100644 --- a/sources/application/core/plugins/AuthLDAP/AuthLDAP.php +++ b/sources/application/core/plugins/AuthLDAP/AuthLDAP.php @@ -108,16 +108,6 @@ class AuthLDAP extends AuthPluginBase ->addContent(CHtml::tag('li', array(), "")); } - public function afterLoginFormSubmit() - { - // Here we handle post data - $request = $this->api->getRequest(); - if ($request->getIsPostRequest()) { - $this->setUsername( $request->getPost('user')); - $this->setPassword($request->getPost('password')); - } - } - /** * Modified getPluginSettings since we have a select box that autosubmits * and we only want to show the relevant options. @@ -166,6 +156,13 @@ class AuthLDAP extends AuthPluginBase public function newUserSession() { + // Do nothing if this user is not Authdb type + $identity = $this->getEvent()->get('identity'); + if ($identity->plugin != 'AuthLDAP') + { + return; + } + // Here we do the actual authentication $username = $this->getUsername(); $password = $this->getPassword(); diff --git a/sources/application/core/plugins/Authdb/Authdb.php b/sources/application/core/plugins/Authdb/Authdb.php index 447643a..2accf7d 100644 --- a/sources/application/core/plugins/Authdb/Authdb.php +++ b/sources/application/core/plugins/Authdb/Authdb.php @@ -2,15 +2,15 @@ class Authdb extends AuthPluginBase { protected $storage = 'DbStorage'; - protected $_onepass = null; - + static protected $description = 'Core: Database authentication + exports'; static protected $name = 'LimeSurvey internal database'; - - public function __construct(PluginManager $manager, $id) { + + public function __construct(PluginManager $manager, $id) + { parent::__construct($manager, $id); - + /** * Here you should handle subscribing to the events your plugin will handle */ @@ -19,7 +19,7 @@ class Authdb extends AuthPluginBase $this->subscribe('afterLoginFormSubmit'); $this->subscribe('newUserSession'); $this->subscribe('beforeDeactivate'); - + // Now register for the core exports $this->subscribe('listExportPlugins'); $this->subscribe('listExportOptions'); @@ -34,7 +34,7 @@ class Authdb extends AuthPluginBase // Optionally set a custom error message. $this->getEvent()->set('message', gT('Core plugin can not be disabled.')); } - + public function beforeLogin() { $this->getEvent()->set('default', get_class($this)); // This is the default login method, should be configurable from plugin settings @@ -49,7 +49,7 @@ class Authdb extends AuthPluginBase $this->setAuthPlugin(); // This plugin will handle authentication and skips the login form } } - + /** * Get the onetime password (if set) * @@ -59,10 +59,9 @@ class Authdb extends AuthPluginBase { return $this->_onepass; } - + public function newLoginForm() { - $sUserName=''; $sPassword=''; if (Yii::app()->getConfig("demoMode") === true && Yii::app()->getConfig("demoModePrefill") === true) @@ -75,27 +74,24 @@ class Authdb extends AuthPluginBase ->addContent(CHtml::tag('li', array(), "".CHtml::textField('user',$sUserName,array('size'=>40,'maxlength'=>40)))) ->addContent(CHtml::tag('li', array(), "".CHtml::passwordField('password',$sPassword,array('size'=>40,'maxlength'=>40)))); } - - public function afterLoginFormSubmit() - { - // Here we handle post data - $request = $this->api->getRequest(); - if ($request->getIsPostRequest()) { - $this->setUsername( $request->getPost('user')); - $this->setPassword($request->getPost('password')); - } - } - + public function newUserSession() { + // Do nothing if this user is not Authdb type + $identity = $this->getEvent()->get('identity'); + if ($identity->plugin != 'Authdb') + { + return; + } + // Here we do the actual authentication $username = $this->getUsername(); $password = $this->getPassword(); $onepass = $this->getOnePass(); - + $user = $this->api->getUserByName($username); - - if ($user !== null) + + if ($user !== null and $username==$user->users_name) // Control of equality for uppercase/lowercase with mysql { if (gettype($user->password)=='resource') { @@ -118,17 +114,16 @@ class Authdb extends AuthPluginBase $user->save(); $this->setAuthSuccess($user); return; - } + } if ($sStoredPassword !== hash('sha256', $password)) { $this->setAuthFailure(self::ERROR_PASSWORD_INVALID); return; } - $this->setAuthSuccess($user); } - + /** * Set the onetime password * @@ -141,8 +136,8 @@ class Authdb extends AuthPluginBase return $this; } - - + + // Now the export part: public function listExportOptions() { @@ -181,7 +176,7 @@ class Authdb extends AuthPluginBase break; } } - + /** * Registers this export type */ @@ -201,7 +196,7 @@ class Authdb extends AuthPluginBase $event->set('exportplugins', $exports); } - + /** * Returns the required IWriter */ @@ -234,4 +229,4 @@ class Authdb extends AuthPluginBase $event->set('writer', $writer); } -} \ No newline at end of file +} diff --git a/sources/application/core/plugins/Authwebserver/Authwebserver.php b/sources/application/core/plugins/Authwebserver/Authwebserver.php index 7ecdb9a..c5c845c 100644 --- a/sources/application/core/plugins/Authwebserver/Authwebserver.php +++ b/sources/application/core/plugins/Authwebserver/Authwebserver.php @@ -9,13 +9,18 @@ class Authwebserver extends AuthPluginBase protected $settings = array( 'strip_domain' => array( 'type' => 'checkbox', - 'label' => 'Strip domain part (DOMAIN\\USER or USER@DOMAIN)' + 'label' => 'Strip domain part (DOMAIN\\USER or USER@DOMAIN)', ), 'serverkey' => array( 'type' => 'string', 'label' => 'Key to use for username e.g. PHP_AUTH_USER, LOGON_USER, REMOTE_USER. See phpinfo in global settings.', - 'default' => 'REMOTE_USER' + 'default' => 'REMOTE_USER', ), + 'is_default' => array( + 'type' => 'checkbox', + 'label' => 'Check to make default authentication method (This disable Default LimeSurvey authentification by database)', + 'default' => true, + ) ); public function __construct(PluginManager $manager, $id) { @@ -52,16 +57,31 @@ class Authwebserver extends AuthPluginBase { $sUser = $aUserMappings[$sUser]; } - $this->setUsername($sUser); - $this->setAuthPlugin(); // This plugin handles authentication, halt further execution of auth plugins + $oUser = $this->api->getUserByName($sUser); + if($oUser || $this->api->getConfigKey('auth_webserver_autocreate_user')) + { + $this->setUsername($sUser); + $this->setAuthPlugin(); // This plugin handles authentication, halt further execution of auth plugins + } + elseif($this->get('is_default',null,null,$this->settings['is_default']['default'])) + { + throw new CHttpException(401,'Wrong credentials for LimeSurvey administration.'); + } } } public function newUserSession() { + // Do nothing if this user is not Authwebserver type + $identity = $this->getEvent()->get('identity'); + if ($identity->plugin != 'Authwebserver') + { + return; + } + /* @var $identity LSUserIdentity */ $sUser = $this->getUserName(); - + $oUser = $this->api->getUserByName($sUser); if (is_null($oUser)) { @@ -103,10 +123,9 @@ class Authwebserver extends AuthPluginBase { $this->setAuthFailure(self::ERROR_USERNAME_INVALID); } - } } -} \ No newline at end of file +} diff --git a/sources/application/core/plugins/ExportR/RDataWriter.php b/sources/application/core/plugins/ExportR/RDataWriter.php index d9273ba..c80e2b5 100644 --- a/sources/application/core/plugins/ExportR/RDataWriter.php +++ b/sources/application/core/plugins/ExportR/RDataWriter.php @@ -74,9 +74,9 @@ class RDataWriter extends CsvWriter { } if ($value == 'Y') { // Yes - return 1; + return 2; } elseif ($value === '') { // No - return 0; + return 1; } else { // Not shown return $this->na; } @@ -84,9 +84,9 @@ class RDataWriter extends CsvWriter { case 'Y': // Yes no question if ($value == 'Y') { - return 1; + return 2; } elseif ($value == 'N') { - return 0; + return 1; } else { // No data, probably a hidden question return $this->na; diff --git a/sources/application/core/plugins/ExportSTATAxml/STATAxmlWriter.php b/sources/application/core/plugins/ExportSTATAxml/STATAxmlWriter.php index 1bbc880..5b60258 100644 --- a/sources/application/core/plugins/ExportSTATAxml/STATAxmlWriter.php +++ b/sources/application/core/plugins/ExportSTATAxml/STATAxmlWriter.php @@ -351,7 +351,7 @@ class STATAxmlWriter extends Writer if (empty($this->headers)) { $this->headers = $headers; - foreach ($this->headers as $iKey => $sVarname) + foreach ($this->headers as $iKey => &$sVarname) { $this->headers[$iKey] = $this->STATAvarname($sVarname); } @@ -366,10 +366,11 @@ class STATAxmlWriter extends Writer */ protected function updateCustomresponsemap() { - //create array that holds each values' data type - foreach ($this->customResponsemap as $iRespId => $aResponses) + //go through each particpants' responses + foreach ($this->customResponsemap as $iRespId => &$aResponses) { - foreach ($aResponses as $iVarid => $response) + // go through variables and response items + foreach ($aResponses as $iVarid => &$response) { $response=trim($response); //recode answercode=answer if codes are non-numeric (cannot be used with value labels) @@ -382,18 +383,15 @@ class STATAxmlWriter extends Writer { $iScaleID = $this->customFieldmap['questions'][$this->headersSGQA[$iVarid]]['scale_id']; } - $iQID = $this->customFieldmap['questions'][$this->headersSGQA[$iVarid]]['qid']; + $iQID = $this->customFieldmap['questions'][$this->headersSGQA[$iVarid]]['qid']; if (isset($this->customFieldmap['answers'][$iQID][$iScaleID][$response]['answer'])) { $response = trim($this->customFieldmap['answers'][$iQID][$iScaleID][$response]['answer']); // get answertext instead of answercode } } - if ($response == '') - { - $aDatatypes[$this->headersSGQA[$iVarid]][$iRespId] = 'emptystr'; - } - else + + if ($response != '') { // recode some values from letters to numeric, so we can attach value labels and have more time doing statistics switch ($this->customFieldmap['questions'][$this->headersSGQA[$iVarid]]['type']) @@ -435,7 +433,16 @@ class STATAxmlWriter extends Writer break; } - // look at each of the responses and fill $aDatatypes with the respective STATA data type + /* look at each of the responses and determine STATA data type and format of the respective variables + datatypes coded as follows: + 1="" + 2=byte + 3=int + 4=long + 5=float + 6=double + 7=string + */ $numberresponse = trim($response); if ($this->customFieldmap['info']['surveyls_numberformat'] == 1) // if settings: decimal seperator==',' { @@ -448,83 +455,98 @@ class STATAxmlWriter extends Writer { if ($numberresponse >= $this->minByte && $numberresponse <= $this->maxByte) { - $aDatatypes[$this->headersSGQA[$iVarid]][$iRespId] = 'byte'; //this response is of STATA type 'byte' + $iDatatype=2; //this response is of STATA type 'byte' } elseif ($numberresponse >= $this->minInt && $numberresponse <= $this->maxInt) { - $aDatatypes[$this->headersSGQA[$iVarid]][$iRespId] = 'int'; // and this is is 'int' + $iDatatype=3; // and this is is 'int' } else { if ($this->customFieldmap['questions'][$this->headersSGQA[$iVarid]]['type'] == 'D') // if datefield then a 'double' data type is needed { - $aDatatypes[$this->headersSGQA[$iVarid]][$iRespId] = 'double'; + $iDatatype=6; // double } else { - $aDatatypes[$this->headersSGQA[$iVarid]][$iRespId] = 'long'; + $iDatatype=4; //long } } } else //non-integer numeric response { - $aDatatypes[$this->headersSGQA[$iVarid]][$iRespId] = 'float'; + $iDatatype=5; // float $response = $numberresponse; //replace in customResponsemap: value with '.' as decimal } } else // non-numeric response { - $aDatatypes[$this->headersSGQA[$iVarid]][$iRespId] = 'string'; - $strlenarray[$this->headersSGQA[$iVarid]][$iRespId] = strlen($response); //for strings we need the length as well for the data type + $iDatatype=7; //string + $iStringlength=strlen($response); //for strings we need the length for the format and the data type } } - $this->customResponsemap[$iRespId][$iVarid]=$response; //write the recoded response back to the response array + else + { + $iDatatype=1; // response = "" + } + + // initialize format and type (default: empty) + if (!isset($aStatatypelist[$this->headersSGQA[$iVarid]]['type'])) + $aStatatypelist[$this->headersSGQA[$iVarid]]['type']=1; + if (!isset($aStatatypelist[$this->headersSGQA[$iVarid]]['format'])) + $aStatatypelist[$this->headersSGQA[$iVarid]]['format']=0; + + // Does the variable need a higher datatype because of the current response? + if ($aStatatypelist[$this->headersSGQA[$iVarid]]['type'] < $iDatatype) + $aStatatypelist[$this->headersSGQA[$iVarid]]['type'] = $iDatatype; + + // if datatype is a string, set needed stringlength + if ($iDatatype==7) + { + // Does the variable need a higher stringlength because of the current response? + if ($aStatatypelist[$this->headersSGQA[$iVarid]]['format'] < $iStringlength) + $aStatatypelist[$this->headersSGQA[$iVarid]]['format'] = $iStringlength; + + } + //write the recoded response back to the response array + $this->customResponsemap[$iRespId][$iVarid]=$response; } } - // create an array $typelist from $aDatatypes with content: variable=> data type and data format - foreach ($aDatatypes as $variable => $responses) + + // translate coding into STATA datatypes, format and length + foreach ($aStatatypelist as $variable => $data) { - if (in_array('string', $responses, true)) + switch ($data['type']) { - $max = max($strlenarray[$variable]); // get maximum string length per string variable - // cap str[length] at $maxStringLength - $typelist[$variable]['type'] = 'str' . $max = $max > $this->maxStringLength ? $this->maxStringLength : $max; - $typelist[$variable]['format'] = '%' . $max = $max > $this->maxStringLength ? $this->maxStringLength : $max . 's'; + case 7: + $this->customFieldmap['questions'][$variable]['statatype'] = 'str'. min($data['format'], $this->maxStringLength); + $this->customFieldmap['questions'][$variable]['stataformat'] = '%' . min($data['format'], $this->maxStringLength) . 's'; + break; + case 6: + $this->customFieldmap['questions'][$variable]['statatype'] = 'double'; + $this->customFieldmap['questions'][$variable]['stataformat'] = '%tc'; + break; + case 5: + $this->customFieldmap['questions'][$variable]['statatype'] = 'float'; + $this->customFieldmap['questions'][$variable]['stataformat'] = '%10.0g'; + break; + case 4: + $this->customFieldmap['questions'][$variable]['statatype'] = 'long'; + $this->customFieldmap['questions'][$variable]['stataformat'] = '%10.0g'; + break; + case 3: + $this->customFieldmap['questions'][$variable]['statatype'] = 'int'; + $this->customFieldmap['questions'][$variable]['stataformat'] = '%10.0g'; + break; + case 2: + $this->customFieldmap['questions'][$variable]['statatype'] = 'byte'; + $this->customFieldmap['questions'][$variable]['stataformat'] = '%10.0g'; + break; + case 1: + $this->customFieldmap['questions'][$variable]['statatype'] = 'byte'; + $this->customFieldmap['questions'][$variable]['stataformat'] = '%9.0g'; + break; } - elseif (in_array('double', $responses, true)) // only used for dates/times (milliseconds passed since 1960) - { - $typelist[$variable]['type'] = 'double'; - $typelist[$variable]['format'] = '%tc'; - } - elseif (in_array('float', $responses, true)) - { - $typelist[$variable]['type'] = 'float'; - $typelist[$variable]['format'] = '%10.0g'; - } - elseif (in_array('long', $responses, true)) - { - $typelist[$variable]['type'] = 'long'; - $typelist[$variable]['format'] = '%10.0g'; - } - elseif (in_array('int', $responses, true)) - { - $typelist[$variable]['type'] = 'int'; - $typelist[$variable]['format'] = '%10.0g'; - } - elseif (in_array('byte', $responses, true)) - { - $typelist[$variable]['type'] = 'byte'; - $typelist[$variable]['format'] = '%10.0g'; - } - elseif (in_array('emptystr', $responses, true)) - { - $typelist[$variable]['type'] = 'byte'; //variables that only contain '' as responses will be a byte... - $typelist[$variable]['format'] = '%9.0g'; - } - $this->customFieldmap['questions'][$variable]['statatype'] = $typelist[$variable]['type']; - $this->customFieldmap['questions'][$variable]['stataformat'] = $typelist[$variable]['format']; - - } } diff --git a/sources/application/extensions/SettingsWidget/SettingsWidget.php b/sources/application/extensions/SettingsWidget/SettingsWidget.php index cf6b057..3217a14 100644 --- a/sources/application/extensions/SettingsWidget/SettingsWidget.php +++ b/sources/application/extensions/SettingsWidget/SettingsWidget.php @@ -233,10 +233,10 @@ { $out .= CHtml::label($metaData['label'], $id, $metaData['labelOptions']); } - $out .= CHtml::textField($id, $value, array( + $out .= CHtml::numberField($id, $value, array( 'id' => $id, 'form' => $form, - 'pattern' => '\d+(\.\d+)?' + 'data-type'=>'float', )); return $out; @@ -266,6 +266,17 @@ ); return $out; } + + public function renderInfo($name, array $metaData, $form = null) + { + $out = ''; + $id = $name; + $value = isset($metaData['content']) ? $metaData['content'] : ''; + if (is_array($value)) { throw new CException('wrong type' . $name); } + $out .= $value; + + return $out; + } public function renderInt($name, array $metaData, $form = null) { @@ -277,11 +288,12 @@ { $out .= CHtml::label($metaData['label'], $id, $metaData['labelOptions']); } - $out .= CHtml::textField($id, $value, array( + $step=isset($metaData['step'])?$metaData['step']:1; + $out .= CHtml::numberField($id, $value, array( 'id' => $id, 'form' => $form, 'data-type' => 'int', - 'pattern' => '\d+' + 'step' => 1, )); return $out; @@ -313,6 +325,21 @@ { return CHtml::image($metaData['path']); } + + public function renderRadio($name, array $metaData, $form = null) + { + $out = ''; + $id = $name; + $value = isset($metaData['current']) ? $metaData['current'] : (isset($metaData['default']) ? $metaData['default'] : null); + if (isset($metaData['label'])) + { + $out .= CHtml::label($metaData['label'], $id); + } + + $out .= CHtml::radioButtonList($name, $value, $metaData['options']); + return $out; + } + public function renderRelevance($name, array $metaData, $form = null) { $out = ''; @@ -405,6 +432,24 @@ return $out; } + public function renderLink($name, array $metaData, $form = null) + { + $out = ''; + $id = $name; + if (isset($metaData['label'])) + { + $out .= CHtml::label($metaData['label'], $id); + } + + $metaData['class'][] = 'btn'; + $out .= CHtml::link($metaData['label'], $metaData['link'], array( + 'id' => $id, + 'style' => $metaData['style'], + 'class' => implode(' ', $metaData['class']) + )); + return $out; + } + public function renderList($name, array $metaData, $form = null) { $id = $name; @@ -452,4 +497,4 @@ } } -?> \ No newline at end of file +?> diff --git a/sources/application/extensions/SettingsWidget/assets/settingswidget.css b/sources/application/extensions/SettingsWidget/assets/settingswidget.css index a3a798d..03c10a5 100644 --- a/sources/application/extensions/SettingsWidget/assets/settingswidget.css +++ b/sources/application/extensions/SettingsWidget/assets/settingswidget.css @@ -8,8 +8,7 @@ div.row { } .settingswidget input[type^='button'], .settingswidget label{ - height: 30px; - line-height: 30px; + line-height: normal; margin-top: 0px; } @@ -69,6 +68,7 @@ div.row { padding-right: 10px; width: 40%; display: inline-block; + vertical-align: top; } .settingswidget .setting > label:after{ content: ':'; diff --git a/sources/application/helpers/SurveyRuntimeHelper.php b/sources/application/helpers/SurveyRuntimeHelper.php index abd1bbf..9952f97 100644 --- a/sources/application/helpers/SurveyRuntimeHelper.php +++ b/sources/application/helpers/SurveyRuntimeHelper.php @@ -15,154 +15,154 @@ class SurveyRuntimeHelper { - protected function createFullQuestionIndex($LEMsessid, $surveyMode) - { - if ($surveyMode == 'group') - { - $this->createFullQuestionIndexByGroup($LEMsessid); - } - else - { - $this->createFullQuestionIndexByQuestion($LEMsessid); - } - - } + protected function createFullQuestionIndex($LEMsessid, $surveyMode) + { + if ($surveyMode == 'group') + { + $this->createFullQuestionIndexByGroup($LEMsessid); + } + else + { + $this->createFullQuestionIndexByQuestion($LEMsessid); + } - protected function createFullQuestionIndexByGroup($LEMsessid) - { - echo "\n\n\n"; - echo CHtml::openTag('div', array('id' => 'index')); - echo CHtml::openTag('div', array('class' => 'container')); - echo CHtml::tag('h2', array(), gT("Question index")); - echo CHtml::openTag('ol'); - foreach ($_SESSION[$LEMsessid]['grouplist'] as $key => $group) - { -// echo ''; -// Better to use tracevar / - if (LimeExpressionManager::GroupIsRelevant($group['gid'])) - { - $group['step'] = $key + 1; - $stepInfo = LimeExpressionManager::singleton()->_ValidateGroup($key); - $classes = implode(' ', array( - 'row', - $stepInfo['anyUnanswered'] ? 'missing' : '', - $_SESSION[$LEMsessid]['step'] == $group['step'] ? 'current' : '' + } - )); - $sButtonSubmit=CHtml::htmlButton(gT('Go to this group'),array('type'=>'submit','value'=>$group['step'],'name'=>'move','class'=>'jshide')); - echo CHtml::tag('li', array( - 'data-gid' => $group['gid'], - 'title' => $group['description'], - 'class' => $classes, - ), $group['group_name'].$sButtonSubmit); - } - } - echo CHtml::closeTag('ol'); - echo CHtml::closeTag('div'); - echo CHtml::closeTag('div'); + protected function createFullQuestionIndexByGroup($LEMsessid) + { + echo "\n\n\n"; + echo CHtml::openTag('div', array('id' => 'index')); + echo CHtml::openTag('div', array('class' => 'container')); + echo CHtml::tag('h2', array(), gT("Question index")); + echo CHtml::openTag('ol'); + foreach ($_SESSION[$LEMsessid]['grouplist'] as $key => $group) + { + // echo ''; + // Better to use tracevar / + if (LimeExpressionManager::GroupIsRelevant($group['gid'])) + { + $group['step'] = $key + 1; + $stepInfo = LimeExpressionManager::singleton()->_ValidateGroup($key); + $classes = implode(' ', array( + 'row', + $stepInfo['anyUnanswered'] ? 'missing' : '', + $_SESSION[$LEMsessid]['step'] == $group['step'] ? 'current' : '' + + )); + $sButtonSubmit=CHtml::htmlButton(gT('Go to this group'),array('type'=>'submit','value'=>$group['step'],'name'=>'move','class'=>'jshide')); + echo CHtml::tag('li', array( + 'data-gid' => $group['gid'], + 'title' => $group['description'], + 'class' => $classes, + ), $group['group_name'].$sButtonSubmit); + } + } + echo CHtml::closeTag('ol'); + echo CHtml::closeTag('div'); + echo CHtml::closeTag('div'); App()->getClientScript()->registerScript('manageIndex',"manageIndex()\n",CClientScript::POS_END); - } + } - protected function createFullQuestionIndexByQuestion($LEMsessid) - { - echo CHtml::openTag('div', array('id' => 'index')); - echo CHtml::openTag('div', array('class' => 'container')); - echo CHtml::tag('h2', array(), gT("Question index")); - echo 'Question by question not yet supported, use incremental index.'; - echo CHtml::closeTag('div'); - echo CHtml::closeTag('div'); + protected function createFullQuestionIndexByQuestion($LEMsessid) + { + echo CHtml::openTag('div', array('id' => 'index')); + echo CHtml::openTag('div', array('class' => 'container')); + echo CHtml::tag('h2', array(), gT("Question index")); + echo 'Question by question not yet supported, use incremental index.'; + echo CHtml::closeTag('div'); + echo CHtml::closeTag('div'); App()->getClientScript()->registerScript('manageIndex',"manageIndex()\n",CClientScript::POS_END); - } - - protected function createIncrementalQuestionIndex($LEMsessid, $surveyMode) - { - echo "\n\n\n"; + } - echo '

        ' . gT("Question index") . '

        '; + protected function createIncrementalQuestionIndex($LEMsessid, $surveyMode) + { + echo "\n\n\n"; - $stepIndex = LimeExpressionManager::GetStepIndexInfo(); - $lastGseq=-1; - $gseq = -1; - $grel = true; - for($v = 0, $n = 0; $n != $_SESSION[$LEMsessid]['maxstep']; ++$n) - { - if (!isset($stepIndex[$n])) { - continue; // this is an invalid group - skip it - } - $stepInfo = $stepIndex[$n]; + echo '

        ' . gT("Question index") . '

        '; - if ($surveyMode == 'question') - { - if ($lastGseq != $stepInfo['gseq']) { - // show the group label - ++$gseq; - $g = $_SESSION[$LEMsessid]['grouplist'][$gseq]; - $grel = !LimeExpressionManager::GroupIsIrrelevantOrHidden($gseq); - if ($grel) - { - $gtitle = LimeExpressionManager::ProcessString($g['group_name']); - echo '

        ' . flattenText($gtitle) . "

        "; - } - $lastGseq = $stepInfo['gseq']; - } - if (!$grel || !$stepInfo['show']) - { - continue; - } - $q = $_SESSION[$LEMsessid]['fieldarray'][$n]; - } - else - { - ++$gseq; - if (!$stepInfo['show']) - { - continue; - } - $g = $_SESSION[$LEMsessid]['grouplist'][$gseq]; - } + $stepIndex = LimeExpressionManager::GetStepIndexInfo(); + $lastGseq=-1; + $gseq = -1; + $grel = true; + for($v = 0, $n = 0; $n != $_SESSION[$LEMsessid]['maxstep']; ++$n) + { + if (!isset($stepIndex[$n])) { + continue; // this is an invalid group - skip it + } + $stepInfo = $stepIndex[$n]; - if ($surveyMode == 'group') - { - $indexlabel = LimeExpressionManager::ProcessString($g['group_name']); - $sButtonText=gT('Go to this group'); - } - else - { - $indexlabel = LimeExpressionManager::ProcessString($q[3]); - $sButtonText=gT('Go to this question'); - } + if ($surveyMode == 'question') + { + if ($lastGseq != $stepInfo['gseq']) { + // show the group label + ++$gseq; + $g = $_SESSION[$LEMsessid]['grouplist'][$gseq]; + $grel = !LimeExpressionManager::GroupIsIrrelevantOrHidden($gseq); + if ($grel) + { + $gtitle = LimeExpressionManager::ProcessString($g['group_name']); + echo '

        ' . flattenText($gtitle) . "

        "; + } + $lastGseq = $stepInfo['gseq']; + } + if (!$grel || !$stepInfo['show']) + { + continue; + } + $q = $_SESSION[$LEMsessid]['fieldarray'][$n]; + } + else + { + ++$gseq; + if (!$stepInfo['show']) + { + continue; + } + $g = $_SESSION[$LEMsessid]['grouplist'][$gseq]; + } - $sText = (($surveyMode == 'group') ? flattenText($indexlabel) : flattenText($indexlabel)); - $bGAnsw = !$stepInfo['anyUnanswered']; + if ($surveyMode == 'group') + { + $indexlabel = LimeExpressionManager::ProcessString($g['group_name']); + $sButtonText=gT('Go to this group'); + } + else + { + $indexlabel = LimeExpressionManager::ProcessString($q[3]); + $sButtonText=gT('Go to this question'); + } - ++$v; + $sText = (($surveyMode == 'group') ? flattenText($indexlabel) : flattenText($indexlabel)); + $bGAnsw = !$stepInfo['anyUnanswered']; - $class = ($n == $_SESSION[$LEMsessid]['step'] - 1 ? 'current' : ($bGAnsw ? 'answer' : 'missing')); - if ($v % 2) - $class .= " odd"; + ++$v; - $s = $n + 1; - echo "
        "; - echo "$v"; - echo "$sText"; + $class = ($n == $_SESSION[$LEMsessid]['step'] - 1 ? 'current' : ($bGAnsw ? 'answer' : 'missing')); + if ($v % 2) + $class .= " odd"; + + $s = $n + 1; + echo "
        "; + echo "$v"; + echo "$sText"; echo CHtml::htmlButton($sButtonText,array('type'=>'submit','value'=>$s,'name'=>'move','class'=>'jshide')); - echo "
        "; - } + echo "
        "; + } - if ($_SESSION[$LEMsessid]['maxstep'] == $_SESSION[$LEMsessid]['totalsteps']) - { + if ($_SESSION[$LEMsessid]['maxstep'] == $_SESSION[$LEMsessid]['totalsteps']) + { echo CHtml::htmlButton(gT('Submit'),array('type'=>'submit','value'=>'movesubmit','name'=>'move','class'=>'submit button')); - } + } - echo '
        '; + echo '
        '; App()->getClientScript()->registerScript('manageIndex',"manageIndex()\n",CClientScript::POS_END); - } + } /** * Main function * @@ -172,25 +172,18 @@ class SurveyRuntimeHelper { function run($surveyid,$args) { global $errormsg; extract($args); - if (!$thissurvey) { $thissurvey = getSurveyInfo($surveyid); } $LEMsessid = 'survey_' . $surveyid; - if (isset($_SESSION[$LEMsessid]['s_lang'])) - { - $this->setJavascriptVar($surveyid, $_SESSION[$LEMsessid]['s_lang']); - } - else - { - $this->setJavascriptVar($surveyid, $thissurvey['language']); - } + $this->setJavascriptVar($surveyid, isset($clang->langcode) ? $clang->langcode : $thissurvey['language']); + $sTemplatePath=getTemplatePath(Yii::app()->getConfig("defaulttemplate")).DIRECTORY_SEPARATOR; if (isset ($_SESSION['survey_'.$surveyid]['templatepath'])) { $sTemplatePath=$_SESSION['survey_'.$surveyid]['templatepath']; } - // $LEMdebugLevel - customizable debugging for Lime Expression Manager + // $LEMdebugLevel - customizable debugging for Lime Expression Manager $LEMdebugLevel = 0; // LEM_DEBUG_TIMING; // (LEM_DEBUG_TIMING + LEM_DEBUG_VALIDATION_SUMMARY + LEM_DEBUG_VALIDATION_DETAIL); $LEMskipReprocessing=false; // true if used GetLastMoveResult to avoid generation of unneeded extra JavaScript switch ($thissurvey['format']) @@ -208,25 +201,24 @@ class SurveyRuntimeHelper { } $radix=getRadixPointData($thissurvey['surveyls_numberformat']); $radix = $radix['separator']; - $surveyOptions = array( - 'active' => ($thissurvey['active'] == 'Y'), - 'allowsave' => ($thissurvey['allowsave'] == 'Y'), - 'anonymized' => ($thissurvey['anonymized'] != 'N'), - 'assessments' => ($thissurvey['assessments'] == 'Y'), - 'datestamp' => ($thissurvey['datestamp'] == 'Y'), - 'deletenonvalues'=>Yii::app()->getConfig('deletenonvalues'), - 'hyperlinkSyntaxHighlighting' => (($LEMdebugLevel & LEM_DEBUG_VALIDATION_SUMMARY) == LEM_DEBUG_VALIDATION_SUMMARY), // TODO set this to true if in admin mode but not if running a survey - 'ipaddr' => ($thissurvey['ipaddr'] == 'Y'), - 'radix'=>$radix, - 'refurl' => (($thissurvey['refurl'] == "Y" && isset($_SESSION[$LEMsessid]['refurl'])) ? $_SESSION[$LEMsessid]['refurl'] : NULL), - 'savetimings' => ($thissurvey['savetimings'] == "Y"), - 'surveyls_dateformat' => (isset($thissurvey['surveyls_dateformat']) ? $thissurvey['surveyls_dateformat'] : 1), - 'startlanguage'=>(isset($clang->langcode) ? $clang->langcode : $thissurvey['language']), - 'target' => Yii::app()->getConfig('uploaddir').DIRECTORY_SEPARATOR.'surveys'.DIRECTORY_SEPARATOR.$thissurvey['sid'].DIRECTORY_SEPARATOR.'files'.DIRECTORY_SEPARATOR, - 'tempdir' => Yii::app()->getConfig('tempdir').DIRECTORY_SEPARATOR, - 'timeadjust' => (isset($timeadjust) ? $timeadjust : 0), - 'token' => (isset($clienttoken) ? $clienttoken : NULL), + 'active' => ($thissurvey['active'] == 'Y'), + 'allowsave' => ($thissurvey['allowsave'] == 'Y'), + 'anonymized' => ($thissurvey['anonymized'] != 'N'), + 'assessments' => ($thissurvey['assessments'] == 'Y'), + 'datestamp' => ($thissurvey['datestamp'] == 'Y'), + 'deletenonvalues'=>Yii::app()->getConfig('deletenonvalues'), + 'hyperlinkSyntaxHighlighting' => (($LEMdebugLevel & LEM_DEBUG_VALIDATION_SUMMARY) == LEM_DEBUG_VALIDATION_SUMMARY), // TODO set this to true if in admin mode but not if running a survey + 'ipaddr' => ($thissurvey['ipaddr'] == 'Y'), + 'radix'=>$radix, + 'refurl' => (($thissurvey['refurl'] == "Y" && isset($_SESSION[$LEMsessid]['refurl'])) ? $_SESSION[$LEMsessid]['refurl'] : NULL), + 'savetimings' => ($thissurvey['savetimings'] == "Y"), + 'surveyls_dateformat' => (isset($thissurvey['surveyls_dateformat']) ? $thissurvey['surveyls_dateformat'] : 1), + 'startlanguage'=>(isset($clang->langcode) ? $clang->langcode : $thissurvey['language']), + 'target' => Yii::app()->getConfig('uploaddir').DIRECTORY_SEPARATOR.'surveys'.DIRECTORY_SEPARATOR.$thissurvey['sid'].DIRECTORY_SEPARATOR.'files'.DIRECTORY_SEPARATOR, + 'tempdir' => Yii::app()->getConfig('tempdir').DIRECTORY_SEPARATOR, + 'timeadjust' => (isset($timeadjust) ? $timeadjust : 0), + 'token' => (isset($clienttoken) ? $clienttoken : NULL), ); //Security Checked: POST, GET, SESSION, REQUEST, returnGlobal, DB @@ -264,11 +256,11 @@ class SurveyRuntimeHelper { $_SESSION[$LEMsessid]['step'] = 0; if ($surveyMode == 'survey') { - $move = "movenext"; // to force a call to NavigateForwards() + LimeExpressionManager::JumpTo(1, false, false, true); } - elseif (isset($thissurvey['showwelcome']) && $thissurvey['showwelcome'] == 'N') + elseif (isset($thissurvey['showwelcome']) && $thissurvey['showwelcome'] == 'N') { - $move = "movenext"; + $moveResult=LimeExpressionManager::JumpTo(1, false, false, true); $_SESSION[$LEMsessid]['step']=1; } } @@ -334,16 +326,16 @@ class SurveyRuntimeHelper { unset($_SESSION[$LEMsessid]['LEMtokenResume']); } else if (!$LEMskipReprocessing) + { + //Move current step ########################################################################### + if (isset($move) && $move == 'moveprev' && ($thissurvey['allowprev'] == 'Y' || $thissurvey['questionindex'] > 0)) { - //Move current step ########################################################################### - if (isset($move) && $move == 'moveprev' && ($thissurvey['allowprev'] == 'Y' || $thissurvey['questionindex'] > 0)) + $moveResult = LimeExpressionManager::NavigateBackwards(); + if ($moveResult['at_start']) { - $moveResult = LimeExpressionManager::NavigateBackwards(); - if ($moveResult['at_start']) - { - $_SESSION[$LEMsessid]['step'] = 0; - unset($moveResult); // so display welcome page again - } + $_SESSION[$LEMsessid]['step'] = 0; + unset($moveResult); // so display welcome page again + } } if (isset($move) && $move == "movenext") { @@ -362,24 +354,24 @@ class SurveyRuntimeHelper { $moveResult = LimeExpressionManager::JumpTo($_SESSION[$LEMsessid]['totalsteps'] + 1, false); } } - if (isset($move) && (preg_match('/^changelang_/', $move) || $move=='changelang')) + if (isset($move) && $move=='changelang') { // jump to current step using new language, processing POST values - $moveResult = LimeExpressionManager::JumpTo($_SESSION[$LEMsessid]['step'], false, true, false, true); // do process the POST data + $moveResult = LimeExpressionManager::JumpTo($_SESSION[$LEMsessid]['step'], false, true, true, true); // do process the POST data } if (isset($move) && isNumericInt($move) && $thissurvey['questionindex'] == 1) { - $move = (int) $move; + $move = (int) $move; if ($move > 0 && (($move <= $_SESSION[$LEMsessid]['step']) || (isset($_SESSION[$LEMsessid]['maxstep']) && $move <= $_SESSION[$LEMsessid]['maxstep']))) { $moveResult = LimeExpressionManager::JumpTo($move, false); } } - elseif (isset($move) && isNumericInt($move) && $thissurvey['questionindex'] == 2) - { - $move = (int) $move; - $moveResult = LimeExpressionManager::JumpTo($move, false, true, true); - } + elseif (isset($move) && isNumericInt($move) && $thissurvey['questionindex'] == 2) + { + $move = (int) $move; + $moveResult = LimeExpressionManager::JumpTo($move, false, true, true); + } if (!isset($moveResult) && !($surveyMode != 'survey' && $_SESSION[$LEMsessid]['step'] == 0)) { // Just in case not set via any other means, but don't do this if it is the welcome page @@ -387,9 +379,17 @@ class SurveyRuntimeHelper { $LEMskipReprocessing=true; } } - if (isset($moveResult) && isset($moveResult['seq']) )// Reload at first page (welcome after click previous fill an empty $moveResult array { + // With complete index, we need to revalidate whole group bug #08806. It's actually the only mode where we JumpTo with force + if($moveResult['finished'] == true && $thissurvey['questionindex']==2)// $thissurvey['questionindex']>=2 + { + //LimeExpressionManager::JumpTo(-1, false, false, true); + LimeExpressionManager::StartSurvey($surveyid, $surveyMode, $surveyOptions); + $moveResult = LimeExpressionManager::JumpTo($_SESSION[$LEMsessid]['totalsteps']+1, false, false, false);// no preview, no save data and NO force + if(!$moveResult['mandViolation'] && $moveResult['valid'] && empty($moveResult['invalidSQs'])) + $moveResult['finished'] = true; + } if ($moveResult['finished'] == true) { $move = 'movesubmit'; @@ -418,31 +418,12 @@ class SurveyRuntimeHelper { Yii::app()->end(); // So we can still see debug messages } - //CHECK IF ALL MANDATORY QUESTIONS HAVE BEEN ANSWERED ############################################ - //First, see if we are moving backwards or doing a Save so far, and its OK not to check: - if ( - (isset($move) && ($move == "moveprev" || (is_int($move) && $_SESSION[$LEMsessid]['prevstep'] == $_SESSION[$LEMsessid]['maxstep']) || $_SESSION[$LEMsessid]['prevstep'] == $_SESSION[$LEMsessid]['step'])) || - (isset($_POST['saveall']) && $_POST['saveall'] == $clang->gT("Save your responses so far"))) - { - if (Yii::app()->getConfig('allowmandbackwards') == 1) - { - $backok = "Y"; - } - else - { - $backok = "N"; - } - } - else - { - $backok = "N"; // NA, since not moving backwards - } // TODO FIXME if ($thissurvey['active'] == "Y") { Yii::import("application.libraries.Save"); $cSave = new Save(); } - if ($thissurvey['active'] == "Y" && Yii::app()->request->getPost('saveall')) // Don't test if save is allowed + if ($thissurvey['active'] == "Y" && Yii::app()->request->getPost('saveall')) // Don't test if save is allowed { $bTokenAnswerPersitance = $thissurvey['tokenanswerspersistence'] == 'Y' && isset($surveyid) && tableExists('tokens_'.$surveyid); // must do this here to process the POSTed values @@ -454,7 +435,7 @@ class SurveyRuntimeHelper { else { // Intentional retest of all conditions to be true, to make sure we do have tokens and surveyid - // Now update lastpage to $_SESSION[$LEMsessid]['step'] in SurveyDynamic, otherwise we land on + // Now update lastpage to $_SESSION[$LEMsessid]['step'] in SurveyDynamic, otherwise we land on // the previous page when we return. $iResponseID = $_SESSION[$LEMsessid]['srid']; $oResponse = SurveyDynamic::model($surveyid)->findByPk($iResponseID); @@ -487,7 +468,7 @@ class SurveyRuntimeHelper { if (isset($moveResult) && !$moveResult['finished']) { $unansweredSQList = $moveResult['unansweredSQs']; - if (strlen($unansweredSQList) > 0 && $backok != "N") + if (strlen($unansweredSQList) > 0) { $notanswered = explode('|', $unansweredSQList); } @@ -498,7 +479,7 @@ class SurveyRuntimeHelper { //CHECK INPUT $invalidSQList = $moveResult['invalidSQs']; - if (strlen($invalidSQList) > 0 && $backok != "N") + if (strlen($invalidSQList) > 0) { $notvalidated = explode('|', $invalidSQList); } @@ -510,7 +491,7 @@ class SurveyRuntimeHelper { // CHECK UPLOADED FILES // TMSW - Move this into LEM::NavigateForwards? - $filenotvalidated = checkUploadedFileValidity($surveyid, $move, $backok); + $filenotvalidated = checkUploadedFileValidity($surveyid, $move); //SEE IF THIS GROUP SHOULD DISPLAY $show_empty_group = false; @@ -532,12 +513,12 @@ class SurveyRuntimeHelper { } } resetTimers(); - + //Before doing the "templatereplace()" function, check the $thissurvey['url'] //field for limereplace stuff, and do transformations! $thissurvey['surveyls_url'] = passthruReplace($thissurvey['surveyls_url'], $thissurvey); $thissurvey['surveyls_url'] = templatereplace($thissurvey['surveyls_url'], array(), $redata, 'URLReplace', false, NULL, array(), true ); // to do INSERTANS substitutions - + //END PAGE - COMMIT CHANGES TO DATABASE if ($thissurvey['active'] != "Y") //If survey is not active, don't really commit { @@ -581,10 +562,10 @@ class SurveyRuntimeHelper { { if ($thissurvey['usecookie'] == "Y" && $tokensexist != 1) //don't use cookies if tokens are being used { - setcookie("LS_" . $surveyid . "_STATUS", "COMPLETE", time() + 31536000); //Cookie will expire in 365 days + setcookie("LS_" . $surveyid . "_STATUS", "COMPLETE", time() + 31536000); //Cookie will expire in 365 days } - + $content = ''; $content .= templatereplace(file_get_contents($sTemplatePath."startpage.pstpl"), array(), $redata, 'SubmitStartpage', false, NULL, array(), true ); @@ -625,7 +606,7 @@ class SurveyRuntimeHelper { } - if (trim(strip_tags($thissurvey['surveyls_endtext'])) == '') + if (trim(str_replace(array('

        ','

        '),'',$thissurvey['surveyls_endtext'])) == '') { $completed = "
        " . $clang->gT("Thank you!") . "

        \n\n" . $clang->gT("Your survey responses have been recorded.") . "

        \n"; @@ -676,7 +657,7 @@ class SurveyRuntimeHelper { echo $content; } $redata['completed'] = $completed; - + // @todo Remove direct session access. $event = new PluginEvent('afterSurveyComplete'); if (isset($_SESSION[$LEMsessid]['srid'])) @@ -695,7 +676,7 @@ class SurveyRuntimeHelper { $redata['completed'] = implode("\n", $blocks) ."\n". $redata['completed']; $redata['thissurvey']['surveyls_url'] = $thissurvey['surveyls_url']; - + echo templatereplace(file_get_contents($sTemplatePath."completed.pstpl"), array('completed' => $completed), $redata, 'SubmitCompleted', false, NULL, array(), true ); echo "\n"; if ((($LEMdebugLevel & LEM_DEBUG_TIMING) == LEM_DEBUG_TIMING)) @@ -708,12 +689,12 @@ class SurveyRuntimeHelper { } echo templatereplace(file_get_contents($sTemplatePath."endpage.pstpl"), array(), $redata, 'SubmitEndpage', false, NULL, array(), true ); doFooter(); - + // The session cannot be killed until the page is completely rendered if ($thissurvey['printanswers'] != 'Y') { killSurveySession($surveyid); - } + } exit; } } @@ -772,21 +753,21 @@ class SurveyRuntimeHelper { $groupdescription = $clang->gT("There are no more questions. Please press the button to finish this survey."); } else if ($surveyMode != 'survey') - { - if ($previewquestion) { - $_qid = sanitize_int($param['qid']); - LimeExpressionManager::StartSurvey($surveyid, 'question', $surveyOptions, false, $LEMdebugLevel); - $qSec = LimeExpressionManager::GetQuestionSeq($_qid); - $moveResult = LimeExpressionManager::JumpTo($qSec+1,true,false,true); - $stepInfo = LimeExpressionManager::GetStepIndexInfo($moveResult['seq']); - } else { - $stepInfo = LimeExpressionManager::GetStepIndexInfo($moveResult['seq']); - } - - $gid = $stepInfo['gid']; - $groupname = $stepInfo['gname']; - $groupdescription = $stepInfo['gtext']; + { + if ($previewquestion) { + $_qid = sanitize_int($param['qid']); + LimeExpressionManager::StartSurvey($surveyid, 'question', $surveyOptions, false, $LEMdebugLevel); + $qSec = LimeExpressionManager::GetQuestionSeq($_qid); + $moveResult = LimeExpressionManager::JumpTo($qSec+1,true,false,true); + $stepInfo = LimeExpressionManager::GetStepIndexInfo($moveResult['seq']); + } else { + $stepInfo = LimeExpressionManager::GetStepIndexInfo($moveResult['seq']); } + + $gid = $stepInfo['gid']; + $groupname = $stepInfo['gname']; + $groupdescription = $stepInfo['gtext']; + } } if ($previewquestion) { @@ -942,7 +923,7 @@ class SurveyRuntimeHelper { } Yii::app()->clientScript->registerScript("showpopup","showpopup=".(int)Yii::app()->getConfig('showpopups').";",CClientScript::POS_HEAD); //if(count($aPopup)) - Yii::app()->clientScript->registerScript('startPopup',"startPopups=".json_encode($aPopup).";",CClientScript::POS_HEAD); + Yii::app()->clientScript->registerScript('startPopup',"startPopups=".json_encode($aPopup).";",CClientScript::POS_HEAD); //ALTER PAGE CLASS TO PROVIDE WHOLE-PAGE ALTERNATION if ($surveyMode != 'survey' && $_SESSION[$LEMsessid]['step'] != $_SESSION[$LEMsessid]['prevstep'] || (isset($_SESSION[$LEMsessid]['stepno']) && $_SESSION[$LEMsessid]['stepno'] % 2)) @@ -1161,12 +1142,12 @@ class SurveyRuntimeHelper { if ($surveyMode != 'survey' && $thissurvey['questionindex'] == 1) { - $this->createIncrementalQuestionIndex($LEMsessid, $surveyMode); + $this->createIncrementalQuestionIndex($LEMsessid, $surveyMode); + } + elseif ($surveyMode != 'survey' && $thissurvey['questionindex'] == 2) + { + $this->createFullQuestionIndex($LEMsessid, $surveyMode); } - elseif ($surveyMode != 'survey' && $thissurvey['questionindex'] == 2) - { - $this->createFullQuestionIndex($LEMsessid, $surveyMode); - } echo "\n"; echo "\n"; @@ -1198,16 +1179,16 @@ class SurveyRuntimeHelper { } /** - * setJavascriptVar - * - * - * @return @void - * @param integer $iSurveyId : the survey id for the script - * @param string $sLanguage : the actual language for the survey - */ + * setJavascriptVar + * + * + * @return @void + * @param integer $iSurveyId : the survey id for the script + * @param string $sLanguage : the actual language for the survey + */ public function setJavascriptVar($iSurveyId, $sLanguage) { - $aSurveyinfo=getSurveyInfo($iSurveyId); + $aSurveyinfo=getSurveyInfo($iSurveyId,$sLanguage); if(isset($aSurveyinfo['surveyls_numberformat'])) { $aLSJavascriptVar=array(); diff --git a/sources/application/helpers/admin/activate_helper.php b/sources/application/helpers/admin/activate_helper.php index 7b77d1b..3d80913 100644 --- a/sources/application/helpers/admin/activate_helper.php +++ b/sources/application/helpers/admin/activate_helper.php @@ -18,51 +18,62 @@ * @param int $fixnumbering * @todo can call this function (no $_GET, but getParam) AND do it with Yii */ -function fixNumbering($fixnumbering, $iSurveyID) +function fixNumbering($iQuestionID, $iSurveyID) { Yii::app()->loadHelper("database"); LimeExpressionManager::RevertUpgradeConditionsToRelevance($iSurveyID); //Fix a question id - requires renumbering a question - $oldqid = (int) $fixnumbering; - $lastqid=Question::model()->getMaxId('qid', true); // Always refresh as we insert new qid's - $newqid=$lastqid+1; + $iQuestionID = (int) $iQuestionID; + $iMaxQID=Question::model()->getMaxId('qid', true); // Always refresh as we insert new qid's + $iNewQID=$iMaxQID+1; // Not sure we can do this in MSSQL ? - $query = "UPDATE {{questions}} SET qid=$newqid WHERE qid=$oldqid"; - $result = db_execute_assosc($query); + $sQuery = "UPDATE {{questions}} SET qid=$iNewQID WHERE qid=$iQuestionID"; + Yii::app()->db->createCommand($sQuery)->query(); // Update subquestions - $query = "UPDATE {{questions}} SET parent_qid=$newqid WHERE parent_qid=$oldqid"; - $result = db_execute_assosc($query); + $sQuery = "UPDATE {{questions}} SET parent_qid=$iNewQID WHERE parent_qid=$iQuestionID"; + Yii::app()->db->createCommand($sQuery)->query(); //Update conditions.. firstly conditions FOR this question - $query = "UPDATE {{conditions}} SET qid=$newqid WHERE qid=$oldqid"; - $result = db_execute_assosc($query); + $sQuery = "UPDATE {{conditions}} SET qid=$iNewQID WHERE qid=$iQuestionID"; + Yii::app()->db->createCommand($sQuery)->query(); + //Update default values + $sQuery = "UPDATE {{defaultvalues}} SET qid=$iNewQID WHERE qid=$iQuestionID"; + Yii::app()->db->createCommand($sQuery)->query(); + $sQuery = "UPDATE {{defaultvalues}} SET sqid=$iNewQID WHERE sqid=$iQuestionID"; + Yii::app()->db->createCommand($sQuery)->query(); + //Update quotas + $sQuery = "UPDATE {{quota_members}} SET qid=$iNewQID WHERE qid=$iQuestionID"; + Yii::app()->db->createCommand($sQuery)->query(); + //Update url params + $sQuery = "UPDATE {{survey_url_parameters}} SET targetqid=$iNewQID WHERE targetqid=$iQuestionID"; + Yii::app()->db->createCommand($sQuery)->query(); + $sQuery = "UPDATE {{survey_url_parameters}} SET targetsqid=$iNewQID WHERE targetsqid=$iQuestionID"; + Yii::app()->db->createCommand($sQuery)->query(); //Now conditions based upon this question - $query = "SELECT cqid, cfieldname FROM {{conditions}} WHERE cqid=$oldqid"; - $result = dbExecuteAssoc($query); - foreach ($result->readAll() as $row) - { - $switcher[]=array("cqid"=>$row['cqid'], "cfieldname"=>$row['cfieldname']); + $sQuery = "SELECT cqid, cfieldname FROM {{conditions}} WHERE cqid=$iQuestionID"; + $sResult=Yii::app()->db->createCommand($sQuery)->query(); + foreach ($sResult->readAll() as $row){ + $aSwitcher[]=array("cqid"=>$row['cqid'], "cfieldname"=>$row['cfieldname']); } - if (isset($switcher)) + if (isset($aSwitcher)) { - foreach ($switcher as $switch) + foreach ($aSwitcher as $aSwitch) { - $query = "UPDATE {{conditions}} - SET cqid=$newqid, - cfieldname='".str_replace("X".$oldqid, "X".$newqid, $switch['cfieldname'])."' - WHERE cqid=$oldqid"; - $result = db_execute_assosc($query); + $sQuery = "UPDATE {{conditions}} + SET cqid=$iNewQID, + cfieldname='".str_replace("X".$iQuestionID, "X".$iNewQID, $aSwitch['cfieldname'])."' + WHERE cqid=$iQuestionID"; + $sResult = db_execute_assosc($sQuery); } } - // TMSW Condition->Relevance: (1) Call LEM->ConvertConditionsToRelevance()when done. (2) Should relevance for old conditions be removed first? //Now question_attributes - $query = "UPDATE {{question_attributes}} SET qid=$newqid WHERE qid=$oldqid"; - $result = db_execute_assosc($query); + $sQuery = "UPDATE {{question_attributes}} SET qid=$iNewQID WHERE qid=$iQuestionID"; + Yii::app()->db->createCommand($sQuery)->query(); //Now answers - $query = "UPDATE {{answers}} SET qid=$newqid WHERE qid=$oldqid"; - $result = db_execute_assosc($query); + $sQuery = "UPDATE {{answers}} SET qid=$iNewQID WHERE qid=$iQuestionID"; + Yii::app()->db->createCommand($sQuery)->query(); LimeExpressionManager::UpgradeConditionsToRelevance($iSurveyID); } @@ -102,11 +113,11 @@ function checkQuestions($postsid, $iSurveyID, $qtypes) //CHECK TO MAKE SURE ALL QUESTION TYPES THAT REQUIRE ANSWERS HAVE ACTUALLY GOT ANSWERS //THESE QUESTION TYPES ARE: - // # "L" -> LIST + // # "L" -> LIST // # "O" -> LIST WITH COMMENT // # "M" -> Multiple choice - // # "P" -> Multiple choice with comments - // # "A", "B", "C", "E", "F", "H", "^" -> Various Array Types + // # "P" -> Multiple choice with comments + // # "A", "B", "C", "E", "F", "H", "^" -> Various Array Types // # "R" -> RANKING // # "U" -> FILE CSV MORE // # "I" -> LANGUAGE SWITCH @@ -214,25 +225,13 @@ function checkQuestions($postsid, $iSurveyID, $qtypes) } //CHECK THAT ALL THE CREATED FIELDS WILL BE UNIQUE - $fieldmap = createFieldMap($iSurveyID,'full',false,false,getBaseLanguageFromSurveyID($iSurveyID)); - if (isset($fieldmap)) + $fieldmap = createFieldMap($iSurveyID,'full',true,false,getBaseLanguageFromSurveyID($iSurveyID),$aDuplicateQIDs); + if (count($aDuplicateQIDs)) { - foreach($fieldmap as $fielddata) + foreach ($aDuplicateQIDs as $iQID=>$aDuplicate) { - $fieldlist[]=$fielddata['fieldname']; - } - $fieldlist=array_reverse($fieldlist); //let's always change the later duplicate, not the earlier one - } - - $checkKeysUniqueComparison = create_function('$value','if ($value > 1) return true;'); - @$duplicates = array_keys (array_filter (array_count_values($fieldlist), $checkKeysUniqueComparison)); - if (isset($duplicates)) - { - foreach ($duplicates as $dup) - { - $badquestion=arraySearchByKey($dup, $fieldmap, "fieldname", 1); - $fix = "[Click Here to Fix]"; - $failedcheck[]=array($badquestion['qid'], $badquestion['question'], ": Bad duplicate fieldname $fix", $badquestion['gid']); + $sFixLink = "[Click here to fix]"; + $failedcheck[]=array($iQID, $aDuplicate['question'], ": Bad duplicate fieldname {$sFixLink}", $aDuplicate['gid']); } } if(isset($failedcheck)) @@ -261,7 +260,7 @@ function activateSurvey($iSurveyID, $simulate = false) //Get list of questions for the base language $fieldmap = createFieldMap($iSurveyID,'full',true,false,getBaseLanguageFromSurveyID($iSurveyID)); - + $createsurvey = array(); foreach ($fieldmap as $j=>$arow) //With each question, create the appropriate field(s) @@ -289,7 +288,12 @@ function activateSurvey($iSurveyID, $simulate = false) $createsurvey[$arow['fieldname']] = "decimal (30,10)"; break; case "S": //SHORT TEXT + if (Yii::app()->db->driverName == 'mysql' || Yii::app()->db->driverName == 'mysqli') {$createsurvey[$arow['fieldname']] = "text";} + elseif (Yii::app()->db->driverName=='mssql' || Yii::app()->db->driverName=='sqlsrv' || Yii::app()->db->driverName=='dblib') + { + $createsurvey[$arow['fieldname']] = "nvarchar(255)"; + } else {$createsurvey[$arow['fieldname']] = "string";} break; case "L": //LIST (RADIO) @@ -363,14 +367,19 @@ function activateSurvey($iSurveyID, $simulate = false) } $arrSim[] = array($type); } - + if (Yii::app()->db->driverName=='mssql' || Yii::app()->db->driverName=='sqlsrv' || Yii::app()->db->driverName=='dblib') + { + if ($createsurvey[$arow['fieldname']] == "text") + { + $createsurvey[$arow['fieldname']] = "ntext"; + } + } } if ($simulate){ return array('dbengine'=>$CI->db->databasetabletype, 'dbtype'=>Yii::app()->db->driverName, 'fields'=>$arrSim); } - // If last question is of type MCABCEFHP^QKJR let's get rid of the ending coma in createsurvey //$createsurvey = rtrim($createsurvey, ",\n")."\n"; // Does nothing if not ending with a comma @@ -389,36 +398,32 @@ function activateSurvey($iSurveyID, $simulate = false) { if (isset($createsurvey['token'])) Yii::app()->db->createCommand()->createIndex("idx_survey_token_{$iSurveyID}_".rand(1,50000),$tabname,'token'); } - catch (CDbException $e) + catch (CDbException $e) { } - + $anquery = "SELECT autonumber_start FROM {{surveys}} WHERE sid={$iSurveyID}"; - if ($anresult=Yii::app()->db->createCommand($anquery)->query()->readAll()) + $iAutoNumberStart=Yii::app()->db->createCommand($anquery)->queryScalar(); + //if there is an autonumber_start field, start auto numbering here + if ($iAutoNumberStart!==false && $iAutoNumberStart>0) { - //if there is an autonumber_start field, start auto numbering here - foreach($anresult as $row) + if (Yii::app()->db->driverName=='mssql' || Yii::app()->db->driverName=='sqlsrv' || Yii::app()->db->driverName=='dblib') { + mssql_drop_primary_index('survey_'.$iSurveyID); + mssql_drop_constraint('id','survey_'.$iSurveyID); + $sQuery = "alter table {{survey_{$iSurveyID}}} drop column id "; + Yii::app()->db->createCommand($sQuery)->execute(); + $sQuery = "alter table {{survey_{$iSurveyID}}} add [id] int identity({$iAutoNumberStart},1)"; + Yii::app()->db->createCommand($sQuery)->execute(); + } + elseif (Yii::app()->db->driverName=='pgsql') { - if ($row['autonumber_start'] > 0) - { - if (Yii::app()->db->driverName=='mssql' || Yii::app()->db->driverName=='sqlsrv' || Yii::app()->db->driverName=='dblib') { - mssql_drop_primary_index('survey_'.$iSurveyID); - mssql_drop_constraint('id','survey_'.$iSurveyID); - $autonumberquery = "alter table {{survey_{$iSurveyID}}} drop column id "; - Yii::app()->db->createCommand($autonumberquery)->execute(); - $autonumberquery = "alter table {{survey_{$iSurveyID}}} add [id] int identity({$row['autonumber_start']},1)"; - Yii::app()->db->createCommand($autonumberquery)->execute(); - } - elseif (Yii::app()->db->driverName=='pgsql') - { - - } - else - { - $autonumberquery = "ALTER TABLE {{survey_{$iSurveyID}}} AUTO_INCREMENT = ".$row['autonumber_start']; - $result = @Yii::app()->db->createCommand($autonumberquery)->execute(); - } - } + $sQuery = "SELECT setval(pg_get_serial_sequence('{{survey_{$iSurveyID}}}', 'id'),{$iAutoNumberStart},false);"; + $result = @Yii::app()->db->createCommand($sQuery)->execute(); + } + else + { + $sQuery = "ALTER TABLE {{survey_{$iSurveyID}}} AUTO_INCREMENT = {$iAutoNumberStart}"; + $result = @Yii::app()->db->createCommand($sQuery)->execute(); } } diff --git a/sources/application/helpers/admin/backupdb_helper.php b/sources/application/helpers/admin/backupdb_helper.php index 10f307b..e2a1812 100644 --- a/sources/application/helpers/admin/backupdb_helper.php +++ b/sources/application/helpers/admin/backupdb_helper.php @@ -30,7 +30,7 @@ { echo $sOutput; } - + if (!is_null($sFileName)) { $oFile=fopen($sFileName,'w'); @@ -45,7 +45,7 @@ { fclose($oFile); } - + } function _outputDBDescription($sDbName, $bAllowExportAllDb) @@ -57,26 +57,31 @@ } $sOutput.= '-- Date of Dump: ' . dateShift(date('d-M-Y'), 'd-M-Y', Yii::app()->getConfig('timeadjust')) . "\n"; $sOutput.= '--' . "\n"; - return $sOutput; + return $sOutput; } function _outputDBData($bAllowExportAllDb, $bEchoOutput, $sFileName, $oFile) { - $aTables = Yii::app()->db->getSchema()->getTables(); - foreach ($aTables as $sTableName => $oTableData) + if ($bAllowExportAllDb){ + $aTables = Yii::app()->db->getSchema()->getTableNames(); + } + else { - if ($bAllowExportAllDb && Yii::app()->db->tablePrefix == substr($sTableName, 0, strlen(Yii::app()->db->tablePrefix))) { - $sOutput=_outputTableDescription($sTableName); - if ($bEchoOutput) - { - echo $sOutput; - } - if (!is_null($sFileName)) - { - fwrite($oFile,$sOutput); - } - _outputTableData($sTableName, $oTableData, $bEchoOutput, $sFileName, $oFile); + $aTables = Yii::app()->db->createCommand(dbSelectTablesLike(addcslashes(Yii::app()->db->tablePrefix,'_')."%"))->queryColumn(); + } + foreach ($aTables as $sTableName) + { + $oTableData=Yii::app()->db->getSchema()->getTable($sTableName); + $sOutput=_outputTableDescription($sTableName); + if ($bEchoOutput) + { + echo $sOutput; } + if (!is_null($sFileName)) + { + fwrite($oFile,$sOutput); + } + _outputTableData($sTableName, $oTableData, $bEchoOutput, $sFileName, $oFile); } } @@ -93,7 +98,7 @@ $aCreateTable = Yii::app()->db->createCommand('SHOW CREATE TABLE '.Yii::app()->db->quoteTableName($sTableName))->queryRow(); $sOutput.= $aCreateTable['Create Table'].';'."\n\n"; - return $sOutput; + return $sOutput; } /** @@ -115,7 +120,7 @@ $aRecords = Yii::app()->db->createCommand() ->select() ->from($sTableName) - ->limit(intval($iMaxNbRecords), ($i != 0 ? ($i * $iMaxNbRecords) + 1 : null)) + ->limit(intval($iMaxNbRecords), ($i != 0 ? ($i * $iMaxNbRecords) : null)) ->query()->readAll(); $sOutput.=_outputRecords($sTableName, $aFieldNames, $aRecords); @@ -126,13 +131,13 @@ if (!is_null($sFileName)) { fwrite($oFile,$sOutput); - } + } $sOutput=''; - + } $sOutput.= "\n"; - + } if ($bEchoOutput) { @@ -141,11 +146,13 @@ if (!is_null($sFileName)) { fwrite($oFile,$sOutput); - } + } } function _outputRecords($sTableName, $aFieldNames, $aRecords) { + $sLastFieldName=end($aFieldNames); + $aLastRecord=end($aRecords); $i=0; $sOutput=''; foreach ($aRecords as $aRecord) @@ -164,21 +171,19 @@ { if (isset($aRecord[$sFieldName]) && !is_null($aRecord[$sFieldName])) { - $sValue= addcslashes($aRecord[$sFieldName],"'"); - $sValue = preg_replace("#\n#", "\\n", $sValue); - $sOutput.= "'" . $sValue . "'"; + $sOutput.=Yii::app()->db->quoteValue($aRecord[$sFieldName]); } else { $sOutput.= 'NULL'; } - if (end($aFieldNames) != $sFieldName) { + if ($sFieldName != $sLastFieldName) { $sOutput.= ', '; } } $i++; - if ($i==200 || (end($aRecords) == $aRecord)) + if ($i==200 || ($aLastRecord == $aRecord)) { $sOutput.= ');' . "\n"; $i=0; @@ -218,5 +223,4 @@ $sDbName = $aMatches[1]; return $sDbName; - } - \ No newline at end of file + } diff --git a/sources/application/helpers/admin/export/HtmlWriter.php b/sources/application/helpers/admin/export/HtmlWriter.php index 53f137a..f45ec95 100644 --- a/sources/application/helpers/admin/export/HtmlWriter.php +++ b/sources/application/helpers/admin/export/HtmlWriter.php @@ -37,19 +37,7 @@ } elseif ($oOptions->output == 'file') { $this->handle = fopen($this->filename, 'w'); } - $this->groupMap = array(); - $index = 0; - foreach ($oOptions->selectedColumns as $column) { - if (isset($survey->fieldMap[$column])) { - $question = $survey->fieldMap[$column]; - } else { - // Token field - $question = array('gid'=>0, 'qid'=>''); - } - $question['index'] = $index; - $this->groupMap[intval($question['gid'])][] = $question; - $index++; - } + $this->groupMap = $this->setGroupMap($survey, $oOptions); } protected function writeHeader() @@ -77,6 +65,7 @@ $this->writeHeader(); $this->first = false; } + $this->tag('h1', sprintf(gT("Survey response"))); $this->openTag('div', array( 'class' => 'response', 'data-srid' => $values[0] diff --git a/sources/application/helpers/admin/export/PdfWriter.php b/sources/application/helpers/admin/export/PdfWriter.php index 9fcfca6..553ca8f 100644 --- a/sources/application/helpers/admin/export/PdfWriter.php +++ b/sources/application/helpers/admin/export/PdfWriter.php @@ -8,13 +8,21 @@ class PdfWriter extends Writer private $surveyName; private $clang; + /** + * Map of questions groups + * + * @var array + * @access private + */ + private $aGroupMap = array(); + public function init(SurveyObj $survey, $sLanguageCode, FormattingOptions $oOptions) { parent::init($survey, $sLanguageCode, $oOptions); $pdforientation=Yii::app()->getConfig('pdforientation'); $this->clang = new limesurvey_lang($sLanguageCode); - if ($oOptions->output=='file') + if ($oOptions->output=='file') { $this->pdfDestination = 'F'; } else { @@ -26,16 +34,11 @@ class PdfWriter extends Writer // create new PDF document $this->pdf = new pdf(); - $this->pdf->SetFont($aPdfLanguageSettings['pdffont'], '', $aPdfLanguageSettings['pdffontsize']); - $this->pdf->AddPage(); - $this->pdf->intopdf("PDF export ".date("Y.m.d-H:i", time())); - $this->pdf->setLanguageArray($aPdfLanguageSettings['lg']); - + $this->surveyName = $survey->info['surveyls_title']; + $this->pdf->initAnswerPDF($survey->info, $aPdfLanguageSettings, Yii::app()->getConfig('sitename'), $this->surveyName); $this->separator="\t"; - - $this->rowCounter = 0; - $this->surveyName = $survey->languageSettings['surveyls_title']; - $this->pdf->titleintopdf($this->surveyName, $survey->languageSettings['surveyls_description']); + $this->rowCounter = 0; + $this->aGroupMap = $this->setGroupMap($survey, $oOptions); } public function outputRecord($headers, $values, FormattingOptions $oOptions) @@ -44,7 +47,6 @@ class PdfWriter extends Writer if ($oOptions->answerFormat == 'short') { $pdfstring = ''; - $this->pdf->titleintopdf($this->clang->gT("Survey response")); foreach ($values as $value) { $pdfstring .= $value.' | '; @@ -57,14 +59,28 @@ class PdfWriter extends Writer { $this->pdf->AddPage(); } - $this->pdf->Cell(0, 10, sprintf($this->clang->gT("Survey response %d"), $this->rowCounter), 1, 1); - - $columnCounter = 0; - foreach($headers as $header) + $this->pdf->addTitle(sprintf($this->clang->gT("Survey response %d"), $this->rowCounter)); + foreach ($this->aGroupMap as $gid => $questions) { - $this->pdf->intopdf($header); - $this->pdf->intopdf($this->stripTagsFull($values[$columnCounter])); - $columnCounter++; + if ($gid != 0) + { + $this->pdf->addGidAnswer($questions[0]['group_name']); + } + foreach ($questions as $question) + { + if (isset($values[$question['index']]) && isset($headers[$question['index']])) + { + if ($question['type'] == 'N' || $question['type'] == 'K') + { + $sAuxValue=number_format(floatval($values[$question['index']]), 0, '', ''); + $this->pdf->addAnswer($headers[$question['index']], $sAuxValue, false); + } + else + { + $this->pdf->addAnswer($headers[$question['index']], $values[$question['index']], false); + } + } + } } } else diff --git a/sources/application/helpers/admin/export/Writer.php b/sources/application/helpers/admin/export/Writer.php index e9381fa..efdca8d 100644 --- a/sources/application/helpers/admin/export/Writer.php +++ b/sources/application/helpers/admin/export/Writer.php @@ -36,6 +36,31 @@ abstract class Writer implements IWriter } } + /** + * Return map of questions groups + * + * @param Survey $survey + * @param FormattingOptions $oOptions + * @return array + */ + public function setGroupMap(SurveyObj $survey, FormattingOptions $oOptions) + { + $aGroupMap = array(); + $index = 0; + foreach ($oOptions->selectedColumns as $column) { + if (isset($survey->fieldMap[$column])) { + $question = $survey->fieldMap[$column]; + } else { + // Token field + $question = array('gid'=>0, 'qid'=>''); + } + $question['index'] = $index; + $aGroupMap[intval($question['gid'])][] = $question; + $index++; + } + return $aGroupMap; + } + /** * Returns an abbreviated heading for the survey's question that matches * the $fieldName parameter (or false if a match is not found). @@ -395,6 +420,18 @@ abstract class Writer implements IWriter } //Output the results. $sFile=''; + + // If empty survey, prepare an empty responses array, and output just 1 empty record with header. + if ($survey->responses->rowCount == 0) + { + foreach ($oOptions->selectedColumns as $column) + { + $elementArray[]=""; + } + $this->outputRecord($headers, $elementArray, $oOptions); + } + + // If no empty survey, render/export responses array. foreach($survey->responses as $response) { $elementArray = array(); @@ -455,4 +492,4 @@ abstract class Writer implements IWriter * @param FormattingOptions $oOptions */ abstract protected function outputRecord($headers, $values, FormattingOptions $oOptions); -} \ No newline at end of file +} diff --git a/sources/application/helpers/admin/htmleditor_helper.php b/sources/application/helpers/admin/htmleditor_helper.php index b011792..457faf8 100644 --- a/sources/application/helpers/admin/htmleditor_helper.php +++ b/sources/application/helpers/admin/htmleditor_helper.php @@ -198,7 +198,7 @@ } $htmlcode .= "" - . "\n" + . "\n" . "\t\"".$clang-gT("Start HTML editor in a popup window")."\" id='".$fieldname."_popupctrlena' src='".Yii::app()->getConfig('adminimageurl')."edithtmlpopup.png' $imgopts class='btneditanswerena' />\n" . "\t\"".$clang-gT("Give focus to the HTML editor popup window")."\" id='".$fieldname."_popupctrldis' src='".Yii::app()->getConfig('adminimageurl')."edithtmlpopup_disabled.png' style='display:none' $imgopts class='btneditanswerdis' />\n" . "\n"; diff --git a/sources/application/helpers/admin/import_helper.php b/sources/application/helpers/admin/import_helper.php index 542f125..583c7eb 100644 --- a/sources/application/helpers/admin/import_helper.php +++ b/sources/application/helpers/admin/import_helper.php @@ -194,14 +194,14 @@ function CSVImportGroup($sFullFilePath, $iNewSID) $countgroups=0; if (isset($questionarray)) { - $questionfieldnames=convertCSVRowToArray($questionarray[0],',','"'); + $questionfieldnames=str_getcsv($questionarray[0],',','"'); unset($questionarray[0]); $countquestions = 0; } if (isset($answerarray)) { - $answerfieldnames=convertCSVRowToArray($answerarray[0],',','"'); + $answerfieldnames=str_getcsv($answerarray[0],',','"'); unset($answerarray[0]); $countanswers = count($answerarray); } @@ -220,7 +220,7 @@ function CSVImportGroup($sFullFilePath, $iNewSID) $langcode = Survey::model()->findByPk($iNewSID)->language; if (isset($grouparray)) { - $groupfieldnames = convertCSVRowToArray($grouparray[0],',','"'); + $groupfieldnames = str_getcsv($grouparray[0],',','"'); $langfieldnum = array_search("language", $groupfieldnames); $gidfieldnum = array_search("gid", $groupfieldnames); $groupssupportbaselang = doesImportArraySupportLanguage($grouparray,Array($gidfieldnum),$langfieldnum,$sBaseLanguage,true); @@ -261,7 +261,7 @@ function CSVImportGroup($sFullFilePath, $iNewSID) if (count($labelsetsarray) > 1) { - $labelsetfieldname = convertCSVRowToArray($labelsetsarray[0],',','"'); + $labelsetfieldname = str_getcsv($labelsetsarray[0],',','"'); $langfieldnum = array_search("languages", $labelsetfieldname); $lidfilednum = array_search("lid", $labelsetfieldname); $labelsetssupportbaselang = doesImportArraySupportLanguage($labelsetsarray,Array($lidfilednum),$langfieldnum,$sBaseLanguage,true); @@ -288,8 +288,8 @@ function CSVImportGroup($sFullFilePath, $iNewSID) $csarray=buildLabelSetCheckSumArray(); // build checksums over all existing labelsets $count=0; foreach ($labelsetsarray as $lsa) { - $fieldorders =convertCSVRowToArray($labelsetsarray[0],',','"'); - $fieldcontents=convertCSVRowToArray($lsa,',','"'); + $fieldorders =str_getcsv($labelsetsarray[0],',','"'); + $fieldcontents=str_getcsv($lsa,',','"'); if ($count==0) {$count++; continue;} $labelsetrowdata=array_combine($fieldorders,$fieldcontents); @@ -308,8 +308,8 @@ function CSVImportGroup($sFullFilePath, $iNewSID) if ($labelsarray) { $count=0; foreach ($labelsarray as $la) { - $lfieldorders =convertCSVRowToArray($labelsarray[0],',','"'); - $lfieldcontents=convertCSVRowToArray($la,',','"'); + $lfieldorders =str_getcsv($labelsarray[0],',','"'); + $lfieldcontents=str_getcsv($la,',','"'); if ($count==0) {$count++; continue;} // Combine into one array with keys and values since its easier to handle @@ -385,14 +385,14 @@ function CSVImportGroup($sFullFilePath, $iNewSID) if (isset($grouparray) && $grouparray) { // do GROUPS - $gafieldorders=convertCSVRowToArray($grouparray[0],',','"'); + $gafieldorders=str_getcsv($grouparray[0],',','"'); unset($grouparray[0]); $newgid = 0; $group_order = 0; // just to initialize this variable foreach ($grouparray as $ga) { - $gacfieldcontents=convertCSVRowToArray($ga,',','"'); + $gacfieldcontents=str_getcsv($ga,',','"'); $grouprowdata=array_combine($gafieldorders,$gacfieldcontents); // Skip not supported languages @@ -447,7 +447,7 @@ function CSVImportGroup($sFullFilePath, $iNewSID) foreach ($questionarray as $qa) { - $qacfieldcontents=convertCSVRowToArray($qa,',','"'); + $qacfieldcontents=str_getcsv($qa,',','"'); $questionrowdata=array_combine($questionfieldnames,$qacfieldcontents); $questionrowdata=array_map('convertCSVReturnToReturn', $questionrowdata); $questionrowdata["type"]=strtoupper($questionrowdata["type"]); @@ -582,7 +582,7 @@ function CSVImportGroup($sFullFilePath, $iNewSID) { foreach ($answerarray as $aa) { - $answerfieldcontents=convertCSVRowToArray($aa,',','"'); + $answerfieldcontents=str_getcsv($aa,',','"'); $answerrowdata=array_combine($answerfieldnames,$answerfieldcontents); if ($answerrowdata===false) { @@ -682,11 +682,11 @@ function CSVImportGroup($sFullFilePath, $iNewSID) // Finally the question attributes - it is called just once and only if there was a question if (isset($question_attributesarray) && $question_attributesarray) {//ONLY DO THIS IF THERE ARE QUESTION_ATTRIBUES - $fieldorders=convertCSVRowToArray($question_attributesarray[0],',','"'); + $fieldorders=str_getcsv($question_attributesarray[0],',','"'); unset($question_attributesarray[0]); foreach ($question_attributesarray as $qar) { - $fieldcontents=convertCSVRowToArray($qar,',','"'); + $fieldcontents=str_getcsv($qar,',','"'); $qarowdata=array_combine($fieldorders,$fieldcontents); // replace the qid for the new one (if there is no new qid in the $aQIDReplacements array it mean that this attribute is orphan -> error, skip this record) @@ -710,10 +710,10 @@ function CSVImportGroup($sFullFilePath, $iNewSID) $results['conditions']=0; if (isset($conditionsarray) && $conditionsarray) { - $fieldorders=convertCSVRowToArray($conditionsarray[0],',','"'); + $fieldorders=str_getcsv($conditionsarray[0],',','"'); unset($conditionsarray[0]); foreach ($conditionsarray as $car) { - $fieldcontents=convertCSVRowToArray($car,',','"'); + $fieldcontents=str_getcsv($car,',','"'); $conditionrowdata=array_combine($fieldorders,$fieldcontents); $oldqid = $conditionrowdata["qid"]; @@ -850,7 +850,7 @@ function XMLImportGroup($sFullFilePath, $iNewSID) $insertdata['gid']=$aGIDReplacements[$oldgid]; } if (isset($insertdata['gid'])) switchMSSQLIdentityInsert('groups',true); - + $result = Yii::app()->db->createCommand()->insert('{{groups}}', $insertdata); if (isset($insertdata['gid'])) switchMSSQLIdentityInsert('groups',false); @@ -896,7 +896,7 @@ function XMLImportGroup($sFullFilePath, $iNewSID) $insertdata['qid']=$aQIDReplacements[$oldqid]; } if (isset($insertdata['qid'])) switchMSSQLIdentityInsert('questions',true); - + $result = Yii::app()->db->createCommand()->insert('{{questions}}', $insertdata); if (isset($insertdata['qid'])) switchMSSQLIdentityInsert('questions',false); if (!isset($aQIDReplacements[$oldqid])) @@ -938,7 +938,7 @@ function XMLImportGroup($sFullFilePath, $iNewSID) $result = Yii::app()->db->createCommand()->insert('{{questions}}', $insertdata); $newsqid=getLastInsertID('{{questions}}'); if (isset($insertdata['qid'])) switchMSSQLIdentityInsert('questions',true); - + if (!isset($insertdata['qid'])) { $aQIDReplacements[$oldsqid]=$newsqid; // add old and new qid to the mapping array @@ -1020,10 +1020,10 @@ function XMLImportGroup($sFullFilePath, $iNewSID) $insertdata[(string)$key]=(string)$value; } $insertdata['qid']=$aQIDReplacements[(int)$insertdata['qid']]; // remap the qid - if ($insertdata['sqid']>0) + if ($insertdata['sqid']>0) { if (!isset($aQIDReplacements[(int)$insertdata['sqid']])) continue; // If SQID is invalid skip the default value - $insertdata['sqid']=$aQIDReplacements[(int)$insertdata['sqid']]; // remap the subquestion id + $insertdata['sqid']=$aQIDReplacements[(int)$insertdata['sqid']]; // remap the subquestion id } // now translate any links @@ -1238,7 +1238,7 @@ function CSVImportQuestion($sFullFilePath, $iNewSID, $newgid) if (isset($questionarray)) { - $questionfieldnames=convertCSVRowToArray($questionarray[0],',','"'); + $questionfieldnames=str_getcsv($questionarray[0],',','"'); unset($questionarray[0]); $countquestions = count($questionarray)-1; } @@ -1246,7 +1246,7 @@ function CSVImportQuestion($sFullFilePath, $iNewSID, $newgid) if (isset($answerarray)) { - $answerfieldnames=convertCSVRowToArray($answerarray[0],',','"'); + $answerfieldnames=str_getcsv($answerarray[0],',','"'); unset($answerarray[0]); while (trim(reset($answerarray))=='') { @@ -1298,7 +1298,7 @@ function CSVImportQuestion($sFullFilePath, $iNewSID, $newgid) if ($countlabelsets > 0) { - $labelsetfieldname = convertCSVRowToArray($labelsetsarray[0],',','"'); + $labelsetfieldname = str_getcsv($labelsetsarray[0],',','"'); $langfieldnum = array_search("languages", $labelsetfieldname); $lidfilednum = array_search("lid", $labelsetfieldname); $labelsetssupportbaselang = doesImportArraySupportLanguage($labelsetsarray,Array($lidfilednum),$langfieldnum,$sBaseLanguage,true); @@ -1316,8 +1316,8 @@ function CSVImportQuestion($sFullFilePath, $iNewSID, $newgid) $csarray=buildLabelSetCheckSumArray(); // build checksums over all existing labelsets $count=0; foreach ($labelsetsarray as $lsa) { - $fieldorders =convertCSVRowToArray($labelsetsarray[0],',','"'); - $fieldcontents=convertCSVRowToArray($lsa,',','"'); + $fieldorders =str_getcsv($labelsetsarray[0],',','"'); + $fieldcontents=str_getcsv($lsa,',','"'); if ($count==0) {$count++; continue;} $results['labelsets']++; @@ -1338,8 +1338,8 @@ function CSVImportQuestion($sFullFilePath, $iNewSID, $newgid) if ($labelsarray) { $count=0; foreach ($labelsarray as $la) { - $lfieldorders =convertCSVRowToArray($labelsarray[0],',','"'); - $lfieldcontents=convertCSVRowToArray($la,',','"'); + $lfieldorders =str_getcsv($labelsarray[0],',','"'); + $lfieldcontents=str_getcsv($la,',','"'); if ($count==0) {$count++; continue;} // Combine into one array with keys and values since its easier to handle @@ -1432,7 +1432,7 @@ function CSVImportQuestion($sFullFilePath, $iNewSID, $newgid) foreach ($questionarray as $qa) { - $qacfieldcontents=convertCSVRowToArray($qa,',','"'); + $qacfieldcontents=str_getcsv($qa,',','"'); $questionrowdata=array_combine($questionfieldnames,$qacfieldcontents); // Skip not supported languages @@ -1567,7 +1567,7 @@ function CSVImportQuestion($sFullFilePath, $iNewSID, $newgid) { foreach ($answerarray as $aa) { - $answerfieldcontents=convertCSVRowToArray($aa,',','"'); + $answerfieldcontents=str_getcsv($aa,',','"'); $answerrowdata=array_combine($answerfieldnames,$answerfieldcontents); if ($answerrowdata===false) { @@ -1660,10 +1660,10 @@ function CSVImportQuestion($sFullFilePath, $iNewSID, $newgid) // Finally the question attributes - it is called just once and only if there was a question if (isset($question_attributesarray) && $question_attributesarray) {//ONLY DO THIS IF THERE ARE QUESTION_ATTRIBUES - $fieldorders =convertCSVRowToArray($question_attributesarray[0],',','"'); + $fieldorders =str_getcsv($question_attributesarray[0],',','"'); unset($question_attributesarray[0]); foreach ($question_attributesarray as $qar) { - $fieldcontents=convertCSVRowToArray($qar,',','"'); + $fieldcontents=str_getcsv($qar,',','"'); $qarowdata=array_combine($fieldorders,$fieldcontents); $qarowdata["qid"]=$newqid; unset($qarowdata["qaid"]); @@ -2019,8 +2019,8 @@ function CSVImportLabelset($sFullFilePath, $options) if (isset($labelsetsarray) && $labelsetsarray) { $count=0; foreach ($labelsetsarray as $lsa) { - $fieldorders =convertCSVRowToArray($labelsetsarray[0],',','"'); - $fieldcontents=convertCSVRowToArray($lsa,',','"'); + $fieldorders =str_getcsv($labelsetsarray[0],',','"'); + $fieldcontents=str_getcsv($lsa,',','"'); if ($count==0) {$count++; continue;} $labelsetrowdata=array_combine($fieldorders,$fieldcontents); @@ -2040,11 +2040,11 @@ function CSVImportLabelset($sFullFilePath, $options) if ($labelsarray) { $count=0; - $lfieldorders=convertCSVRowToArray($labelsarray[0],',','"'); + $lfieldorders=str_getcsv($labelsarray[0],',','"'); unset($labelsarray[0]); foreach ($labelsarray as $la) { - $lfieldcontents=convertCSVRowToArray($la,',','"'); + $lfieldcontents=str_getcsv($la,',','"'); // Combine into one array with keys and values since its easier to handle $labelrowdata=array_combine($lfieldorders,$lfieldcontents); $labellid=$labelrowdata['lid']; @@ -2259,7 +2259,6 @@ function CSVImportSurvey($sFullFilePath,$iDesiredSurveyId=NULL,$bTranslateLinks= $substitutions=array(); $aQuestionCodeReplacements=array(); $aQuotaReplacements=array(); - $importresults['error']=false; $importresults['importwarnings']=array(); $importresults['question_attributes']=0; @@ -2597,8 +2596,8 @@ function CSVImportSurvey($sFullFilePath,$iDesiredSurveyId=NULL,$bTranslateLinks= if ($importresults['conditions']>0){$importresults['conditions']--;}; if ($importresults['labelsets']>0){$importresults['labelsets']--;}; if ($importresults['quota']>0){$importresults['quota']--;}; - $sfieldorders =convertCSVRowToArray($surveyarray[0],',','"'); - $sfieldcontents=convertCSVRowToArray($surveyarray[1],',','"'); + $sfieldorders =str_getcsv($surveyarray[0],',','"'); + $sfieldcontents=str_getcsv($surveyarray[1],',','"'); $surveyrowdata=array_combine($sfieldorders,$sfieldcontents); $iOldSID=$surveyrowdata["sid"]; @@ -2631,8 +2630,8 @@ function CSVImportSurvey($sFullFilePath,$iDesiredSurveyId=NULL,$bTranslateLinks= $insert=$surveyarray[0]; - $sfieldorders =convertCSVRowToArray($surveyarray[0],',','"'); - $sfieldcontents=convertCSVRowToArray($surveyarray[1],',','"'); + $sfieldorders =str_getcsv($surveyarray[0],',','"'); + $sfieldcontents=str_getcsv($surveyarray[1],',','"'); $surveyrowdata=array_combine($sfieldorders,$sfieldcontents); // Set new owner ID $surveyrowdata['owner_id']=Yii::app()->session['loginID']; @@ -2662,10 +2661,10 @@ function CSVImportSurvey($sFullFilePath,$iDesiredSurveyId=NULL,$bTranslateLinks= $iNewSID = Survey::model()->insertNewSurvey($surveyrowdata) or safeDie ("
        ".$clang->gT("Import of this survey file failed")."
        {$surveyarray[0]}

        \n" ); // Now import the survey language settings - $fieldorders=convertCSVRowToArray($surveylsarray[0],',','"'); + $fieldorders=str_getcsv($surveylsarray[0],',','"'); unset($surveylsarray[0]); foreach ($surveylsarray as $slsrow) { - $fieldcontents=convertCSVRowToArray($slsrow,',','"'); + $fieldcontents=str_getcsv($slsrow,',','"'); $surveylsrowdata=array_combine($fieldorders,$fieldcontents); // convert back the '\'.'n' char from the CSV file to true return char "\n" $surveylsrowdata=array_map('convertCSVReturnToReturn', $surveylsrowdata); @@ -2699,8 +2698,7 @@ function CSVImportSurvey($sFullFilePath,$iDesiredSurveyId=NULL,$bTranslateLinks= $aLanguagesSupported=array_merge($aLanguagesSupported,Survey::model()->findByPk($iNewSID)->additionalLanguages); - // DO SURVEY_RIGHTS - + // Create survey permissions Permission::model()->giveAllSurveyPermissions(Yii::app()->session['loginID'],$iNewSID); $importresults['deniedcountls'] =0; @@ -2718,8 +2716,8 @@ function CSVImportSurvey($sFullFilePath,$iDesiredSurveyId=NULL,$bTranslateLinks= $csarray=buildLabelSetCheckSumArray(); // build checksums over all existing labelsets $count=0; foreach ($labelsetsarray as $lsa) { - $fieldorders =convertCSVRowToArray($labelsetsarray[0],',','"'); - $fieldcontents=convertCSVRowToArray($lsa,',','"'); + $fieldorders =str_getcsv($labelsetsarray[0],',','"'); + $fieldcontents=str_getcsv($lsa,',','"'); if ($count==0) {$count++; continue;} $labelsetrowdata=array_combine($fieldorders,$fieldcontents); @@ -2737,8 +2735,8 @@ function CSVImportSurvey($sFullFilePath,$iDesiredSurveyId=NULL,$bTranslateLinks= if ($labelsarray) { $count=0; foreach ($labelsarray as $la) { - $lfieldorders =convertCSVRowToArray($labelsarray[0],',','"'); - $lfieldcontents=convertCSVRowToArray($la,',','"'); + $lfieldorders =str_getcsv($labelsarray[0],',','"'); + $lfieldcontents=str_getcsv($la,',','"'); if ($count==0) {$count++; continue;} // Combine into one array with keys and values since its easier to handle @@ -2815,11 +2813,11 @@ function CSVImportSurvey($sFullFilePath,$iDesiredSurveyId=NULL,$bTranslateLinks= if (isset($grouparray) && $grouparray) { // do GROUPS - $gafieldorders=convertCSVRowToArray($grouparray[0],',','"'); + $gafieldorders=str_getcsv($grouparray[0],',','"'); unset($grouparray[0]); foreach ($grouparray as $ga) { - $gacfieldcontents=convertCSVRowToArray($ga,',','"'); + $gacfieldcontents=str_getcsv($ga,',','"'); $grouprowdata=array_combine($gafieldorders,$gacfieldcontents); //Now an additional integrity check if there are any groups not belonging into this survey @@ -2867,11 +2865,11 @@ function CSVImportSurvey($sFullFilePath,$iDesiredSurveyId=NULL,$bTranslateLinks= // Import questions if (isset($questionarray) && $questionarray) { - $qafieldorders=convertCSVRowToArray($questionarray[0],',','"'); + $qafieldorders=str_getcsv($questionarray[0],',','"'); unset($questionarray[0]); foreach ($questionarray as $qa) { - $qacfieldcontents=convertCSVRowToArray($qa,',','"'); + $qacfieldcontents=str_getcsv($qa,',','"'); $questionrowdata=array_combine($qafieldorders,$qacfieldcontents); $questionrowdata=array_map('convertCSVReturnToReturn', $questionrowdata); $questionrowdata["type"]=strtoupper($questionrowdata["type"]); @@ -2961,7 +2959,7 @@ function CSVImportSurvey($sFullFilePath,$iDesiredSurveyId=NULL,$bTranslateLinks= } if (!$oQuestion->save()) { - // safeDie($clang->gT("Error while saving: "). print_r($oQuestion->errors, true)); + // safeDie($clang->gT("Error while saving: "). print_r($oQuestion->errors, true)); // // In PHP 5.2.10 a bug is triggered that resets the foreach loop when inserting a record // Problem is that it is the default PHP version on Ubuntu 12.04 LTS (which is currently very common in use) @@ -3044,12 +3042,12 @@ function CSVImportSurvey($sFullFilePath,$iDesiredSurveyId=NULL,$bTranslateLinks= //Do answers if (isset($answerarray) && $answerarray) { - $answerfieldnames = convertCSVRowToArray($answerarray[0],',','"'); + $answerfieldnames = str_getcsv($answerarray[0],',','"'); unset($answerarray[0]); foreach ($answerarray as $aa) { - $answerfieldcontents = convertCSVRowToArray($aa,',','"'); + $answerfieldcontents = str_getcsv($aa,',','"'); $answerrowdata = array_combine($answerfieldnames,$answerfieldcontents); if (in_array($answerrowdata['qid'],$aIgnoredAnswers)) { @@ -3153,9 +3151,9 @@ function CSVImportSurvey($sFullFilePath,$iDesiredSurveyId=NULL,$bTranslateLinks= } if (!$question->save()) { - // safeDie($clang->gT("Error while saving: "). print_r($question->errors, true)); + // safeDie($clang->gT("Error while saving: "). print_r($question->errors, true)); // - // In PHP 5.2.10 a bug is triggered that resets the foreach loop when inserting a record + // In PHP 5.2.10 and some later versions a bug is triggered that resets the foreach loop when inserting a record // Problem is that it is the default PHP version on Ubuntu 12.04 LTS (which is currently very common in use) // For this reason we ignore insertion errors (because it is most likely a duplicate) // and continue with the next one @@ -3217,10 +3215,10 @@ function CSVImportSurvey($sFullFilePath,$iDesiredSurveyId=NULL,$bTranslateLinks= //We've built two arrays along the way - one containing the old SID, GID and QIDs - and their NEW equivalents //and one containing the old 'extended fieldname' and its new equivalent. These are needed to import conditions and question_attributes. if (isset($question_attributesarray) && $question_attributesarray) {//ONLY DO THIS IF THERE ARE QUESTION_ATTRIBUES - $fieldorders =convertCSVRowToArray($question_attributesarray[0],',','"'); + $fieldorders =str_getcsv($question_attributesarray[0],',','"'); unset($question_attributesarray[0]); foreach ($question_attributesarray as $qar) { - $fieldcontents=convertCSVRowToArray($qar,',','"'); + $fieldcontents=str_getcsv($qar,',','"'); $qarowdata=array_combine($fieldorders,$fieldcontents); $newqid=""; $qarowdata["qid"]=$aQIDReplacements[$qarowdata["qid"]]; @@ -3231,11 +3229,11 @@ function CSVImportSurvey($sFullFilePath,$iDesiredSurveyId=NULL,$bTranslateLinks= } if (isset($assessmentsarray) && $assessmentsarray) {//ONLY DO THIS IF THERE ARE QUESTION_ATTRIBUTES - $fieldorders=convertCSVRowToArray($assessmentsarray[0],',','"'); + $fieldorders=str_getcsv($assessmentsarray[0],',','"'); unset($assessmentsarray[0]); foreach ($assessmentsarray as $qar) { - $fieldcontents=convertCSVRowToArray($qar,',','"'); + $fieldcontents=str_getcsv($qar,',','"'); $asrowdata=array_combine($fieldorders,$fieldcontents); if (isset($asrowdata['link'])) { @@ -3257,19 +3255,12 @@ function CSVImportSurvey($sFullFilePath,$iDesiredSurveyId=NULL,$bTranslateLinks= } if (isset($quotaarray) && $quotaarray) {//ONLY DO THIS IF THERE ARE QUOTAS - $fieldorders=convertCSVRowToArray($quotaarray[0],',','"'); + $fieldorders=str_getcsv($quotaarray[0],',','"'); unset($quotaarray[0]); foreach ($quotaarray as $qar) { - $fieldcontents=convertCSVRowToArray($qar,',','"'); - + $fieldcontents=str_getcsv($qar,',','"'); $asrowdata=array_combine($fieldorders,$fieldcontents); - - $iOldSID=$asrowdata["sid"]; - foreach ($substitutions as $subs) { - if ($iOldSID==$subs[0]) {$iNewSID=$subs[3];} - } - $asrowdata["sid"]=$iNewSID; $oldid = $asrowdata["id"]; unset($asrowdata["id"]); @@ -3283,27 +3274,20 @@ function CSVImportSurvey($sFullFilePath,$iDesiredSurveyId=NULL,$bTranslateLinks= $count=0; foreach ($quotamembersarray as $qar) { - $fieldorders =convertCSVRowToArray($quotamembersarray[0],',','"'); - $fieldcontents=convertCSVRowToArray($qar,',','"'); + $fieldorders =str_getcsv($quotamembersarray[0],',','"'); + $fieldcontents=str_getcsv($qar,',','"'); if ($count==0) {$count++; continue;} $asrowdata=array_combine($fieldorders,$fieldcontents); $iOldSID=$asrowdata["sid"]; - $newqid=""; - $newquotaid=""; $oldqid=$asrowdata['qid']; $oldquotaid=$asrowdata['quota_id']; - foreach ($substitutions as $subs) { - if ($iOldSID==$subs[0]) {$iNewSID=$subs[3];} - if ($oldqid==$subs[2]) {$newqid=$subs[5];} - } - $newquotaid=$aQuotaReplacements[$oldquotaid]; $asrowdata["sid"]=$iNewSID; - $asrowdata["qid"]=$newqid; + $asrowdata["qid"]=$aQIDReplacements[$oldqid]; $asrowdata["quota_id"]=$newquotaid; unset($asrowdata["id"]); @@ -3316,8 +3300,8 @@ function CSVImportSurvey($sFullFilePath,$iDesiredSurveyId=NULL,$bTranslateLinks= $count=0; foreach ($quotalsarray as $qar) { - $fieldorders =convertCSVRowToArray($quotalsarray[0],',','"'); - $fieldcontents=convertCSVRowToArray($qar,',','"'); + $fieldorders =str_getcsv($quotalsarray[0],',','"'); + $fieldcontents=str_getcsv($qar,',','"'); if ($count==0) {$count++; continue;} $asrowdata=array_combine($fieldorders,$fieldcontents); @@ -3354,12 +3338,12 @@ function CSVImportSurvey($sFullFilePath,$iDesiredSurveyId=NULL,$bTranslateLinks= // Do conditions if (isset($conditionsarray) && $conditionsarray) {//ONLY DO THIS IF THERE ARE CONDITIONS! - $fieldorders =convertCSVRowToArray($conditionsarray[0],',','"'); + $fieldorders =str_getcsv($conditionsarray[0],',','"'); unset($conditionsarray[0]); // Exception for conditions based on attributes $aQIDReplacements[0]=0; foreach ($conditionsarray as $car) { - $fieldcontents=convertCSVRowToArray($car,',','"'); + $fieldcontents=str_getcsv($car,',','"'); $conditionrowdata=array_combine($fieldorders,$fieldcontents); unset($conditionrowdata["cid"]); @@ -3510,7 +3494,7 @@ function XMLImportSurvey($sFullFilePath,$sXMLdata=NULL,$sNewSurveyName=NULL,$iDe if ($sXMLdata == NULL) { $sXMLdata = file_get_contents($sFullFilePath); - } + } $xml = @simplexml_load_string($sXMLdata,'SimpleXMLElement',LIBXML_NONET); if (!$xml || $xml->LimeSurveyDocType!='Survey') @@ -3598,9 +3582,9 @@ function XMLImportSurvey($sFullFilePath,$sXMLdata=NULL,$sNewSurveyName=NULL,$iDe $insertdata['googleanalyticsapikey']=$insertdata['googleAnalyticsAPIKey']; unset($insertdata['googleAnalyticsAPIKey']); } - if (isset($insertdata['allowjumps'])) + if (isset($insertdata['allowjumps'])) { - $insertdata['questionindex']= ($insertdata['allowjumps']=="Y")?1:0; + $insertdata['questionindex']= ($insertdata['allowjumps']=="Y")?1:0; unset($insertdata['allowjumps']); } /* Remove unknow column */ @@ -3613,7 +3597,7 @@ function XMLImportSurvey($sFullFilePath,$sXMLdata=NULL,$sNewSurveyName=NULL,$iDe { $results['importwarnings'][]=sprintf($clang->gT("This survey setting has not been imported: %s => %s"),$key,$value); } - + $iNewSID = $results['newsid'] = Survey::model()->insertNewSurvey($insertdata) or safeDie($clang->gT("Error").": Failed to insert data [1]
        "); $results['surveys']++; @@ -3655,7 +3639,7 @@ function XMLImportSurvey($sFullFilePath,$sXMLdata=NULL,$sNewSurveyName=NULL,$iDe { unset($insertdata['surveyls_attributecaptions']); } - + $result = SurveyLanguageSetting::model()->insertNewSurvey($insertdata) or safeDie($clang->gT("Error").": Failed to insert data [2]
        "); @@ -3741,7 +3725,7 @@ function XMLImportSurvey($sFullFilePath,$sXMLdata=NULL,$sNewSurveyName=NULL,$iDe if ($insertdata) XSSFilterArray($insertdata); - if (!$bConvertInvalidQuestionCodes) + if (!$bConvertInvalidQuestionCodes) { $sScenario='archiveimport'; } @@ -3787,7 +3771,7 @@ function XMLImportSurvey($sFullFilePath,$sXMLdata=NULL,$sNewSurveyName=NULL,$iDe } if (!$oQuestion->save()) { - // safeDie($clang->gT("Error while saving: "). print_r($oQuestion->errors, true)); + // safeDie($clang->gT("Error while saving: "). print_r($oQuestion->errors, true)); // // In PHP 5.2.10 a bug is triggered that resets the foreach loop when inserting a record // Problem is that it is the default PHP version on Ubuntu 12.04 LTS (which is currently very common in use) @@ -3851,7 +3835,7 @@ function XMLImportSurvey($sFullFilePath,$sXMLdata=NULL,$sNewSurveyName=NULL,$iDe XSSFilterArray($insertdata); - if (!$bConvertInvalidQuestionCodes) + if (!$bConvertInvalidQuestionCodes) { $sScenario='archiveimport'; } @@ -3895,7 +3879,7 @@ function XMLImportSurvey($sFullFilePath,$sXMLdata=NULL,$sNewSurveyName=NULL,$iDe } if (!$question->save()) { - // safeDie($clang->gT("Error while saving: "). print_r($question->errors, true)); + // safeDie($clang->gT("Error while saving: "). print_r($question->errors, true)); // // In PHP 5.2.10 a bug is triggered that resets the foreach loop when inserting a record // Problem is that it is the default PHP version on Ubuntu 12.04 LTS (which is currently very common in use) @@ -3946,7 +3930,7 @@ function XMLImportSurvey($sFullFilePath,$sXMLdata=NULL,$sNewSurveyName=NULL,$iDe } if ($insertdata) XSSFilterArray($insertdata); - + if (Answer::model()->insertRecords($insertdata)) { $results['answers']++; @@ -3965,17 +3949,17 @@ function XMLImportSurvey($sFullFilePath,$sXMLdata=NULL,$sNewSurveyName=NULL,$iDe { $insertdata[(string)$key]=(string)$value; } - + // take care of renaming of date min/max adv. attributes fields if ($iDBVersion < 170) { if (isset($insertdata['attribute'])) { - if ($insertdata['attribute']=='dropdown_dates_year_max') + if ($insertdata['attribute']=='dropdown_dates_year_max') { - $insertdata['attribute']='date_max'; + $insertdata['attribute']='date_max'; } - if ($insertdata['attribute']=='dropdown_dates_year_min') + if ($insertdata['attribute']=='dropdown_dates_year_min') { $insertdata['attribute']='date_min'; } @@ -4203,7 +4187,7 @@ function XMLImportSurvey($sFullFilePath,$sXMLdata=NULL,$sNewSurveyName=NULL,$iDe $insertdata['sid']=$iNewSID; // remap the survey id if (isset($insertdata['targetsqid']) && $insertdata['targetsqid']!='') { - $insertdata['targetsqid'] =$aSQIDReplacements[(int)$insertdata['targetsqid']]; // remap the qid + $insertdata['targetsqid'] =$aQIDReplacements[(int)$insertdata['targetsqid']]; // remap the qid } if (isset($insertdata['targetqid']) && $insertdata['targetqid']!='') { @@ -4215,7 +4199,7 @@ function XMLImportSurvey($sFullFilePath,$sXMLdata=NULL,$sNewSurveyName=NULL,$iDe } } - // Set survey rights + // Set survey permissions Permission::model()->giveAllSurveyPermissions(Yii::app()->session['loginID'],$iNewSID); $aOldNewFieldmap=reverseTranslateFieldNames($iOldSID,$iNewSID,$aGIDReplacements,$aQIDReplacements); $results['FieldReMap']=$aOldNewFieldmap; @@ -4282,7 +4266,7 @@ function XMLImportTokens($sFullFilePath,$iSurveyID,$sCreateMissingAttributeField $results['tokens']=0; return $results; } - + $results['tokens']=0; $results['tokenfieldscreated']=0; @@ -4322,13 +4306,16 @@ function XMLImportTokens($sFullFilePath,$iSurveyID,$sCreateMissingAttributeField $token = Token::create($iSurveyID); $token->setAttributes($insertdata, false); if (!$token->save()) - { + { $results['warnings'][]=$clang->gT("Skipped tokens entry:").' '. implode('. ',$token->errors['token']); }; $results['tokens']++; } switchMSSQLIdentityInsert('tokens_'.$iSurveyID,false); - + if (Yii::app()->db->getDriverName() == 'pgsql') + { + try {Yii::app()->db->createCommand("SELECT pg_catalog.setval(pg_get_serial_sequence('{{tokens_".$iSurveyID."}}', 'tid'), (SELECT MAX(tid) FROM {{tokens_".$iSurveyID."}}))")->execute();} catch(Exception $oException){}; + } return $results; } @@ -4379,7 +4366,7 @@ function XMLImportResponses($sFullFilePath,$iSurveyID,$aFieldReMap=array()) $aInsertData[$sFieldname]=''; } } - + $result = SurveyDynamic::model($iSurveyID)->insertRecords($aInsertData) or safeDie($clang->gT("Error").": Failed to insert data[16]
        "); $results['responses']++; } @@ -4389,7 +4376,10 @@ function XMLImportResponses($sFullFilePath,$iSurveyID,$aFieldReMap=array()) } switchMSSQLIdentityInsert('survey_'.$iSurveyID,false); - + if (Yii::app()->db->getDriverName() == 'pgsql') + { + try {Yii::app()->db->createCommand("SELECT pg_catalog.setval(pg_get_serial_sequence('{{survey_".$iSurveyID."}}', 'id'), (SELECT MAX(id) FROM {{survey_".$iSurveyID."}}))")->execute();} catch(Exception $oException){}; + } return $results; } @@ -4510,6 +4500,7 @@ function CSVImportResponses($sFullFilePath,$iSurveyId,$aOptions=array()) $aResponsesError=array(); $aExistingsId=array(); + $iMaxId=0; // If we set the id, keep the max // Some specific header (with options) $iIdKey=array_search('id', $aCsvHeader); // the id is allways needed and used a lot if(is_int($iIdKey)){unset($aKeyForFieldNames['id']);} @@ -4565,6 +4556,7 @@ function CSVImportResponses($sFullFilePath,$iSurveyId,$aOptions=array()) if(!$bExistingsId) // If not exist : allways import it { $oSurvey->id=$aResponses[$iIdKey]; + $iMaxId=($aResponses[$iIdKey]>$iMaxId)?$aResponses[$iIdKey]:$iMaxId; } elseif($aOptions['sExistingId']=='replace' || $aOptions['sExistingId']=='replaceanswers')// Set it depending with some options { @@ -4578,7 +4570,7 @@ function CSVImportResponses($sFullFilePath,$iSurveyId,$aOptions=array()) elseif(is_int($iSubmitdateKey)) { if( $aResponses[$iSubmitdateKey]=='{question_not_shown}' || trim($aResponses[$iSubmitdateKey]=='')){ - $oSurvey->submitdate = new CDbExpression('NULL'); + $oSurvey->submitdate = new CDbExpression('NULL'); }else{ // Maybe control valid date : see http://php.net/manual/en/function.checkdate.php#78362 for example $oSurvey->submitdate=$aResponses[$iSubmitdateKey]; @@ -4587,7 +4579,7 @@ function CSVImportResponses($sFullFilePath,$iSurveyId,$aOptions=array()) foreach($aKeyForFieldNames as $sFieldName=>$iFieldKey) { if( $aResponses[$iFieldKey]=='{question_not_shown}'){ - $oSurvey->$sFieldName = new CDbExpression('NULL'); + $oSurvey->$sFieldName = new CDbExpression('NULL'); }else{ $sResponse=str_replace(array("{quote}","{tab}","{cr}","{newline}","{lbrace}"),array("\"","\t","\r","\n","{"),$aResponses[$iFieldKey]); $oSurvey->$sFieldName = $sResponse; @@ -4597,6 +4589,11 @@ function CSVImportResponses($sFullFilePath,$iSurveyId,$aOptions=array()) $oTransaction = Yii::app()->db->beginTransaction(); try { + if (isset($oSurvey->id) && !is_null($oSurvey->id)) + { + switchMSSQLIdentityInsert('survey_'.$iSurveyId, true); + $bSwitched=true; + } if($oSurvey->save()) { $oTransaction->commit(); @@ -4614,6 +4611,10 @@ function CSVImportResponses($sFullFilePath,$iSurveyId,$aOptions=array()) $oTransaction->rollBack(); $aResponsesError[]=$aResponses[$iIdReponsesKey]; } + if (isset($bSwitched) && $bSwitched==true){ + switchMSSQLIdentityInsert('survey_'.$iSurveyId, false); + $bSwitched=false; + } } catch(Exception $oException) { @@ -4626,6 +4627,19 @@ function CSVImportResponses($sFullFilePath,$iSurveyId,$aOptions=array()) } } + // Fix max next id (for pgsql) + // mysql dot need fix, but what for mssql ? + // Do a model function for this can be a good idea (see activate_helper/activateSurvey) + if (Yii::app()->db->driverName=='pgsql') + { + $sSequenceName= Yii::app()->db->getSchema()->getTable("{{survey_{$iSurveyId}}}")->sequenceName; + $iActualSerial=Yii::app()->db->createCommand("SELECT last_value FROM {$sSequenceName}")->queryScalar(); + if($iActualSerial<$iMaxId) + { + $sQuery = "SELECT setval(pg_get_serial_sequence('{{survey_{$iSurveyId}}}', 'id'),{$iMaxId},false);"; + $result = @Yii::app()->db->createCommand($sQuery)->execute(); + } + } // End of import // Construction of returned information @@ -4674,9 +4688,9 @@ function XMLImportTimings($sFullFilePath,$iSurveyID,$aFieldReMap=array()) } $results['languages']=count($aLanguagesSupported); // Return if there are no timing records to import - if (!isset($xml->timings->rows)) + if (!isset($xml->timings->rows)) { - return $results; + return $results; } switchMSSQLIdentityInsert('survey_'.$iSurveyID.'_timings',true); foreach ($xml->timings->rows->row as $row) @@ -4850,7 +4864,7 @@ function TSVImportSurvey($sFullFilePath) $surveyinfo['active']='N'; // unset($surveyinfo['datecreated']); $iNewSID = Survey::model()->insertNewSurvey($surveyinfo) ; //or safeDie($clang->gT("Error").": Failed to insert survey
        "); - if ($iNewSID==false) + if (!$iNewSID) { $results['error'] = Survey::model()->getErrors(); $results['bFailed'] = true; @@ -4915,7 +4929,7 @@ function TSVImportSurvey($sFullFilePath) $glang = (!empty($row['language']) ? $row['language'] : $baselang); // when a multi-lang tsv-file without information on the group id/number (old style) is imported, // we make up this information by giving a number 0..[numberofgroups-1] per language. - // the number and order of groups per language should be the same, so we can also import these files + // the number and order of groups per language should be the same, so we can also import these files if ($lastglang!=$glang) //reset counter on language change { $iGroupcounter=0; @@ -4936,7 +4950,7 @@ function TSVImportSurvey($sFullFilePath) $insertdata['group_order'] = $ginfo[$sGroupseq]['group_order']; } else - { + { $insertdata['group_order'] = $gseq; } $newgid = QuestionGroup::model()->insertRecords($insertdata); @@ -4969,7 +4983,7 @@ function TSVImportSurvey($sFullFilePath) $insertdata['help'] = (isset($row['help']) ? $row['help'] : ''); $insertdata['language'] = (isset($row['language']) ? $row['language'] : $baselang); $insertdata['mandatory'] = (isset($row['mandatory']) ? $row['mandatory'] : ''); - $insertdata['other'] = (isset($row['other']) ? $row['other'] : 'N'); + $lastother = $insertdata['other'] = (isset($row['other']) ? $row['other'] : 'N'); // Keep trace of other settings for sub question $insertdata['same_default'] = (isset($row['same_default']) ? $row['same_default'] : 0); $insertdata['parent_qid'] = 0; @@ -5030,7 +5044,7 @@ function TSVImportSurvey($sFullFilePath) { $insertdata['language'] = (isset($row['language']) ? $row['language'] : $baselang); } - else + else { $insertdata['language'] = NULL; } @@ -5062,17 +5076,17 @@ function TSVImportSurvey($sFullFilePath) $results['defaultvalues']++; } break; - case 'SQ': $sqname = (isset($row['name']) ? $row['name'] : 'SQ' . $sqseq); if ($qtype == 'O' || $qtype == '|') { ; // these are fake rows to show naming of comment and filecount fields } - elseif ($sqname == 'other' && ($qtype == '!' || $qtype == 'L')) + elseif ($sqname == 'other' && $lastother=="Y") // If last question have other to Y : it's not a real SQ row + { + if($qtype=="!" || $qtype=="L") { - // only want to set default value for 'other' in these cases - not a real SQ row - // TODO - this isn't working + // only used to set default value for 'other' in these cases if (isset($row['default'])) { $insertdata=array(); @@ -5081,12 +5095,14 @@ function TSVImportSurvey($sFullFilePath) $insertdata['language'] = (isset($row['language']) ? $row['language'] : $baselang); $insertdata['defaultvalue'] = $row['default']; $result = DefaultValue::model()->insertRecords($insertdata); - if(!$result){ + if(!$result) + { $results['importwarnings'][] = $clang->gT("Warning")." : ".$clang->gT("Failed to insert default value").". ".$clang->gT("Text file row number ").$rownumber; break; } $results['defaultvalues']++; } + } } else { @@ -5179,6 +5195,6 @@ function TSVImportSurvey($sFullFilePath) LimeExpressionManager::RevertUpgradeConditionsToRelevance($iNewSID); LimeExpressionManager::UpgradeConditionsToRelevance($iNewSID); } - + return $results; } diff --git a/sources/application/helpers/admin/statistics_helper.php b/sources/application/helpers/admin/statistics_helper.php index 0543090..3cc6caf 100644 --- a/sources/application/helpers/admin/statistics_helper.php +++ b/sources/application/helpers/admin/statistics_helper.php @@ -46,7 +46,7 @@ function createChart($iQuestionID, $iSurveyID, $type=null, $lbl, $gdata, $grawda $language = $oLanguage->langcode; $clang = $oLanguage; $cachefilename = ""; - + /* Set the fonts for the chart */ if ($chartfontfile=='auto') { @@ -200,12 +200,13 @@ function createChart($iQuestionID, $iSurveyID, $type=null, $lbl, $gdata, $grawda if ($legendsize[1]<320) $gheight=420; else $gheight=$legendsize[1]+100; $graph = new pChart(690+$legendsize[0],$gheight); + $graph->drawFilledRectangle(0,0,690+$legendsize[0],$gheight,254,254,254,false); $graph->loadColorPalette($homedir.DIRECTORY_SEPARATOR.'styles'.DIRECTORY_SEPARATOR.$admintheme.DIRECTORY_SEPARATOR.'limesurvey.pal'); $graph->setFontProperties($rootdir.DIRECTORY_SEPARATOR.'fonts'.DIRECTORY_SEPARATOR.$chartfontfile,$chartfontsize); $graph->setGraphArea(50,30,500,$gheight-60); $graph->drawFilledRoundedRectangle(7,7,523+$legendsize[0],$gheight-7,5,254,255,254); $graph->drawRoundedRectangle(5,5,525+$legendsize[0],$gheight-5,5,230,230,230); - $graph->drawGraphArea(255,255,255,TRUE); + $graph->drawGraphArea(254,254,254,TRUE); $graph->drawScale($DataSet->GetData(),$DataSet->GetDataDescription(),SCALE_START0,150,150,150,TRUE,90,0,TRUE,5,false); $graph->drawGrid(4,TRUE,230,230,230,50); // Draw the 0 line @@ -217,7 +218,7 @@ function createChart($iQuestionID, $iSurveyID, $type=null, $lbl, $gdata, $grawda //$Test->setLabel($DataSet->GetData(),$DataSet->GetDataDescription(),"Serie4","1","Important point!"); // Finish the graph $graph->setFontProperties($rootdir.DIRECTORY_SEPARATOR.'fonts'.DIRECTORY_SEPARATOR.$chartfontfile, $chartfontsize); - $graph->drawLegend(510,30,$DataSet->GetDataDescription(),255,255,255); + $graph->drawLegend(510,30,$DataSet->GetDataDescription(),250,250,250); $cache->WriteToCache("graph".$iSurveyID.$language.$iQuestionID,$DataSet->GetData(),$graph); $cachefilename=basename($cache->GetFileFromCache("graph".$iSurveyID.$language.$iQuestionID,$DataSet->GetData())); @@ -292,6 +293,7 @@ function createChart($iQuestionID, $iSurveyID, $type=null, $lbl, $gdata, $grawda $gheight=ceil($gheight); $graph = new pChart(690,$gheight); + $graph->drawFilledRectangle(0,0,690,$gheight,254,254,254,false); $graph->loadColorPalette($homedir.'/styles/'.$admintheme.'/limesurvey.pal'); $graph->drawFilledRoundedRectangle(7,7,687,$gheight-3,5,254,255,254); $graph->drawRoundedRectangle(5,5,689,$gheight-1,5,230,230,230); @@ -2362,7 +2364,7 @@ class statistics_helper { $this->sheet->writeNumber($this->xlsRow,1,$grawdata[$i]); $this->sheet->writeNumber($this->xlsRow,2,$percentage/100, $this->xlsPercents); if ($aggregatedPercentage !== 'na') { - $this->sheet->writeNumber($this->xlsRow,3,$percentage/100, $this->xlsPercents); + $this->sheet->writeNumber($this->xlsRow,3,$aggregatedPercentage/100, $this->xlsPercents); } break; @@ -3102,9 +3104,9 @@ class statistics_helper { elseif (!empty($newsql)) {$sql = $newsql;} - if (!isset($sql) || !$sql) + if (!isset($sql) || !$sql) { - $sql= null; + $sql= null; } //only continue if we have something to output @@ -3245,7 +3247,7 @@ class statistics_helper { static $recordCount = 0; static $field = null; static $allRows = null; - + if ($surveyid !== $sid || $fieldname !== $field) { //get data $query =" FROM {{survey_$surveyid}} WHERE ".Yii::app()->db->quoteColumnName($fieldname)." IS NOT null"; @@ -3292,15 +3294,15 @@ class statistics_helper { // Need at least 2 records if ($recordCount<2) return; break; - + case 0: return $recordCount; - + default: return; break; - } - + } + $q1 = $quartile/4 * ($recordCount+1); $row = $q1-1; // -1 since we start counting at 0 if ($q1 === (int) $q1) { @@ -3326,7 +3328,7 @@ class statistics_helper { //filter incomplete answers if set if (incompleteAnsFilterState() == "incomplete") {$search['condition'] .= " AND submitdate is null";} elseif (incompleteAnsFilterState() == "complete") {$search['condition'] .= " AND submitdate is not null";} - + //Look for any selects/filters set in the original statistics query, and apply them to the column listing if (isset(Yii::app()->session['statistics_selects_'.$surveyid]) && is_array(Yii::app()->session['statistics_selects_'.$surveyid])) { @@ -3355,7 +3357,7 @@ class statistics_helper { $output[]=array("id"=>$row['id'], "value"=>$row[$column]); } return $output; - } - - + } + + } diff --git a/sources/application/helpers/admin/token_helper.php b/sources/application/helpers/admin/token_helper.php index f508dbb..4a2187e 100644 --- a/sources/application/helpers/admin/token_helper.php +++ b/sources/application/helpers/admin/token_helper.php @@ -46,6 +46,34 @@ function createTokenTable($iSurveyID, $aAttributeFields=array()) { $fields[$sAttributeField]='string'; } + + if (Yii::app()->db->driverName=='mssql' || Yii::app()->db->driverName=='sqlsrv' || Yii::app()->db->driverName=='dblib') + { + $fields = array( + 'tid' => 'pk', + 'participant_id' => 'varchar(50)', + 'firstname' => 'nvarchar(40)', + 'lastname' => 'nvarchar(40)', + 'email' => 'ntext', + 'emailstatus' => 'ntext', + 'token' => 'varchar(35)', + 'language' => 'varchar(25)', + 'blacklisted' => 'varchar(17)', + 'sent' => "varchar(17) DEFAULT 'N'", + 'remindersent' => "varchar(17) DEFAULT 'N'", + 'remindercount' => 'integer DEFAULT 0', + 'completed' => "varchar(17) DEFAULT 'N'", + 'usesleft' => 'integer DEFAULT 1', + 'validfrom' => 'datetime', + 'validuntil' => 'datetime', + 'mpid' => 'integer' + ); + foreach ($aAttributeFields as $sAttributeField) + { + $fields[$sAttributeField]='nvarchar(255)'; + } + } + try{ $sTableName="{{tokens_".intval($iSurveyID)."}}"; createTable($sTableName, $fields); @@ -84,14 +112,14 @@ function emailTokens($iSurveyID,$aResultTokens,$sType) $bHtml = true; else $bHtml = false; - - $attributes = array_keys(getTokenFieldsAndNames($iSurveyID)); + + $attributes = array_keys(getTokenFieldsAndNames($iSurveyID)); $oSurveyLocale=SurveyLanguageSetting::model()->findAllByAttributes(array('surveyls_survey_id' => $iSurveyID)); $oTokens = Token::model($iSurveyID); $aSurveyLangs = $oSurvey->additionalLanguages; array_unshift($aSurveyLangs, $oSurvey->language); - - //Convert result to associative array to minimize SurveyLocale access attempts + + //Convert result to associative array to minimize SurveyLocale access attempts foreach($oSurveyLocale as $rows) { $oTempObject=array(); @@ -103,7 +131,7 @@ function emailTokens($iSurveyID,$aResultTokens,$sType) } foreach ($aResultTokens as $aTokenRow) - { + { //Select language $aTokenRow['language'] = trim($aTokenRow['language']); $found = array_search($aTokenRow['language'], $aSurveyLangs); @@ -112,7 +140,7 @@ function emailTokens($iSurveyID,$aResultTokens,$sType) $aTokenRow['language'] = $oSurvey['language']; } $sTokenLanguage = $aTokenRow['language']; - + //Build recipient $to = array(); @@ -121,34 +149,34 @@ function emailTokens($iSurveyID,$aResultTokens,$sType) { $to[] = ($aTokenRow['firstname'] . " " . $aTokenRow['lastname'] . " <{$sEmailaddress}>"); } - - //Populate attributes + + //Populate attributes $fieldsarray["{SURVEYNAME}"] = $aSurveyLocaleData[$sTokenLanguage]['surveyls_title']; if ($fieldsarray["{SURVEYNAME}"] == '') $fieldsarray["{SURVEYNAME}"] = $aSurveyLocaleData[$oSurvey['language']]['surveyls_title']; - + $fieldsarray["{SURVEYDESCRIPTION}"] = $aSurveyLocaleData[$sTokenLanguage]['surveyls_description']; if ($fieldsarray["{SURVEYDESCRIPTION}"] == '') - $fieldsarray["{SURVEYDESCRIPTION}"] = $aSurveyLocaleData[$oSurvey['language']]['surveyls_description']; - + $fieldsarray["{SURVEYDESCRIPTION}"] = $aSurveyLocaleData[$oSurvey['language']]['surveyls_description']; + $fieldsarray["{ADMINNAME}"] = $oSurvey['admin']; $fieldsarray["{ADMINEMAIL}"] = $oSurvey['adminemail']; $from = $fieldsarray["{ADMINEMAIL}"]; if($from == '') - $from = Yii::app()->getConfig('siteadminemail'); - + $from = Yii::app()->getConfig('siteadminemail'); + foreach ($attributes as $attributefield) { $fieldsarray['{' . strtoupper($attributefield) . '}'] = $aTokenRow[$attributefield]; $fieldsarray['{TOKEN:'.strtoupper($attributefield).'}']=$aTokenRow[$attributefield]; } - + //create urls $fieldsarray["{OPTOUTURL}"] = Yii::app()->getController()->createAbsoluteUrl("/optout/tokens/langcode/" . trim($aTokenRow['language']) . "/surveyid/{$iSurveyID}/token/{$aTokenRow['token']}"); $fieldsarray["{OPTINURL}"] = Yii::app()->getController()->createAbsoluteUrl("/optin/tokens/langcode/" . trim($aTokenRow['language']) . "/surveyid/{$iSurveyID}/token/{$aTokenRow['token']}"); $fieldsarray["{SURVEYURL}"] = Yii::app()->getController()->createAbsoluteUrl("/survey/index/sid/{$iSurveyID}/token/{$aTokenRow['token']}/lang/" . trim($aTokenRow['language']) . "/"); - + if($bHtml) { foreach(array('OPTOUT', 'OPTIN', 'SURVEY') as $key) @@ -161,12 +189,12 @@ function emailTokens($iSurveyID,$aResultTokens,$sType) } } } - + //mail headers $customheaders = array('1' => "X-surveyid: " . $iSurveyID,'2' => "X-tokenid: " . $fieldsarray["{TOKEN}"]); - + global $maildebug; - + //choose appriopriate email message if($sType == 'invite') { @@ -178,7 +206,7 @@ function emailTokens($iSurveyID,$aResultTokens,$sType) $sSubject = $aSurveyLocaleData[$sTokenLanguage]['surveyls_email_remind_subj']; $sMessage = $aSurveyLocaleData[$sTokenLanguage]['surveyls_email_remind']; } - + $modsubject = Replacefields($sSubject, $fieldsarray); $modmessage = Replacefields($sMessage, $fieldsarray); @@ -188,45 +216,45 @@ function emailTokens($iSurveyID,$aResultTokens,$sType) $modmessage = str_replace("@@SURVEYURL@@", $barebone_link, $modmessage); } - - - + + + if (isset($aTokenRow['validfrom']) && trim($aTokenRow['validfrom']) != '' && convertDateTimeFormat($aTokenRow['validfrom'], 'Y-m-d H:i:s', 'U') * 1 > date('U') * 1) { $aResult[$aTokenRow['tid']] = array('name'=>$fieldsarray["{FIRSTNAME}"]." ".$fieldsarray["{LASTNAME}"], 'email'=>$fieldsarray["{EMAIL}"], 'status'=>'fail', 'error'=>'Token not valid yet'); - + } elseif (isset($aTokenRow['validuntil']) && trim($aTokenRow['validuntil']) != '' && convertDateTimeFormat($aTokenRow['validuntil'], 'Y-m-d H:i:s', 'U') * 1 < date('U') * 1) { $aResult[$aTokenRow['tid']] = array('name'=>$fieldsarray["{FIRSTNAME}"]." ".$fieldsarray["{LASTNAME}"], 'email'=>$fieldsarray["{EMAIL}"], 'status'=>'fail', - 'error'=>'Token not valid anymore'); + 'error'=>'Token not valid anymore'); } else - { + { if (SendEmailMessage($modmessage, $modsubject, $to, $from, Yii::app()->getConfig("sitename"), $bHtml, getBounceEmail($iSurveyID), null, $customheaders)) { $aResult[$aTokenRow['tid']] = array('name'=>$fieldsarray["{FIRSTNAME}"]." ".$fieldsarray["{LASTNAME}"], 'email'=>$fieldsarray["{EMAIL}"], 'status'=>'OK'); - + if($sType == 'invite') $oTokens->updateByPk($aTokenRow['tid'], array('sent' => dateShift(date("Y-m-d H:i:s"), "Y-m-d H:i", Yii::app()->getConfig("timeadjust")))); - - if($sType == 'remind') + + if($sType == 'remind') { $iRCount = $oTokens->findByPk($aTokenRow['tid'])->remindercount +1; $oTokens->updateByPk($aTokenRow['tid'], array('remindersent' => dateShift(date("Y-m-d H:i:s"), "Y-m-d H:i", Yii::app()->getConfig("timeadjust")))); $oTokens->updateByPk($aTokenRow['tid'],array('remindercount' => $iRCount)); } - + } - else + else { $aResult[$aTokenRow['tid']] = array('name'=>$fieldsarray["{FIRSTNAME}"]." ".$fieldsarray["{LASTNAME}"], @@ -235,7 +263,7 @@ function emailTokens($iSurveyID,$aResultTokens,$sType) 'error'=>$maildebug); } } - + unset($fieldsarray); } diff --git a/sources/application/helpers/common_helper.php b/sources/application/helpers/common_helper.php index 3439011..b996df3 100644 --- a/sources/application/helpers/common_helper.php +++ b/sources/application/helpers/common_helper.php @@ -12,22 +12,6 @@ */ Yii::import('application.helpers.sanitize_helper', true); -/** -* Simple function to sort the permissions by title -* -* @param mixed $aPermissionA Permission A to compare -* @param mixed $aPermissionB Permission B to compare -*/ -function comparePermission($aPermissionA,$aPermissionB) -{ - if($aPermissionA['title'] >$aPermissionB['title']) { - return 1; - } - else { - return -1; - } -} - /** * Translation helper function. * @param string $string @@ -69,7 +53,7 @@ function ngT($single, $plural, $number, $escapemode = 'html') function getQuestionTypeList($SelectedCode = "T", $ReturnType = "selector") { $publicurl = Yii::app()->getConfig('publicurl'); - + $qtypes = Question::typeList(); if ($ReturnType == "array") return $qtypes; @@ -151,12 +135,8 @@ function getSurveyList($returnarray=false, $surveyid=false) if(is_null($cached)) { $args = array('order'=>'surveyls_title'); - if (!Permission::model()->hasGlobalPermission('superadmin','read')) - { - $surveyidresult = Survey::model()->permission(Yii::app()->user->getId())->with(array('languagesettings'=>array('condition'=>'surveyls_language=language')))->findAll($args); - } else { - $surveyidresult = Survey::model()->with(array('languagesettings'=>array('condition'=>'surveyls_language=language')))->findAll($args); - } + $surveyidresult = Survey::model()->permission(Yii::app()->user->getId())->with('defaultlanguage')->findAll($args); + $surveynames = array(); foreach ($surveyidresult as $result) @@ -1365,13 +1345,13 @@ function fixMovedQuestionConditions($qid,$oldgid,$newgid) //Function rewrites th */ function returnGlobal($stringname,$bRestrictToString=false) { - $urlParam=Yii::app()->request->getParam($stringname); + $urlParam=Yii::app()->request->getParam($stringname); if(is_null($urlParam) && $aCookies=Yii::app()->request->getCookies() && $stringname!='sid') { if(isset($aCookies[$stringname])) { $urlParam = $aCookies[$stringname]; - } + } } $bUrlParamIsArray=is_array($urlParam);// Needed to array map or if $bRestrictToString if (!is_null($urlParam) && $stringname!='' && (!$bUrlParamIsArray || !$bRestrictToString)) @@ -1465,8 +1445,8 @@ function getExtendedAnswer($iSurveyID, $sFieldCode, $sValue, $oLanguage) return false; // If it is a comment field there is nothing to convert here - if ($fields['aid']=='comment') return $sValue; - + if ($fields['aid']=='comment') return $sValue; + //Find out the question type $this_type = $fields['type']; switch($this_type) @@ -1613,16 +1593,16 @@ function getExtendedAnswer($iSurveyID, $sFieldCode, $sValue, $oLanguage) } /** -* Validate an email address - also supports IDN email addresses +* Validate an email address - also supports IDN email addresses * @returns True/false for valid/invalid -* +* * @param mixed $sEmailAddress Email address to check */ function validateEmailAddress($sEmailAddress){ require_once(APPPATH.'third_party/idna-convert/idna_convert.class.php'); $oIdnConverter = new idna_convert(); $sEmailAddress=$oIdnConverter->encode($sEmailAddress); - $bResult=filter_var($sEmailAddress, FILTER_VALIDATE_EMAIL); + $bResult=filter_var($sEmailAddress, FILTER_VALIDATE_EMAIL); if ($bResult!==false) { return true; @@ -1630,6 +1610,29 @@ function validateEmailAddress($sEmailAddress){ return false; } +/** +* Validate an list of email addresses - either as array or as semicolon-limited text +* @returns List with valid email addresses - invalid email addresses are filtered - false if none of the email addresses are valid +* +* @param mixed $sEmailAddresses Email address to check +*/ +function validateEmailAddresses($aEmailAddressList){ + $aOutList=false; + if (!is_array($aEmailAddressList)) + { + $aEmailAddressList=explode(';',$aEmailAddressList); + } + foreach ($aEmailAddressList as $sEmailAddress) + { + $sEmailAddress= trim($sEmailAddress); + if (validateEmailAddress($sEmailAddress)){ + $aOutList=$sEmailAddress; + } + } + return $aOutList; +} + + function validateTemplateDir($sTemplateName) { $usertemplaterootdir = Yii::app()->getConfig('usertemplaterootdir'); @@ -1718,7 +1721,7 @@ function validateTemplateDir($sTemplateName) case ";": //ARRAY (Multi Flex) (Text) case ":": //ARRAY (Multi Flex) (Numbers) $result = Question::model()->getQuestionsForStatistics('title, question', "parent_qid=$flt[qid] AND language = '{$sLanguage}' AND scale_id = 0", 'question_order'); - + foreach($result as $row) { $fresult = Question::model()->getQuestionsForStatistics('title, question', "parent_qid=$flt[qid] AND language = '{$sLanguage}' AND scale_id = 1", 'question_order'); @@ -1793,8 +1796,7 @@ return $allfields; * @param string $sQuestionLanguage The language to use * @return array */ -function createFieldMap($surveyid, $style='short', $force_refresh=false, $questionid=false, $sLanguage) { - global $aDuplicateQIDs; +function createFieldMap($surveyid, $style='short', $force_refresh=false, $questionid=false, $sLanguage, &$aDuplicateQIDs=array()) { $sLanguage = sanitize_languagecode($sLanguage); $surveyid = sanitize_int($surveyid); @@ -1837,12 +1839,6 @@ function createFieldMap($surveyid, $style='short', $force_refresh=false, $questi $fieldmap["startlanguage"]['group_name']=""; } - // Select which question IDs have default values - $_aDefaultValues = DefaultValue::model()->with(array('question' => array('condition' => 'question.sid=' . $surveyid)))->findAll(); - $aDefaultValues = array(); - foreach ($_aDefaultValues as $k => $v) - $aDefaultValues[] = $v->qid; - //Check for any additional fields for this survey and create necessary fields (token and datestamp and ipaddr) $prow = Survey::model()->findByPk($surveyid)->getAttributes(); //Checked @@ -2376,7 +2372,7 @@ function createFieldMap($surveyid, $style='short', $force_refresh=false, $questi * @return bool */ function hasFileUploadQuestion($iSurveyID) { - $iCount = Question::model()->count( "sid=:surveyid AND parent_qid=0 AND type='|'", array(':surveyid' => $iSurveyID)); + $iCount = Question::model()->count( "sid=:surveyid AND parent_qid=0 AND type='|'", array(':surveyid' => $iSurveyID)); return $iCount>0 ; } @@ -3321,8 +3317,8 @@ function questionAttributes($returnByName=false) 'i18n'=>true, 'default'=>"", "help"=>$clang->gT('In the printable version replace the relevance equation with this explanation text.'), - "caption"=>$clang->gT("Relevance help for printable survey")); - + "caption"=>$clang->gT("Relevance help for printable survey")); + $qattributes["public_statistics"]=array( "types"=>"15ABCEFGHKLMNOPRWYZ!:*", 'category'=>$clang->gT('Statistics'), @@ -3415,7 +3411,7 @@ function questionAttributes($returnByName=false) 'category'=>$clang->gT('Slider'), 'sortorder'=>10, 'inputtype'=>'text', - "help"=>$clang->gT('Slider minimum value'), + "help"=>$clang->gT('You can use Expression manager, but this must be a number before showing the page else set to 0. If minimum value is not set, this value is used.'), "caption"=>$clang->gT('Slider minimum value')); $qattributes["slider_max"]=array( @@ -3423,7 +3419,7 @@ function questionAttributes($returnByName=false) 'category'=>$clang->gT('Slider'), 'sortorder'=>11, 'inputtype'=>'text', - "help"=>$clang->gT('Slider maximum value'), + "help"=>$clang->gT('You can use Expression manager, but this must be a number before showing the page else set to 100. If maximum value is not set, this value is used.'), "caption"=>$clang->gT('Slider maximum value')); $qattributes["slider_accuracy"]=array( @@ -3431,7 +3427,7 @@ function questionAttributes($returnByName=false) 'category'=>$clang->gT('Slider'), 'sortorder'=>30, 'inputtype'=>'text', - "help"=>$clang->gT('Slider accuracy'), + "help"=>$clang->gT('You can use Expression manager, but this must be a number before showing the page else set to 1.'), "caption"=>$clang->gT('Slider accuracy')); $qattributes["slider_default"]=array( @@ -3439,7 +3435,7 @@ function questionAttributes($returnByName=false) 'category'=>$clang->gT('Slider'), 'sortorder'=>50, 'inputtype'=>'text', - "help"=>$clang->gT('Slider start as this value (this will set the initial value).'), + "help"=>$clang->gT('Slider start as this value (this will set the initial value). You can use Expression manager, but this must be a number before showing the page.'), "caption"=>$clang->gT('Slider initial value')); $qattributes["slider_middlestart"]=array( @@ -3817,7 +3813,7 @@ function questionAttributes($returnByName=false) 'category'=>$clang->gT('Other'), 'sortorder'=>134, "inputtype"=>"text", - 'default'=>"png, gif, doc, odt", + 'default'=>"png, gif, jpg, doc, odt", "help"=>$clang->gT("Allowed file types in comma separated format. e.g. pdf,doc,odt"), "caption"=>$clang->gT("Allowed file types")); @@ -3883,14 +3879,6 @@ function categorySort($a, $b) return $result; } -// make sure the given string (which comes from a POST or GET variable) -// is safe to use in MySQL. This does nothing if gpc_magic_quotes is on. -function autoEscape($str) { - if (!get_magic_quotes_gpc()) { - return addslashes ($str); - } - return $str; -} // the opposite of the above: takes a POST or GET variable which may or // may not have been 'auto-quoted', and return the *unquoted* version. @@ -4106,7 +4094,7 @@ function SendEmailMessage($body, $subject, $to, $from, $sitename, $ishtml=false, { $mail->AddAttachment($attachment[0], $attachment[1]); } - else + else { // Or a string with the filename. $mail->AddAttachment($attachment); } @@ -4426,13 +4414,6 @@ function CSVEscape($sString) return '"' . str_replace('"','""', $sString) . '"'; } -function convertCSVRowToArray($string, $separator, $quotechar) -{ - $fields=preg_split('/' . $separator . '(?=([^"]*"[^"]*")*(?![^"]*"))/',trim($string)); - $fields=array_map('CSVUnquote',$fields); - return $fields; -} - function createPassword() { $aCharacters = "ABCDEGHJIKLMNOPQURSTUVWXYZabcdefhjmnpqrstuvwxyz23456789"; @@ -4769,7 +4750,7 @@ function translateLinks($sType, $iOldSurveyID, $iNewSurveyID, $sString) $replace = Yii::app()->getConfig("publicurl")."upload/labels/{$iNewSurveyID}/"; return preg_replace('#'.$pattern.'#', $replace, $sString); } - else // unkown type + else // unknown type { return $sString; } @@ -5256,10 +5237,10 @@ function updateCheck() $aUpdateVersions=getUpdateInfo(); $clang = Yii::app()->lang; - if (isset($aUpdateVersions['errorcode'])) + if (isset($aUpdateVersions['errorcode'])) { Yii::app()->setFlashMessage(sprintf($clang->gT("Error when checking for new version: %s"),$aUpdateVersions['errorcode']).'
        '.$aUpdateVersions['errorhtml'],'error'); - $aUpdateVersions=array(); + $aUpdateVersions=array(); } if (count($aUpdateVersions) && trim(Yii::app()->getConfig('buildnumber'))!='') { @@ -5276,28 +5257,28 @@ function updateCheck() case 'both': // Show first available update - $aUpdateVersion=reset($aUpdateVersions); + $aUpdateVersion=reset($aUpdateVersions); break; - + default: // Never show a notification $aUpdateVersions=array(); break; } } - + setGlobalSetting('updateversions',json_encode($aUpdateVersions)); - - + + if (isset($aUpdateVersion)) { setGlobalSetting('updateavailable',1); setGlobalSetting('updatebuild',$aUpdateVersion['build']); setGlobalSetting('updateversion',$aUpdateVersion['versionnumber']); } else { - setGlobalSetting('updateavailable',0); + setGlobalSetting('updateavailable',0); $aUpdateVersions = array(); } - + setGlobalSetting('updatelastcheck',date('Y-m-d H:i:s')); return $aUpdateVersions; } @@ -5487,17 +5468,17 @@ function enforceSSLMode() * * @param int $iSurveyId - Survey identification number * @param int $quotaid - quota id for which you want to compute the completed field -* @return mixed - Integer of matching entries in the result DB or 'N/A' +* @return string - Integer of matching entries in the result DB or 'N/A' */ function getQuotaCompletedCount($iSurveyId, $quotaid) { $result = "N/A"; if(!tableExists("survey_{$iSurveyId}")) // Yii::app()->db->schema->getTable('{{survey_' . $iSurveyId . '}}' are not updated even after Yii::app()->db->schema->refresh(); return $result; + $aColumnName=SurveyDynamic::model($iSurveyId)->getTableSchema()->getColumnNames(); $quota_info = getQuotaInformation($iSurveyId, Survey::model()->findByPk($iSurveyId)->language, $quotaid); $quota = $quota_info[0]; - if (Yii::app()->db->schema->getTable('{{survey_' . $iSurveyId . '}}') && - count($quota['members']) > 0) + if (count($quota['members']) > 0) // Existence of table already tested { // Keep a list of fields for easy reference $fields_list = array(); @@ -5507,26 +5488,28 @@ function getQuotaCompletedCount($iSurveyId, $quotaid) foreach ($quota['members'] as $member) { - $criteria = new CDbCriteria; - - foreach ($member['fieldnames'] as $fieldname) - { - if (!in_array($fieldname, $fields_list)) - $fields_list[] = $fieldname; - - // Yii does not quote column names (duh!) so we have to do it. - $criteria->addColumnCondition(array(Yii::app()->db->quoteColumnName($fieldname) => $member['value']), 'OR'); - } - - $fields_query[$fieldname] = $criteria; + if(in_array($member['fieldname'],$aColumnName)) + $fields_list[$member['fieldname']][] = $member['value']; + else + return $result;// We return N/A even for activated survey : $member['fieldname'] don't exist anymore (deleted question for example) } $criteria = new CDbCriteria; - - foreach ($fields_list as $fieldname) - $criteria->mergeWith($fields_query[$fieldname]); - $criteria->mergeWith(array('condition'=>"submitdate IS NOT NULL")); - $result = SurveyDynamic::model($iSurveyId)->count($criteria); + $criteria->condition="submitdate IS NOT NULL"; + foreach ($fields_list as $fieldname=>$aValue) + { + if(count($aValue)==1) + { + $criteria->compare(Yii::app()->db->quoteColumnName($fieldname),$aValue[0]);// NO need params + } + else + { + $criteria->addInCondition(Yii::app()->db->quoteColumnName($fieldname),$aValue); // NO need params : addInCondition bind automatically + } + } + // Ensure to return a string, Yii count return a string (see http://www.yiiframework.com/doc/api/1.1/CActiveRecord#count-detail) + // But seems under certain condition, count return integer see http://bugs.limesurvey.org/view.php?id=9587#c31917 + $result = strval(SurveyDynamic::model($iSurveyId)->count($criteria)); } return $result; @@ -5609,16 +5592,16 @@ function getFullResponseTable($iSurveyID, $iResponseID, $sLanguageCode, $bHonorC continue; } if (isset($fname['subquestion'])) - $subquestion = "{$fname['subquestion']}"; + $subquestion = "[{$fname['subquestion']}]"; if (isset($fname['subquestion1'])) - $subquestion = "{$fname['subquestion1']}"; + $subquestion = "[{$fname['subquestion1']}]"; if (isset($fname['subquestion2'])) $subquestion .= "[{$fname['subquestion2']}]"; $answer = getExtendedAnswer($iSurveyID,$fname['fieldname'], $idrow[$fname['fieldname']],$oLanguage); - $aResultTable[$fname['fieldname']]=array('',$subquestion,$answer); + $aResultTable[$fname['fieldname']]=array($question,$subquestion,$answer); } return $aResultTable; } @@ -5638,6 +5621,61 @@ function isNumericInt($mStr) } +/** +* Implode and sort content array for very long arrays +* +* @param string $sDelimeter +* @param array $aArray +* @return string String showing array content +*/ +function short_implode($sDelimeter, $sHyphen, $aArray) +{ + if (sizeof($aArray) < Yii::app()->getConfig('minlengthshortimplode')) + { + sort($aArray); + return implode($sDelimeter, $aArray); + } + else + { + sort($aArray); + $iIndexA = 0; + $iIndexB = 1; + while ($iIndexA < sizeof($aArray)) + { + if ($iIndexA == 0) + { + $sResult = $aArray[$iIndexA]; + } + else + { + if (strlen($sResult) > Yii::app()->getConfig('maxstringlengthshortimplode') - strlen($sDelimeter) - 3) + { + return $sResult.$sDelimeter.'...'; + } + else + { + $sResult = $sResult.$sDelimeter.$aArray[$iIndexA]; + } + } + $iIndexB = $iIndexA+1; + if ($iIndexB < sizeof($aArray)) + { + while ($iIndexB < sizeof($aArray) && $aArray[$iIndexB] - 1 == $aArray[$iIndexB-1]) + { + $iIndexB++; + } + if ($iIndexA < $iIndexB - 1) + { + $sResult = $sResult.$sHyphen.$aArray[$iIndexB-1]; + } + } + $iIndexA = $iIndexB; + } + return $sResult; + } +} + + /** * Include Keypad headers */ @@ -5664,7 +5702,6 @@ function includeKeypad() function getQuotaInformation($surveyid,$language,$iQuotaID='all') { Yii::log('getQuotaInformation'); - global $clienttoken; $baselang = Survey::model()->findByPk($surveyid)->language; $aAttributes=array('sid' => $surveyid); if ($iQuotaID != 'all') @@ -5673,7 +5710,7 @@ function getQuotaInformation($surveyid,$language,$iQuotaID='all') } $result = Quota::model()->with(array('languagesettings' => array('condition' => "quotals_language='$language'")))->findAllByAttributes($aAttributes); - + $quota_info = array(); $x=0; @@ -5687,18 +5724,8 @@ function getQuotaInformation($surveyid,$language,$iQuotaID='all') foreach ($result as $_survey_quotas) { $survey_quotas = array_merge($_survey_quotas->attributes,$_survey_quotas->languagesettings[0]->attributes);// We have only one language, then we can use first only - // !!! Doubting this -# foreach ($_survey_quotas->defaultlanguage as $k => $v) -# $survey_quotas[$k] = $v; - - array_push($quota_info,array('Name' => $survey_quotas['name'], - 'Limit' => $survey_quotas['qlimit'], - 'Action' => $survey_quotas['action'], - 'Message' => $survey_quotas['quotals_message'], - 'Url' => $survey_quotas['quotals_url'], - 'UrlDescrip' => $survey_quotas['quotals_urldescrip'], - 'AutoloadUrl' => $survey_quotas['autoload_url'])); + array_push($quota_info,$survey_quotas); $result_qe = QuotaMember::model()->findAllByAttributes(array('quota_id'=>$survey_quotas['id'])); $quota_info[$x]['members'] = array(); if (count($result_qe) > 0) @@ -5706,42 +5733,47 @@ function getQuotaInformation($surveyid,$language,$iQuotaID='all') foreach ($result_qe as $quota_entry) { $quota_entry = $quota_entry->attributes; - $result_quest=Question::model()->findByAttributes(array('qid'=>$quota_entry['qid'], 'language'=>$baselang)); - $qtype=$result_quest->attributes; - - $fieldnames = "0"; - - if ($qtype['type'] == "I" || $qtype['type'] == "G" || $qtype['type'] == "Y") + $oMemberQuestion=Question::model()->findByAttributes(array('qid'=>$quota_entry['qid'], 'language'=>$baselang)); + if($oMemberQuestion) { - $fieldnames=array(0 => $surveyid.'X'.$qtype['gid'].'X'.$quota_entry['qid']); - $value = $quota_entry['code']; - } + $fieldname = "0"; - if($qtype['type'] == "L" || $qtype['type'] == "O" || $qtype['type'] =="!") - { - $fieldnames=array(0 => $surveyid.'X'.$qtype['gid'].'X'.$quota_entry['qid']); - $value = $quota_entry['code']; - } + if ($oMemberQuestion->type == "I" || $oMemberQuestion->type == "G" || $oMemberQuestion->type == "Y") + { + $fieldname= $surveyid.'X'.$oMemberQuestion->gid.'X'.$quota_entry['qid']; + $value = $quota_entry['code']; + } - if($qtype['type'] == "M") - { - $fieldnames=array(0 => $surveyid.'X'.$qtype['gid'].'X'.$quota_entry['qid'].$quota_entry['code']); - $value = "Y"; - } + if($oMemberQuestion->type == "L" || $oMemberQuestion->type == "O" || $oMemberQuestion->type =="!") + { + $fieldname=$surveyid.'X'.$oMemberQuestion->gid.'X'.$quota_entry['qid']; + $value = $quota_entry['code']; + } - if($qtype['type'] == "A" || $qtype['type'] == "B") - { - $temp = explode('-',$quota_entry['code']); - $fieldnames=array(0 => $surveyid.'X'.$qtype['gid'].'X'.$quota_entry['qid'].$temp[0]); - $value = $temp[1]; - } + if($oMemberQuestion->type == "M") + { + // Need to remove invalid $quota_entry['code'] + $fieldname=$surveyid.'X'.$oMemberQuestion->gid.'X'.$quota_entry['qid'].$quota_entry['code']; + $value = "Y"; + } - array_push($quota_info[$x]['members'],array('Title' => $qtype['title'], - 'type' => $qtype['type'], - 'code' => $quota_entry['code'], - 'value' => $value, - 'qid' => $quota_entry['qid'], - 'fieldnames' => $fieldnames)); + if($oMemberQuestion->type == "A" || $oMemberQuestion->type == "B") + { + $temp = explode('-',$quota_entry['code']); + $fieldname=$surveyid.'X'.$oMemberQuestion->gid.'X'.$quota_entry['qid'].$temp[0]; + $value = $temp[1]; + } + + array_push($quota_info[$x]['members'],array( + 'Title' => $oMemberQuestion->title, + 'type' => $oMemberQuestion->type, + 'code' => $quota_entry['code'], + 'value' => $value, + 'qid' => $quota_entry['qid'], + 'fieldname' => $fieldname + ) + ); + } } } $x++; @@ -5950,7 +5982,7 @@ function translateInsertansTags($newsid,$oldsid,$fieldnames) /** * Replaces EM variable codes in a current survey with a new one -* +* * @param mixed $iSurveyID The survey ID * @param mixed $aCodeMap The codemap array (old_code=>new_code) */ @@ -5963,12 +5995,12 @@ function replaceExpressionCodes ($iSurveyID, $aCodeMap) foreach ($aCodeMap as $sOldCode=>$sNewCode) { // Don't search/replace old codes that are too short or were numeric (because they would not have been usable in EM expressions anyway) - if (strlen($sOldCode)>1 && !is_numeric($sOldCode[0])) + if (strlen($sOldCode)>1 && !is_numeric($sOldCode[0])) { $sOldCode=preg_quote($sOldCode,'/'); - $arQuestion->relevance=preg_replace("/\b{$sOldCode}/",$sNewCode,$arQuestion->relevance,-1,$iCount); + $arQuestion->relevance=preg_replace("~{[^}]*\K{$sOldCode}(?=[^}]*?})~",$sNewCode,$arQuestion->relevance,-1,$iCount); $bModified = $bModified || $iCount; - $arQuestion->question=preg_replace("/\b{$sOldCode}/",$sNewCode,$arQuestion->question,-1,$iCount); + $arQuestion->question=preg_replace("~{[^}]*\K{$sOldCode}(?=[^}]*?})~",$sNewCode,$arQuestion->question,-1,$iCount); $bModified = $bModified || $iCount; } } @@ -5984,9 +6016,9 @@ function replaceExpressionCodes ($iSurveyID, $aCodeMap) foreach ($aCodeMap as $sOldCode=>$sNewCode) { $sOldCode=preg_quote($sOldCode,'/'); - $arGroup->grelevance=preg_replace("/\b{$sOldCode}/",$sNewCode,$arGroup->grelevance,-1,$iCount); + $arGroup->grelevance=preg_replace("~{[^}]*\K{$sOldCode}(?=[^}]*?})~",$sNewCode,$arGroup->grelevance,-1,$iCount); $bModified = $bModified || $iCount; - $arGroup->description=preg_replace("/\b{$sOldCode}/",$sNewCode,$arGroup->description,-1,$iCount); + $arGroup->description=preg_replace("~{[^}]*\K{$sOldCode}(?=[^}]*?})~",$sNewCode,$arGroup->description,-1,$iCount); $bModified = $bModified || $iCount; } if ($bModified) @@ -7072,7 +7104,7 @@ function getDBTableUsage($surveyid){ $hard_limit = 1600; $size_limit = 0; } - elseif ($arrCols['dbtype'] == 'mssql' || $arrCols['dbtype'] == 'dblib'){ + elseif ($arrCols['dbtype'] == 'mssql' || $arrCols['dbtype'] == 'dblib'){ $hard_limit = 1024; $size_limit = 0; } @@ -7109,7 +7141,7 @@ function doesImportArraySupportLanguage($csvarray,$idkeysarray,$langfieldnum,$l foreach ($csvarray as $csvrow) { - $rowcontents = convertCSVRowToArray($csvrow,',','"'); + $rowcontents = str_getcsv($csvrow,',','"'); $rowid = ""; foreach ($idkeysarray as $idfieldnum) { @@ -7168,7 +7200,7 @@ function getSurveyUserList($bIncludeOwner=true, $bIncludeSuperAdmins=true,$surve if (!$bIncludeSuperAdmins) { // @todo: Adjust for new permission system - not urgent since it it just display - // $sSurveyIDQuery.='and superadmin=0 '; + // $sSurveyIDQuery.='and superadmin=0 '; } $sSurveyIDQuery.= 'ORDER BY a.users_name'; $oSurveyIDResult = Yii::app()->db->createCommand($sSurveyIDQuery)->query(); //Checked @@ -7248,16 +7280,32 @@ function getSurveyUserGroupList($outputformat='htmloptions',$surveyid) /** * This function fixes the group ID and type on all subquestions -* +* Optimized for minimum memory usage even on huge databases */ function fixSubquestions() { - $surveyidresult=Yii::app()->db->createCommand("select sq.qid, sq.parent_qid, sq.gid as sqgid, q.gid, sq.type as sqtype, q.type - from {{questions}} sq JOIN {{questions}} q on sq.parent_qid=q.qid - where sq.parent_qid>0 and (sq.gid!=q.gid or sq.type!=q.type)")->query(); - foreach($surveyidresult->readAll() as $sv) + $surveyidresult=Yii::app()->db->createCommand() + ->select('sq.qid, q.gid , q.type ') + ->from('{{questions}} sq') + ->join('{{questions}} q','sq.parent_qid=q.qid') + ->where('sq.parent_qid>0 AND (sq.gid!=q.gid or sq.type!=q.type)') + ->limit(10000) + ->query(); + $aRecords=$surveyidresult->readAll(); + while (count($aRecords)>0) { - Yii::app()->db->createCommand("update {{questions}} set type='{$sv['type']}', gid={$sv['gid']} where qid={$sv['qid']}")->query(); + foreach($aRecords as $sv) + { + Yii::app()->db->createCommand("update {{questions}} set type='{$sv['type']}', gid={$sv['gid']} where qid={$sv['qid']}")->execute(); + } + $surveyidresult=Yii::app()->db->createCommand() + ->select('sq.qid, q.gid , q.type ') + ->from('{{questions}} sq') + ->join('{{questions}} q','sq.parent_qid=q.qid') + ->where('sq.parent_qid>0 AND (sq.gid!=q.gid or sq.type!=q.type)') + ->limit(10000) + ->query(); + $aRecords=$surveyidresult->readAll(); } } @@ -7267,6 +7315,10 @@ function fixSubquestions() */ function ls_json_encode($content) { + if (is_string($content) && get_magic_quotes_gpc()) + { + $content=stripslashes($content); + } $ans = json_encode($content); $ans = str_replace(array('{','}'),array('{ ',' }'), $ans); return $ans; @@ -7295,7 +7347,7 @@ function json_decode_ls($jsonString) * Return accepted codingsArray for importing files * * Used in vvimport - * TODO : use in token and + * TODO : use in token and * @return array */ function aEncodingsArray() @@ -7467,31 +7519,70 @@ function array_diff_assoc_recursive($array1, $array2) { } - function convertPHPSizeToBytes($sSize) - { - //This function transforms the php.ini notation for numbers (like '2M') to an integer (2*1024*1024 in this case) - $sSuffix = substr($sSize, -1); - $iValue = substr($sSize, 0, -1); - switch(strtoupper($sSuffix)){ - case 'P': - $iValue *= 1024; - case 'T': - $iValue *= 1024; - case 'G': - $iValue *= 1024; - case 'M': - $iValue *= 1024; - case 'K': - $iValue *= 1024; - break; - } - return $iValue; - } - - function getMaximumFileUploadSize() - { - return min(convertPHPSizeToBytes(ini_get('post_max_size')), convertPHPSizeToBytes(ini_get('upload_max_filesize'))); - } + function convertPHPSizeToBytes($sSize) + { + //This function transforms the php.ini notation for numbers (like '2M') to an integer (2*1024*1024 in this case) + $sSuffix = substr($sSize, -1); + $iValue = substr($sSize, 0, -1); + switch(strtoupper($sSuffix)){ + case 'P': + $iValue *= 1024; + case 'T': + $iValue *= 1024; + case 'G': + $iValue *= 1024; + case 'M': + $iValue *= 1024; + case 'K': + $iValue *= 1024; + break; + } + return $iValue; + } + + function getMaximumFileUploadSize() + { + return min(convertPHPSizeToBytes(ini_get('post_max_size')), convertPHPSizeToBytes(ini_get('upload_max_filesize'))); + } + + /** + * Decodes token attribute data because due to bugs in the past it can be written in JSON or be serialized - future format should be JSON as serialized data can be exploited + * + * @param string $oTokenAttributeData The original token attributes as stored in the database + */ + function decodeTokenAttributes($oTokenAttributeData){ + if (trim($oTokenAttributeData)=='') return array(); + if (substr($oTokenAttributeData,0,1)!='{' && substr($oTokenAttributeData,0,1)!='[') + { + $sSerialType=getSerialClass($oTokenAttributeData); + if ($sSerialType=='array') // Safe to decode + { + $aReturnData=@unserialize($oTokenAttributeData); + } + else // Something else, might be unsafe + { + return array(); + } + } + else + { + $aReturnData=@json_decode($oTokenAttributeData,true); + } + if ($aReturnData===false || $aReturnData===null) return array(); + return $aReturnData; + } + + /** + * Determines the data type of serialized data + * + * @param mixed $sSerial The serialized data to examine + */ + function getSerialClass($sSerial) { + $aTypes = array('s' => 'string', 'a' => 'array', 'b' => 'bool', 'i' => 'int', 'd' => 'float', 'N;' => 'NULL'); + + $aParts = explode(':', $sSerial, 4); + return isset($aTypes[$aParts[0]]) ? $aTypes[$aParts[0]] : ( isset($aParts[2]) ? trim($aParts[2], '"') : null); + } // Closing PHP tag intentionally omitted - yes, it is okay diff --git a/sources/application/helpers/export_helper.php b/sources/application/helpers/export_helper.php index 004b510..dc405ae 100644 --- a/sources/application/helpers/export_helper.php +++ b/sources/application/helpers/export_helper.php @@ -84,12 +84,12 @@ function SPSSExportData ($iSurveyID, $iLength, $na = '', $q='\'', $header=FALSE) // Now see if we have parameters for from (offset) & num (limit) $limit = App()->getRequest()->getParam('limit'); $offset = App()->getRequest()->getParam('offset'); - + //Now get the query string with all fields to export $query = SPSSGetQuery($iSurveyID, $limit, $offset); - + $result = $query->query(); - + $rownr = 0; foreach ($result as $row) { @@ -330,7 +330,7 @@ function SPSSGetValues ($field = array(), $qidattributes = null, $language ) { */ function SPSSFieldMap($iSurveyID, $prefix = 'V') { global $clang, $surveyprivate; - + $typeMap = array( '5'=>Array('name'=>'5 Point Choice','size'=>1,'SPSStype'=>'F','Scale'=>3), 'B'=>Array('name'=>'Array (10 Point Choice)','size'=>1,'SPSStype'=>'F','Scale'=>3), @@ -434,7 +434,8 @@ function SPSSFieldMap($iSurveyID, $prefix = 'V') { $fieldtype = 'A'; $val_size = 255; } elseif ($fieldname == 'lastpage') { - $hide = 1; + $fieldtype = 'F'; + $val_size = 7; //Arbitrarilty restrict to 9,999,999 (7 digits) pages } #Get qid (question id) @@ -530,7 +531,7 @@ function SPSSGetQuery($iSurveyID, $limit = null, $offset = null) { $columns[] = 't.' . $attributefield; } } - + $query->leftJoin('{{tokens_' . $iSurveyID . '}} t', App()->db->quoteColumnName('s.token') . ' = ' . App()->db->quoteColumnName('t.token')); //LEFT JOIN {{tokens_$iSurveyID}} t ON "; } @@ -545,12 +546,12 @@ function SPSSGetQuery($iSurveyID, $limit = null, $offset = null) { $query->where('s.submitdate IS NOT NULL'); break; } - - if (!empty($limit) & !is_null($offset)) + + if (!empty($limit) & !is_null($offset)) { $query->limit((int) $limit, (int) $offset); } - + return $query; } @@ -980,7 +981,7 @@ function quexml_get_lengthth($qid,$attribute,$default, $quexmllang=false) $Query = "SELECT value FROM {{question_attributes}} WHERE qid = $qid AND language='$quexmllang' AND attribute='$attribute'"; else $Query = "SELECT value FROM {{question_attributes}} WHERE qid = $qid AND attribute='$attribute'"; - + //$QueryResult = mysql_query($Query) or die ("ERROR: $QueryResult
        ".mysql_error()); $QueryResult = Yii::app()->db->createCommand($Query)->query(); @@ -1275,12 +1276,12 @@ function quexml_export($surveyi, $quexmllan) $question->appendChild($directive); } - + if (Yii::app()->getConfig('quexmlshowprintablehelp')==true) { - + $RowQ['printable_help']=quexml_get_lengthth($qid,"printable_help","", $quexmllang); - + if (!empty($RowQ['printable_help'])) { $directive = $dom->createElement("directive"); @@ -1324,11 +1325,11 @@ function quexml_export($surveyi, $quexmllan) $response = $dom->createElement("response"); $response->setAttribute("varName",QueXMLCleanup($sgq)); $response->appendChild(QueXMLCreateFixed($qid,false,false,0,$other,$sgq)); - + $response2 = $dom->createElement("response"); $response2->setAttribute("varName",QueXMLCleanup($sgq) . "_comment"); $response2->appendChild(QueXMLCreateFree("longtext","40","")); - + $question->appendChild($response); $question->appendChild($response2); break; @@ -1428,7 +1429,7 @@ function quexml_export($surveyi, $quexmllan) if ($QROW['value']) $response->setAttribute("varName",QueXMLCleanup($QROW['value'])); $response->appendChild(QueXMLCreateFixed($qid,false,false,0,$other,$sgq)); - + //get the header of the second scale of the dual scale question $Query = "SELECT value FROM {{question_attributes}} WHERE qid = $qid AND language='$quexmllang' AND attribute='dualscale_headerB'"; $QRE = Yii::app()->db->createCommand($Query)->query(); @@ -1506,10 +1507,12 @@ function concat() function group_export($action, $iSurveyID, $gid) { + viewHelper::disableHtmlLogging(); + $fn = "limesurvey_group_$gid.lsg"; $xml = getXMLWriter(); - header("Content-Type: text/html/force-download"); + header("Content-Type: application/force-download"); header("Content-Disposition: attachment; filename=$fn"); header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date in the past header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); @@ -1576,7 +1579,7 @@ function groupGetXMLStructure($xml,$gid) $iSurveyID=$iSurveyID['sid']; $sBaseLanguage=Survey::model()->findByPk($iSurveyID)->language; $platform = Yii::app()->db->getDriverName(); - if ($platform == 'mssql' || $platform =='sqlsrv' || $platform =='dblib') + if ($platform == 'mssql' || $platform =='sqlsrv' || $platform =='dblib') { $query="SELECT qa.qid, qa.attribute, cast(qa.value as varchar(4000)) as value, qa.language FROM {{question_attributes}} qa JOIN {{questions}} q ON q.qid = qa.qid AND q.sid={$iSurveyID} and q.gid={$gid} @@ -1611,7 +1614,7 @@ function questionExport($action, $iSurveyID, $gid, $qid) $fn = "limesurvey_question_$qid.lsq"; $xml = getXMLWriter(); - header("Content-Type: text/html/force-download"); + header("Content-Type: application/force-download"); header("Content-Disposition: attachment; filename=$fn"); header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date in the past header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); @@ -1692,57 +1695,66 @@ function questionGetXMLStructure($xml,$gid,$qid) function tokensExport($iSurveyID) { + $sEmailFiter=trim(App()->request->getPost('filteremail')); + $iTokenStatus=App()->request->getPost('tokenstatus'); + $iInvitationStatus=App()->request->getPost('invitationstatus'); + $iReminderStatus=App()->request->getPost('reminderstatus'); + $sTokenLanguage=App()->request->getPost('tokenlanguage'); + + $oSurvey=Survey::model()->findByPk($iSurveyID); + $bIsNotAnonymous= ($oSurvey->anonymized=='N' && $oSurvey->active=='Y');// db table exist (survey_$iSurveyID) ? + $bquery = "SELECT * FROM {{tokens_$iSurveyID}} where 1=1"; $databasetype = Yii::app()->db->getDriverName(); - if (trim($_POST['filteremail'])!='') + if ($sEmailFiter!='') { if (in_array($databasetype, array('mssql', 'sqlsrv', 'dblib'))) { - $bquery .= ' and CAST(email as varchar) like '.dbQuoteAll('%'.$_POST['filteremail'].'%', true); + $bquery .= ' and CAST(email as varchar) like '.dbQuoteAll('%'.$sEmailFiter.'%', true); } else { - $bquery .= ' and email like '.dbQuoteAll('%'.$_POST['filteremail'].'%', true); + $bquery .= ' and email like '.dbQuoteAll('%'.$sEmailFiter.'%', true); } } - if ($_POST['tokenstatus']==1) + if ($iTokenStatus==1) { $bquery .= " and completed<>'N'"; } - if ($_POST['tokenstatus']==2) + elseif ($iTokenStatus==2) { $bquery .= " and completed='N'"; - if ($thissurvey['anonymized']=='N') + if ($bIsNotAnonymous) { $bquery .=" and token not in (select token from {{survey_$iSurveyID}} group by token)"; } } - if ($_POST['tokenstatus']==3 && $thissurvey['anonymized']=='N') + if ($iTokenStatus==3 && $bIsNotAnonymous) { $bquery .= " and completed='N' and token in (select token from {{survey_$iSurveyID}} group by token)"; } - if ($_POST['invitationstatus']==1) + if ($iInvitationStatus==1) { $bquery .= " and sent<>'N'"; } - if ($_POST['invitationstatus']==2) + if ($iInvitationStatus==2) { $bquery .= " and sent='N'"; } - if ($_POST['reminderstatus']==1) + if ($iReminderStatus==1) { $bquery .= " and remindersent<>'N'"; } - if ($_POST['reminderstatus']==2) + if ($iReminderStatus==2) { $bquery .= " and remindersent='N'"; } - if ($_POST['tokenlanguage']!='') + if ($sTokenLanguage!='') { - $bquery .= " and language=".dbQuoteAll($_POST['tokenlanguage']); + $bquery .= " and language=".dbQuoteAll($sTokenLanguage); } $bquery .= " ORDER BY tid"; Yii::app()->loadHelper('database'); diff --git a/sources/application/helpers/expressions/em_core_helper.php b/sources/application/helpers/expressions/em_core_helper.php index 3848a30..4aa6e83 100644 --- a/sources/application/helpers/expressions/em_core_helper.php +++ b/sources/application/helpers/expressions/em_core_helper.php @@ -227,6 +227,7 @@ class ExpressionManager { 'sum' => array('array_sum', 'LEMsum', gT('Calculate the sum of values in an array'), 'number sum(arg1, arg2, ... argN)', '', -2), 'sumifop' => array('exprmgr_sumifop', 'LEMsumifop', gT('Sum the values of answered questions in the list which pass the critiera (arg op value)'), 'number sumifop(op, value, arg1, arg2, ... argN)', '', -3), 'tan' => array('tan', 'Math.tan', gT('Tangent'), 'number tan(arg)', 'http://www.php.net/manual/en/function.tan.php', 1), +'convert_value' => array('exprmgr_convert_value', 'LEMconvert_value', gT('Convert a numerical value using a inputTable and outputTable of numerical values'), 'number convert_value(fValue, iStrict, sTranslateFromList, sTranslateToList)', '', 4), 'time' => array('time', 'time', gT('Return current UNIX timestamp'), 'number time()', 'http://www.php.net/manual/en/function.time.php', 0), 'trim' => array('trim', 'trim', gT('Strip whitespace (or other characters) from the beginning and end of a string'), 'string trim(string [, charlist])', 'http://www.php.net/manual/en/function.trim.php', 1,2), 'ucwords' => array('ucwords', 'ucwords', gT('Uppercase the first character of each word in a string'), 'string ucwords(string)', 'http://www.php.net/manual/en/function.ucwords.php', 1), @@ -1294,7 +1295,7 @@ class ExpressionManager { } else { - $stringParts[] = is_numeric($code) ? $code : ("'" . addcslashes($code,"'") . "'"); // htmlspecialchars($code,ENT_QUOTES,'UTF-8',false) . "'"); + $stringParts[] = "'" . addcslashes($code,"'") . "'"; } } break; @@ -2576,6 +2577,52 @@ function exprmgr_sumifop($args) return $result; } +/** + * Find the closest matching numerical input values in a list an replace it by the + * corresponding value within another list + * + * @author Johannes Weberhofer, 2013 + * + * @param numeric $fValueToReplace + * @param numeric $iStrict - 1 for exact matches only otherwise interpolation the + * closest value should be returned + * @param string $sTranslateFromList - comma seperated list of numeric values to translate from + * @param string $sTranslateToList - comma seperated list of numeric values to translate to + * @return numeric + */ +function exprmgr_convert_value($fValueToReplace, $iStrict, $sTranslateFromList, $sTranslateToList) +{ + if ( (is_numeric($fValueToReplace)) && ($iStrict!=null) && ($sTranslateFromList!=null) && ($sTranslateToList!=null) ) + { + $aFromValues = explode( ',', $sTranslateFromList); + $aToValues = explode( ',', $sTranslateToList); + if ( (count($aFromValues) > 0) && (count($aFromValues) == count($aToValues)) ) + { + $fMinimumDiff = null; + $iNearestIndex = 0; + for ( $i = 0; $i < count($aFromValues); $i++) { + if ( !is_numeric($aFromValues[$i])) { + // break processing when non-numeric variables are about to be processed + return null; + } + $fCurrentDiff = abs($aFromValues[$i] - $fValueToReplace); + if ($fCurrentDiff === 0) { + return $aToValues[$i]; + } else if ($i === 0) { + $fMinimumDiff = $fCurrentDiff; + } else if ( $fMinimumDiff > $fCurrentDiff ) { + $fMinimumDiff = $fCurrentDiff; + $iNearestIndex = $i; + } + } + if ( $iStrict !== 1 ) { + return $aToValues[$iNearestIndex]; + } + } + } + return null; +} + /** * If $test is true, return $ok, else return $error * @param $test @@ -2596,14 +2643,17 @@ function exprmgr_if($test,$ok,$error) } /** - * Return true if the variable is an integer + * Return true if the variable is an integer for LimeSurvey + * Can not really use is_int due to SQL DECIMAL system * @param string $arg * @return boolean * @link http://php.net/is_int#82857 */ function exprmgr_int($arg) { - return (ctype_digit((string)$arg));// Accept empty value too before PHP 5.1 see http://php.net/ctype-digit#refsect1-function.ctype-digit-changelog + if(strpos($arg,".")) + $arg=preg_replace("/\.$/","",rtrim(strval($arg),"0"));// DECIMAL from SQL return always .00000000, the remove all 0 and one . , see #09550 + return (ctype_digit($arg));// Accept empty value too before PHP 5.1 see http://php.net/ctype-digit#refsect1-function.ctype-digit-changelog } /** * Join together $args[0-N] with ', ' diff --git a/sources/application/helpers/expressions/em_manager_helper.php b/sources/application/helpers/expressions/em_manager_helper.php index 515dedf..0dc164d 100644 --- a/sources/application/helpers/expressions/em_manager_helper.php +++ b/sources/application/helpers/expressions/em_manager_helper.php @@ -708,8 +708,8 @@ */ public static function SetDirtyFlag() { - $_SESSION['LEMdirtyFlag'] = true; - $_SESSION['LEMforceRefresh'] = true; + $_SESSION['LEMdirtyFlag'] = true;// For fieldmap and other. question help {HELP} is taken from fieldmap + $_SESSION['LEMforceRefresh'] = true;// For Expression manager string } /** @@ -741,7 +741,7 @@ } if ($_SESSION['LEMlang'] != $lang) { // then changing languages, so clear cache - self::SetDirtyFlag(); + self::SetDirtyFlag(); } $_SESSION['LEMlang'] = $lang; } @@ -758,20 +758,27 @@ // Cheat and upgrade question attributes here too. self::UpgradeQuestionAttributes(true,$surveyId,$qid); - $releqns = self::ConvertConditionsToRelevance($surveyId,$qid); - $num = count($releqns); - if ($num == 0) { - return NULL; + if (is_null($surveyId)) + { + $sQuery='SELECT sid FROM {{surveys}}'; + $aSurveyIDs = Yii::app()->db->createCommand($sQuery)->queryColumn(); + } + else{ + $aSurveyIDs=array($surveyId); + } + foreach ($aSurveyIDs as $surveyId ) + { + $releqns = self::ConvertConditionsToRelevance($surveyId,$qid); + if ( !empty( $releqns) ) { + foreach ($releqns as $key=>$value) + { + $sQuery = "UPDATE {{questions}} SET relevance=".Yii::app()->db->quoteValue($value)." WHERE qid=".$key; + Yii::app()->db->createCommand($sQuery)->execute(); + } + } } - $queries = array(); - foreach ($releqns as $key=>$value) { - $query = "UPDATE {{questions}} SET relevance=".Yii::app()->db->quoteValue($value)." WHERE qid=".$key; - dbExecuteAssoc($query); - $queries[] = $query; - } LimeExpressionManager::SetDirtyFlag(); - return $queries; } /** @@ -875,14 +882,15 @@ $_cqid = $row['cqid']; $_subqid = -1; } - // fix fieldnames - if ($row['type'] == '' && preg_match('/^{.+}$/',$row['cfieldname'])) { + if (empty($row['type']) && preg_match('/^{.+}$/',$row['cfieldname'])) + { $fieldname = substr($row['cfieldname'],1,-1); // {TOKEN:xxxx} $subqid = $fieldname; $value = $row['value']; } - else if ($row['type'] == 'M' || $row['type'] == 'P') { + elseif ($row['type'] == 'M' || $row['type'] == 'P') + { if (substr($row['cfieldname'],0,1) == '+') { // if prefixed with +, then a fully resolved name $fieldname = substr($row['cfieldname'],1) . '.NAOK'; @@ -896,11 +904,13 @@ $value = 'Y'; } } - else { + else + { $fieldname = $row['cfieldname'] . '.NAOK'; $subqid = $fieldname; $value = $row['value']; } + if ($_subqid != -1 && $_subqid != $subqid) { $relAndList[] = '(' . implode(' or ', $relOrList) . ')'; @@ -912,17 +922,19 @@ if (preg_match('/^@\d+X\d+X\d+.*@$/',$value)) { $value = substr($value,1,-1); } - else if (preg_match('/^{.+}$/',$value)) { - $value = substr($value,1,-1); + elseif (preg_match('/^{.+}$/',$value)) + { + $value = substr($value,1,-1); + } + elseif ($row['method'] == 'RX') + { + if (!preg_match('#^/.*/$#',$value)) + { + $value = '"/' . $value . '/"'; // if not surrounded by slashes, add them. } - else if ($row['method'] == 'RX') { - if (!preg_match('#^/.*/$#',$value)) - { - $value = '"/' . $value . '/"'; // if not surrounded by slashes, add them. - } - } - else { - $value = '"' . $value . '"'; + } + else { + $value = '"' . $value . '"'; } // add equation @@ -983,9 +995,11 @@ } } - if ($row['cqid'] == 0 || substr($row['cfieldname'],0,1) == '+') { - $_cqid = -1; // forces this statement to be ANDed instead of being part of a cqid OR group + if (($row['cqid'] == 0 && !preg_match('/^{TOKEN:([^}]*)}$/',$row['cfieldname'])) || substr($row['cfieldname'],0,1) == '+') + { + $_cqid = -1; // forces this statement to be ANDed instead of being part of a cqid OR group (except for TOKEN fields) } + } // output last one if ($_qid != -1) @@ -1001,10 +1015,12 @@ $relevanceEqn = implode(' or ', $scenarios); $relevanceEqns[$_qid] = $relevanceEqn; } - if (is_null($qid)) { + if (is_null($qid)) + { return $relevanceEqns; } - else { + else + { if (isset($relevanceEqns[$qid])) { $result = array(); @@ -1315,11 +1331,7 @@ foreach($subqs as $sq) { $sq_name = ($this->sgqaNaming)?$sq['rowdivid'].".NAOK":$sq['varName'].".NAOK"; - if(($qinfo['mandatory']=='Y')){ - $sq_equs[] = 'is_numeric('.$sq_name.')'; - }else{ - $sq_equs[] = '( is_numeric('.$sq_name.') || is_empty('.$sq_name.') )'; - } + $sq_equs[] = '( is_numeric('.$sq_name.') || is_empty('.$sq_name.') )';// Leave mandatory to mandatory attribute (see #09369) if($type=="K") $subqValidSelector = $sq['jsVarName_on']; else @@ -1396,15 +1408,11 @@ if ($hasSubqs) { $subqs = $qinfo['subqs']; $sq_equs=array(); - + foreach($subqs as $sq) { $sq_name = ($this->sgqaNaming)?$sq['rowdivid'].".NAOK":$sq['varName'].".NAOK"; - if(($qinfo['mandatory']=='Y')){ - $sq_equs[] = '('.$sq_name.'!="INVALID")'; - }else{ - $sq_equs[] = '('.$sq_name.'!="INVALID")'; - } + $sq_equs[] = '('.$sq_name.'!="INVALID")'; } if (!isset($validationEqn[$questionNum])) { @@ -1475,7 +1483,7 @@ break; } } - + // date_min // Maximum date allowed in date question if (isset($qattr['date_min']) && trim($qattr['date_min']) != '') @@ -1491,13 +1499,13 @@ { case 'D': //DATE QUESTION TYPE // date_min: Determine whether we have an expression, a full date (YYYY-MM-DD) or only a year(YYYY) - if (trim($qattr['date_min'])!='') + if (trim($qattr['date_min'])!='') { $mindate=$qattr['date_min']; if ((strlen($mindate)==4) && ($mindate>=1900) && ($mindate<=2099)) { - // backward compatibility: if only a year is given, add month and day - $date_min='\''.$mindate.'-01-01'.' 00:00\''; + // backward compatibility: if only a year is given, add month and day + $date_min='\''.$mindate.'-01-01'.' 00:00\''; } elseif (preg_match("/^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])/",$mindate)) { @@ -1508,14 +1516,9 @@ $date_min=$date_min.'.NAOK'; } } - + $sq_name = ($this->sgqaNaming)?$sq['rowdivid'].".NAOK":$sq['varName'].".NAOK"; - - if(($qinfo['mandatory']=='Y')){ - $sq_name = '('. $sq_name . ' >= ' . $date_min . ')'; - }else{ - $sq_name = '(is_empty(' . $sq_name . ') || ('. $sq_name . ' >= ' . $date_min . '))'; - } + $sq_name = '(is_empty(' . $sq_name . ') || ('. $sq_name . ' >= date("Y-m-d H:i", strtotime(' . $date_min . ')) ))';// Leave mandatory to mandatory attribute $subqValidSelector = ''; break; default: @@ -1565,13 +1568,13 @@ { case 'D': //DATE QUESTION TYPE // date_max: Determine whether we have an expression, a full date (YYYY-MM-DD) or only a year(YYYY) - if (trim($qattr['date_max'])!='') + if (trim($qattr['date_max'])!='') { $maxdate=$qattr['date_max']; if ((strlen($maxdate)==4) && ($maxdate>=1900) && ($maxdate<=2099)) { - // backward compatibility: if only a year is given, add month and day - $date_max='\''.$maxdate.'-12-31 23:59'.'\''; + // backward compatibility: if only a year is given, add month and day + $date_max='\''.$maxdate.'-12-31 23:59'.'\''; } elseif (preg_match("/^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])/",$maxdate)) { @@ -1582,14 +1585,9 @@ $date_max=$date_max.'.NAOK'; } } - + $sq_name = ($this->sgqaNaming)?$sq['rowdivid'].".NAOK":$sq['varName'].".NAOK"; - - if(($qinfo['mandatory']=='Y')){ - $sq_name = '(is_empty(' . $date_max . ') || ('. $sq_name . ' <= ' . $date_max . '))'; - }else{ - $sq_name = '(is_empty(' . $sq_name . ') || is_empty(' . $date_max . ') || ('. $sq_name . ' <= ' . $date_max . '))'; - } + $sq_name = '(is_empty(' . $sq_name . ') || is_empty(' . $date_max . ') || ('. $sq_name . ' <= date("Y-m-d H:i", strtotime(' . $date_max . ')) ))';// Leave mandatory to mandatory attribute $subqValidSelector = ''; break; default: @@ -1884,7 +1882,7 @@ }else{ $input_boxes=""; } - + // min_answers // Validation:= count(sq1,...,sqN) >= value (which could be an expression). if (isset($qattr['min_answers']) && trim($qattr['min_answers']) != '' && trim($qattr['min_answers']) != '0') @@ -2076,19 +2074,11 @@ case 'K': //MULTIPLE NUMERICAL QUESTION if ($this->sgqaNaming) { - if(($qinfo['mandatory']=='Y')){ - $sq_name = '('. $sq['rowdivid'] . '.NAOK >= (' . $min_num_value_n . '))'; - }else{ - $sq_name = '(is_empty(' . $sq['rowdivid'] . '.NAOK) || '. $sq['rowdivid'] . '.NAOK >= (' . $min_num_value_n . '))'; - } + $sq_name = '(is_empty(' . $sq['rowdivid'] . '.NAOK) || '. $sq['rowdivid'] . '.NAOK >= (' . $min_num_value_n . '))'; } else { - if(($qinfo['mandatory']=='Y')){ - $sq_name = '('. $sq['varName'] . '.NAOK >= (' . $min_num_value_n . '))'; - }else{ - $sq_name = '(is_empty(' . $sq['varName'] . '.NAOK) || '. $sq['varName'] . '.NAOK >= (' . $min_num_value_n . '))'; - } + $sq_name = '(is_empty(' . $sq['varName'] . '.NAOK) || '. $sq['varName'] . '.NAOK >= (' . $min_num_value_n . '))'; } $subqValidSelector = $sq['jsVarName_on']; break; @@ -2103,11 +2093,7 @@ } else { - if(($qinfo['mandatory']=='Y')){ - $sq_name = '('. $sq['varName'] . '.NAOK >= (' . $min_num_value_n . '))'; - }else{ - $sq_name = '(is_empty(' . $sq['varName'] . '.NAOK) || '. $sq['varName'] . '.NAOK >= (' . $min_num_value_n . '))'; - } + $sq_name = '(is_empty(' . $sq['varName'] . '.NAOK) || '. $sq['varName'] . '.NAOK >= (' . $min_num_value_n . '))'; } $subqValidSelector = ''; break; @@ -2541,13 +2527,9 @@ { case 'K': //MULTI NUMERICAL QUESTION TYPE (Need a attribute, not set in 131014) $subqValidSelector = $sq['jsVarName_on']; - case 'N': //NUMERICAL QUESTION TYPE + case 'N': //NUMERICAL QUESTION TYPE $sq_name = ($this->sgqaNaming)?$sq['rowdivid'].".NAOK":$sq['varName'].".NAOK"; - if(($qinfo['mandatory']=='Y')){ - $sq_eqn = 'is_int('.$sq_name.')'; - }else{ - $sq_eqn = 'is_int('.$sq_name.') || is_empty('.$sq_name.')'; - } + $sq_eqn = 'is_int('.$sq_name.') || is_empty('.$sq_name.')'; break; default: break; @@ -2595,11 +2577,7 @@ foreach($subqs as $sq) { $sq_name = ($this->sgqaNaming)?$sq['rowdivid'].".NAOK":$sq['varName'].".NAOK"; - if(($qinfo['mandatory']=='Y')){ - $sq_equs[] = 'is_numeric('.$sq_name.')'; - }else{ - $sq_equs[] = '( is_numeric('.$sq_name.') || is_empty('.$sq_name.') )'; - } + $sq_equs[] = '( is_numeric('.$sq_name.') || is_empty('.$sq_name.') )'; } if (!isset($validationEqn[$questionNum])) { @@ -3058,7 +3036,7 @@ // Helptext is added in qanda_help.php /* case 'D': $qtips['default']=$this->gT("Please complete all parts of the date."); - break; + break; */ default: break; @@ -3144,11 +3122,22 @@ { $_minV = (($min_num_value_n == '') ? "''" : $min_num_value_n); $_maxV = (($max_num_value_n == '') ? "''" : $max_num_value_n); - $qtips['value_range']= - "{if(!is_empty($_minV) && is_empty($_maxV), sprintf('".$this->gT("Each answer must be at least %s")."',fixnum($_minV)), '')}" . - "{if(is_empty($_minV) && !is_empty($_maxV), sprintf('".$this->gT("Each answer must be at most %s")."',fixnum($_maxV)), '')}" . - "{if(!is_empty($_minV) && ($_minV) == ($_maxV),sprintf('".$this->gT("Each answer must be %s")."', fixnum($_minV)), '')}" . - "{if(!is_empty($_minV) && !is_empty($_maxV) && ($_minV) != ($_maxV), sprintf('".$this->gT("Each answer must be between %s and %s")."', fixnum($_minV), fixnum($_maxV)), '')}"; + if ($type!='N') + { + $qtips['value_range']= + "{if(!is_empty($_minV) && is_empty($_maxV), sprintf('".$this->gT("Each answer must be at least %s")."',fixnum($_minV)), '')}" . + "{if(is_empty($_minV) && !is_empty($_maxV), sprintf('".$this->gT("Each answer must be at most %s")."',fixnum($_maxV)), '')}" . + "{if(!is_empty($_minV) && ($_minV) == ($_maxV),sprintf('".$this->gT("Each answer must be %s")."', fixnum($_minV)), '')}" . + "{if(!is_empty($_minV) && !is_empty($_maxV) && ($_minV) != ($_maxV), sprintf('".$this->gT("Each answer must be between %s and %s")."', fixnum($_minV), fixnum($_maxV)), '')}"; + } + else + { + $qtips['value_range']= + "{if(!is_empty($_minV) && is_empty($_maxV), sprintf('".$this->gT("Your answer must be at least %s")."',fixnum($_minV)), '')}" . + "{if(is_empty($_minV) && !is_empty($_maxV), sprintf('".$this->gT("Your answer must be at most %s")."',fixnum($_maxV)), '')}" . + "{if(!is_empty($_minV) && ($_minV) == ($_maxV),sprintf('".$this->gT("Your answer must be %s")."', fixnum($_minV)), '')}" . + "{if(!is_empty($_minV) && !is_empty($_maxV) && ($_minV) != ($_maxV), sprintf('".$this->gT("Your answer must be between %s and %s")."', fixnum($_minV), fixnum($_maxV)), '')}"; + } } // min/max value for dates @@ -4063,21 +4052,21 @@ if (Survey::model()->hasTokens($surveyid) && isset($_SESSION[$this->sessid]['token']) && $_SESSION[$this->sessid]['token'] != '') { //Gather survey data for tokenised surveys, for use in presenting questions - $this->knownVars['TOKEN:TOKEN'] = array( + $this->knownVars['TOKEN:TOKEN'] = array( 'code'=>$_SESSION[$this->sessid]['token'], 'jsName_on'=>'', 'jsName'=>'', 'readWrite'=>'N', ); - - $token = Token::model($surveyid)->findByToken($_SESSION[$this->sessid]['token']); + + $token = Token::model($surveyid)->findByToken($_SESSION[$this->sessid]['token']); foreach ($token as $key => $val) { $this->knownVars["TOKEN:" . strtoupper($key)] = array( - 'code' => $anonymized ? '' : $val, - 'jsName_on' => '', - 'jsName' => '', - 'readWrite' => 'N', + 'code' => $anonymized ? '' : $val, + 'jsName_on' => '', + 'jsName' => '', + 'readWrite' => 'N', ); } } @@ -4407,7 +4396,7 @@ { $result=true; $relevanceJS=1; - } + } else { $relevanceJS = $this->em->GetJavaScriptEquivalentOfExpression(); @@ -4883,8 +4872,8 @@ 'at_start'=>true, 'finished'=>false, 'message'=>$message, - 'unansweredSQs'=>(isset($result['unansweredSQs']) ? $result['unansweredSQs'] : ''), - 'invalidSQs'=>(isset($result['invalidSQs']) ? $result['invalidSQs'] : ''), + 'unansweredSQs'=>'', + 'invalidSQs'=>'', ); return $LEM->lastMoveResult; } @@ -4922,7 +4911,7 @@ 'gseq'=>$LEM->currentGroupSeq, 'seq'=>$LEM->currentQuestionSeq, 'qseq'=>$LEM->currentQuestionSeq, - 'mandViolation'=> (($LEM->maxGroupSeq > $LEM->currentGroupSeq) ? $result['mandViolation'] : false), + 'mandViolation'=> (($LEM->maxGroupSeq > $LEM->currentGroupSeq) ? $result['mandViolation'] : false),// This can never happen ? 'valid'=> (($LEM->maxGroupSeq > $LEM->currentGroupSeq) ? $result['valid'] : false), 'unansweredSQs'=>$result['unansweredSQs'], 'invalidSQs'=>$result['invalidSQs'], @@ -5029,6 +5018,7 @@ if (is_null($result)) { continue; // this is an invalid group - skip it } + $message .= $result['message']; $updatedValues = array_merge($updatedValues,$result['updatedValues']); if (!$result['relevant'] || $result['hidden']) @@ -5066,20 +5056,20 @@ $updatedValues = array_merge($updatedValues,$result['updatedValues']); $gRelInfo = $LEM->gRelInfo[$LEM->currentGroupSeq]; $grel = $gRelInfo['result']; - if ($grel && !is_null($result) && ($result['mandViolation'] || !$result['valid'])) { // redisplay the current question $message .= $LEM->_UpdateValuesInDatabase($updatedValues,false); $LEM->runtimeTimings[] = array(__METHOD__,(microtime(true) - $now)); + // We have an error : always show real last move result $LEM->lastMoveResult = array( 'finished'=>false, 'message'=>$message, 'qseq'=>$LEM->currentQuestionSeq, 'gseq'=>$LEM->currentGroupSeq, 'seq'=>$LEM->currentQuestionSeq, - 'mandViolation'=> (($LEM->maxGroupSeq > $LEM->currentGroupSeq) ? $result['mandViolation'] : false), - 'valid'=> (($LEM->maxGroupSeq > $LEM->currentGroupSeq) ? $result['valid'] : false), + 'mandViolation'=> $result['mandViolation'], + 'valid'=> $result['valid'], 'unansweredSQs'=>$result['unansweredSQs'], 'invalidSQs'=>$result['invalidSQs'], ); @@ -5091,6 +5081,7 @@ $LEM->currentQset = array(); // reset active list of questions if (++$LEM->currentQuestionSeq >= $LEM->numQuestions) { + // Redisplay the last question with error existing result $message .= $LEM->_UpdateValuesInDatabase($updatedValues,true); $LEM->runtimeTimings[] = array(__METHOD__,(microtime(true) - $now)); $LEM->lastMoveResult = array( @@ -5099,8 +5090,8 @@ 'qseq'=>$LEM->currentQuestionSeq, 'gseq'=>$LEM->currentGroupSeq, 'seq'=>$LEM->currentQuestionSeq, - 'mandViolation'=> (($LEM->maxGroupSeq > $LEM->currentGroupSeq) ? $result['mandViolation'] : false), - 'valid'=> (($LEM->maxGroupSeq > $LEM->currentGroupSeq) ? $result['valid'] : false), + 'mandViolation'=> (isset($result['mandViolation']) ? $result['mandViolation'] : false), + 'valid'=> (isset($result['valid']) ? $result['valid'] : false), 'unansweredSQs'=>(isset($result['unansweredSQs']) ? $result['unansweredSQs'] : ''), 'invalidSQs'=>(isset($result['invalidSQs']) ? $result['invalidSQs'] : ''), ); @@ -5123,7 +5114,6 @@ $updatedValues = array_merge($updatedValues,$result['updatedValues']); $gRelInfo = $LEM->gRelInfo[$LEM->currentGroupSeq]; $grel = $gRelInfo['result']; - if (!$grel || !$result['relevant'] || $result['hidden']) { // then skip this question - assume already saved? @@ -5132,6 +5122,7 @@ else { // display new question + // If it's new question : no mandatory error in lastMoveResult $message .= $LEM->_UpdateValuesInDatabase($updatedValues,false); $LEM->runtimeTimings[] = array(__METHOD__,(microtime(true) - $now)); $LEM->lastMoveResult = array( @@ -5140,8 +5131,8 @@ 'qseq'=>$LEM->currentQuestionSeq, 'gseq'=>$LEM->currentGroupSeq, 'seq'=>$LEM->currentQuestionSeq, - 'mandViolation'=> (($LEM->maxGroupSeq > $LEM->currentGroupSeq) ? $result['mandViolation'] : false), - 'valid'=> (($LEM->maxGroupSeq > $LEM->currentGroupSeq) ? $result['valid'] : false), + 'mandViolation'=> false, + 'valid'=> true, 'unansweredSQs'=>$result['unansweredSQs'], 'invalidSQs'=>$result['invalidSQs'], ); @@ -5189,14 +5180,21 @@ } if ($this->surveyOptions['refurl'] == true) { - $sdata['refurl'] = getenv("HTTP_REFERER"); + if (isset($_SESSION[$this->sessid]['refurl'])) + { + $sdata['refurl'] = $_SESSION[$this->sessid]['refurl']; + } + else + { + $sdata['refurl'] = getenv("HTTP_REFERER"); + } } $sdata = array_filter($sdata); SurveyDynamic::sid($this->sid); $oSurvey = new SurveyDynamic; - - $iNewID = $oSurvey->insertRecords($sdata); + + $iNewID = $oSurvey->insertRecords($sdata); if ($iNewID) // Checked { $srid = $iNewID; @@ -5205,12 +5203,14 @@ else { $message .= $this->gT("Unable to insert record into survey table"); // TODO - add SQL error? + echo submitfailed(''); // TODO - report SQL error? + } //Insert Row for Timings, if needed if ($this->surveyOptions['savetimings']) { SurveyTimingDynamic::sid($this->sid); $oSurveyTimings = new SurveyTimingDynamic; - + $tdata = array( 'id'=>$srid, 'interviewtime'=>0 @@ -5324,23 +5324,10 @@ SavedControl::model()->updateByPk($_SESSION[$this->sessid]['scid'], array('saved_thisstep'=>$thisstep)); } // Check Quotas - $bQuotaMatched = false; - $aQuotas = checkQuota('return', $this->sid); - if ($aQuotas !== false) + $aQuotas = checkCompletedQuota($this->sid,'return'); + if ($aQuotas && !empty($aQuotas)) { - if ($aQuotas != false) - { - foreach ($aQuotas as $aQuota) - { - if (isset($aQuota['status']) && $aQuota['status'] == 'matched') { - $bQuotaMatched = true; - } - } - } - } - if ($bQuotaMatched) - { - checkQuota('enforce',$this->sid); // will create a page and quit. + checkCompletedQuota($this->sid); // will create a page and quit: why not use it directly ? } else { @@ -5423,7 +5410,7 @@ $message = ''; $LEM->currentQset = array(); // reset active list of questions - $result = $LEM->_ValidateSurvey(); + $result = $LEM->_ValidateSurvey($force); $message .= $result['message']; $updatedValues = array_merge($updatedValues,$result['updatedValues']); $finished=false; @@ -5497,7 +5484,7 @@ return $LEM->lastMoveResult; } - $result = $LEM->_ValidateGroup($LEM->currentGroupSeq); + $result = $LEM->_ValidateGroup($LEM->currentGroupSeq,$force); if (is_null($result)) { return NULL; // invalid group - either bad number, or no questions within it } @@ -5508,19 +5495,20 @@ // then skip this group - assume already saved? continue; } - elseif (!($result['mandViolation'] || !$result['valid']) && $LEM->currentGroupSeq < $seq) { - // if there is a violation while moving forward, need to stop and ask that set of questions - // if there are no violations, can skip this group as long as changed values are saved. - continue; + elseif (!($result['mandViolation'] || !$result['valid']) && $LEM->currentGroupSeq < $seq) + { + // if there is a violation while moving forward, need to stop and ask that set of questions + // if there are no violations, can skip this group as long as changed values are saved. + continue; + } + else + { + // display new group + if(!$preview){ // Save only if not in preview mode + $message .= $LEM->_UpdateValuesInDatabase($updatedValues,false); + $LEM->runtimeTimings[] = array(__METHOD__,(microtime(true) - $now)); } - else - { - // display new group - if(!$preview){ // Save only if not in preview mode - $message .= $LEM->_UpdateValuesInDatabase($updatedValues,false); - $LEM->runtimeTimings[] = array(__METHOD__,(microtime(true) - $now)); - } - $LEM->lastMoveResult = array( + $LEM->lastMoveResult = array( 'finished'=>false, 'message'=>$message, 'gseq'=>$LEM->currentGroupSeq, @@ -5529,8 +5517,8 @@ 'valid'=> (($LEM->maxGroupSeq > $LEM->currentGroupSeq) ? $result['valid'] : false), 'unansweredSQs'=>$result['unansweredSQs'], 'invalidSQs'=>$result['invalidSQs'], - ); - return $LEM->lastMoveResult; + ); + return $LEM->lastMoveResult; } } break; @@ -5545,7 +5533,7 @@ $message = ''; if (!$force && $LEM->currentQuestionSeq != -1 && $seq > $LEM->currentQuestionSeq) { - $result = $LEM->_ValidateQuestion($LEM->currentQuestionSeq); + $result = $LEM->_ValidateQuestion($LEM->currentQuestionSeq,$force); $message .= $result['message']; $updatedValues = array_merge($updatedValues,$result['updatedValues']); $gRelInfo = $LEM->gRelInfo[$LEM->currentGroupSeq]; @@ -5561,8 +5549,8 @@ 'qseq'=>$LEM->currentQuestionSeq, 'gseq'=>$LEM->currentGroupSeq, 'seq'=>$LEM->currentQuestionSeq, - 'mandViolation'=> (($LEM->maxGroupSeq > $LEM->currentGroupSeq) ? $result['mandViolation'] : false), - 'valid'=> (($LEM->maxGroupSeq > $LEM->currentGroupSeq) ? $result['valid'] : false), + 'mandViolation'=> $result['mandViolation'], + 'valid'=> $result['valid'], 'unansweredSQs'=>$result['unansweredSQs'], 'invalidSQs'=>$result['invalidSQs'], ); @@ -5585,8 +5573,8 @@ 'qseq'=>$LEM->currentQuestionSeq, 'gseq'=>$LEM->currentGroupSeq, 'seq'=>$LEM->currentQuestionSeq, - 'mandViolation'=> (($LEM->maxGroupSeq > $LEM->currentGroupSeq) ? $result['mandViolation'] : false), - 'valid'=> (($LEM->maxGroupSeq > $LEM->currentGroupSeq) ? $result['valid'] : false), + 'mandViolation'=> (($LEM->maxGroupSeq > $LEM->currentGroupSeq) ? $result['mandViolation'] : false), // Can set always false ? + 'valid'=> (($LEM->maxGroupSeq > $LEM->currentGroupSeq) ? $result['valid'] : false), // Return always false ? 'unansweredSQs'=>(isset($result['unansweredSQs']) ? $result['unansweredSQs'] : ''), 'invalidSQs'=>(isset($result['invalidSQs']) ? $result['invalidSQs'] : ''), ); @@ -5607,7 +5595,7 @@ $LEM->ProcessAllNeededRelevance($LEM->currentQuestionSeq); $LEM->_CreateSubQLevelRelevanceAndValidationEqns($LEM->currentQuestionSeq); - $result = $LEM->_ValidateQuestion($LEM->currentQuestionSeq); + $result = $LEM->_ValidateQuestion($LEM->currentQuestionSeq,$force); $message .= $result['message']; $updatedValues = array_merge($updatedValues,$result['updatedValues']); $gRelInfo = $LEM->gRelInfo[$LEM->currentGroupSeq]; @@ -5655,7 +5643,7 @@ * Check the entire survey * @return */ - private function _ValidateSurvey() + private function _ValidateSurvey($force=false) { $LEM =& $this; @@ -5674,7 +5662,7 @@ /////////////////////////////////////////////////////// for ($i=0;$i<$LEM->numGroups;++$i) { $LEM->currentGroupSeq=$i; - $gStatus = $LEM->_ValidateGroup($i); + $gStatus = $LEM->_ValidateGroup($i,$force); if (is_null($gStatus)) { continue; // invalid group, so skip it } @@ -5726,10 +5714,11 @@ /** * Check a group and all of the questions it contains - * @param $groupSeq - the index-0 sequence number for this group + * @param integer $groupSeq - the index-0 sequence number for this group + * @param boolean $force : force validation to true, even if there are error * @return - detailed information about this group */ - function _ValidateGroup($groupSeq) + function _ValidateGroup($groupSeq,$force=false) { $LEM =& $this; @@ -5765,7 +5754,7 @@ ///////////////////////////////////////////////////////// for ($i=$groupSeqInfo['qstart'];$i<=$groupSeqInfo['qend']; ++$i) { - $qStatus = $LEM->_ValidateQuestion($i); + $qStatus = $LEM->_ValidateQuestion($i,$force); $updatedValues = array_merge($updatedValues,$qStatus['updatedValues']); @@ -5895,11 +5884,12 @@ * (c) relevance status - including sub-question-level relevance * (d) answered - if $_SESSION[$LEM->sessid][sgqa]=='' or NULL, then it is not answered * (e) validity - whether relevant questions pass their validity tests - * @param $questionSeq - the 0-index sequence number for this question + * @param integer $questionSeq - the 0-index sequence number for this question + * @param boolean $force : force validation to true, even if there are error, this allow to save in DB even with error * @return of information about this question and its sub-questions */ - function _ValidateQuestion($questionSeq) + function _ValidateQuestion($questionSeq,$force=false) { $LEM =& $this; $qInfo = $LEM->questionSeq2relevance[$questionSeq]; // this array is by group and question sequence @@ -5913,7 +5903,12 @@ $gRelInfo = $LEM->gRelInfo[$qInfo['gseq']]; $grel = $gRelInfo['result']; - + //Allways set a $_SESSION + $allSQs = explode('|', $LEM->qid2code[$qid]); + foreach($allSQs as $answer){ + if(!isset($_SESSION[$LEM->sessid][$answer])) + $_SESSION[$LEM->sessid][$answer]=null; + } /////////////////////////// // IS QUESTION RELEVANT? // /////////////////////////// @@ -5966,6 +5961,7 @@ $prettyPrintSQRelEqn=''; $prettyPrintValidTip=''; $anyUnanswered = false; + if (!$qrel) { // All sub-questions are irrelevant @@ -6282,9 +6278,9 @@ { $rowCount=0; $numUnanswered=0; - foreach ($sgqas as $s) + foreach ($sgqas as $s)// For each sub question (double), test if one is checked { - if (strpos($s, $sq['rowdivid']) !== false) + if (strpos($s, $sq['rowdivid']."_") !== false)// Filterd by Y : SGQASYCODE_SXCODE { ++$rowCount; if (array_search($s,$unansweredSQs) !== false) { @@ -6364,6 +6360,7 @@ break; } } + /////////////////////////////////////////////// // DETECT ANY VIOLATIONS OF VALIDATION RULES // /////////////////////////////////////////////// @@ -6418,11 +6415,11 @@ } } } + if (!$qvalid) { $invalidSQs = $LEM->qid2code[$qid]; // TODO - currently invalidates all - should only invalidate those that truly fail validation rules. } - ///////////////////////////////////////////////////////// // OPTIONALLY DISPLAY (DETAILED) DEBUGGING INFORMATION // ///////////////////////////////////////////////////////// @@ -6527,26 +6524,27 @@ $LEM->updatedValues[$sgqa] = NULL; } } - else if ($qInfo['type'] == '*') - { - // Process relevant equations, even if hidden, and write the result to the database - $result = flattenText($LEM->ProcessString($qInfo['eqn'], $qInfo['qid'],NULL,false,1,1,false,false)); - $sgqa = $LEM->qid2code[$qid]; // there will be only one, since Equation - // Store the result of the Equation in the SESSION - $_SESSION[$LEM->sessid][$sgqa] = $result; - $_update = array( - 'type'=>'*', - 'value'=>$result, - ); - $updatedValues[$sgqa] = $_update; - $LEM->updatedValues[$sgqa] = $_update; + elseif ($qInfo['type'] == '*') + { + // Process relevant equations, even if hidden, and write the result to the database + $result = flattenText($LEM->ProcessString($qInfo['eqn'], $qInfo['qid'],NULL,false,1,1,false,false)); + $sgqa = $LEM->qid2code[$qid]; // there will be only one, since Equation + // Store the result of the Equation in the SESSION + $_SESSION[$LEM->sessid][$sgqa] = $result; + $_update = array( + 'type'=>'*', + 'value'=>$result, + ); + $updatedValues[$sgqa] = $_update; + $LEM->updatedValues[$sgqa] = $_update; - if (($LEM->debugLevel & LEM_DEBUG_VALIDATION_DETAIL) == LEM_DEBUG_VALIDATION_DETAIL) - { - $prettyPrintEqn = $LEM->em->GetPrettyPrintString(); - $debug_qmessage .= '** Process Hidden but Relevant Equation [' . $sgqa . '](' . $prettyPrintEqn . ') => ' . $result . "
        \n"; - } + if (($LEM->debugLevel & LEM_DEBUG_VALIDATION_DETAIL) == LEM_DEBUG_VALIDATION_DETAIL) + { + $prettyPrintEqn = $LEM->em->GetPrettyPrintString(); + $debug_qmessage .= '** Process Hidden but Relevant Equation [' . $sgqa . '](' . $prettyPrintEqn . ') => ' . $result . "
        \n"; + } } + if ( $LEM->surveyOptions['deletenonvalues'] ) { foreach ($irrelevantSQs as $sq) @@ -6561,12 +6559,12 @@ // Regardless of whether relevant or hidden, if there is a default value and $_SESSION[$LEM->sessid][$sgqa] is NULL, then use the default value in $_SESSION, but don't write to database // Also, set this AFTER testing relevance $sgqas = explode('|',$LEM->qid2code[$qid]); + foreach ($sgqas as $sgqa) { if (!is_null($LEM->knownVars[$sgqa]['default']) && !isset($_SESSION[$LEM->sessid][$sgqa])) { // add support for replacements - $defaultVal = $LEM->ProcessString($LEM->knownVars[$sgqa]['default'], NULL, NULL, false, 1, 1, false, false, true); - $_SESSION[$LEM->sessid][$sgqa] = $defaultVal; + $_SESSION[$LEM->sessid][$sgqa] = $LEM->ProcessString($LEM->knownVars[$sgqa]['default'], NULL, NULL, false, 1, 1, false, false, true); } } @@ -6581,19 +6579,19 @@ 'relEqn' => $prettyPrintRelEqn, 'sgqa' => $LEM->qid2code[$qid], 'unansweredSQs' => implode('|',$unansweredSQs), - 'valid' => $qvalid, + 'valid' => $force || $qvalid, 'validEqn' => $validationEqn, 'prettyValidEqn' => $prettyPrintValidEqn, 'validTip' => $validTip, 'prettyValidTip' => $prettyPrintValidTip, 'validJS' => $validationJS, - 'invalidSQs' => (isset($invalidSQs) ? $invalidSQs : ''), + 'invalidSQs' => (isset($invalidSQs) && !$force) ? $invalidSQs : '', 'relevantSQs' => implode('|',$relevantSQs), 'irrelevantSQs' => implode('|',$irrelevantSQs), 'subQrelEqn' => implode('
        ',$prettyPrintSQRelEqns), - 'mandViolation' => $qmandViolation, + 'mandViolation' => (!$force) ? $qmandViolation : false, 'anyUnanswered' => $anyUnanswered, - 'mandTip' => $mandatoryTip, + 'mandTip' => (!$force) ? $mandatoryTip : '', 'message' => $debug_qmessage, 'updatedValues' => $updatedValues, 'sumEqn' => (isset($sumEqn) ? $sumEqn : ''), @@ -6625,7 +6623,6 @@ 'mandViolation' => $qmandViolation, 'valid' => $qvalid, ); - $_SESSION[$LEM->sessid]['relevanceStatus'][$qid] = $qrel; return $qStatus; } @@ -7869,14 +7866,14 @@ EOT; EOD; @@ -8015,103 +8012,93 @@ EOD; private static function getConditionsForEM($surveyid=NULL, $qid=NULL) { if (!is_null($qid)) { - $where = " c.qid = ".$qid." and "; + $where = " c.qid = ".$qid." AND "; } - else if (!is_null($surveyid)) { - $where = " c.qid in (select qid from {{questions}} where sid = ".$surveyid.") and "; - } - else { - $where = ""; + else if (!is_null($surveyid)) + { + $where = " qa.sid = {$surveyid} AND "; + } + else + { + $where = ""; } - $query = "select distinct c.*" - .", q.sid, q.type" - ." from {{conditions}} as c" - .", {{questions}} as q" - ." where " . $where - ." c.cqid=q.qid" - ." union " - ." select c.*, q.sid, '' as type" - ." from {{conditions}} as c" - .", {{questions}} as q" - ." where ". $where - ." c.cqid = 0 and c.qid = q.qid"; + $query = "SELECT DISTINCT c.*, q.sid, q.type + FROM {{conditions}} AS c + LEFT JOIN {{questions}} q ON c.cqid=q.qid + LEFT JOIN {{questions}} qa ON c.qid=qa.qid + WHERE {$where} 1=1 + UNION + SELECT DISTINCT c.*, q.sid, NULL AS TYPE + FROM {{conditions}} AS c + LEFT JOIN {{questions}} q ON c.cqid=q.qid + LEFT JOIN {{questions}} qa ON c.qid=qa.qid + WHERE {$where} c.cqid = 0"; $databasetype = Yii::app()->db->getDriverName(); if ($databasetype=='mssql' || $databasetype=='dblib') { - $query .= " order by sid, c.qid, scenario, cqid, cfieldname, value"; + $query .= " order by c.qid, sid, scenario, cqid, cfieldname, value"; } else { - $query .= " order by sid, qid, scenario, cqid, cfieldname, value"; + $query .= " order by qid, sid, scenario, cqid, cfieldname, value"; } - $data = dbExecuteAssoc($query); - - return $data; + return Yii::app()->db->createCommand($query)->query(); } /** * Deprecate obsolete question attributes. * @param boolean $changedb - if true, updates parameters and deletes old ones - * @param type $surveyid - if set, then only for that survey + * @param type $iSureyID - if set, then only for that survey * @param type $onlythisqid - if set, then only for this question ID */ - public static function UpgradeQuestionAttributes($changeDB=false,$surveyid=NULL,$onlythisqid=NULL) + public static function UpgradeQuestionAttributes($changeDB=false,$iSurveyID=NULL,$onlythisqid=NULL) { $LEM =& LimeExpressionManager::singleton(); - $qattrs = $LEM->getQuestionAttributesForEM($surveyid,$onlythisqid,$_SESSION['LEMlang']); - - $qupdates = array(); + if (is_null($iSurveyID)) + { + $sQuery='SELECT sid FROM {{surveys}}'; + $aSurveyIDs = Yii::app()->db->createCommand($sQuery)->queryColumn(); + } + else{ + $aSurveyIDs=array($iSurveyID); + } $attibutemap = array( - 'max_num_value_sgqa' => 'max_num_value', - 'min_num_value_sgqa' => 'min_num_value', - 'num_value_equals_sgqa' => 'equals_num_value', + 'max_num_value_sgqa' => 'max_num_value', + 'min_num_value_sgqa' => 'min_num_value', + 'num_value_equals_sgqa' => 'equals_num_value', ); $reverseAttributeMap = array_flip($attibutemap); - - foreach ($qattrs as $qid => $qattr) + foreach ($aSurveyIDs as $iSurveyID) { - $updates = array(); - foreach ($attibutemap as $src=>$target) + $qattrs = $LEM->getQuestionAttributesForEM($iSurveyID,$onlythisqid,$_SESSION['LEMlang']); + foreach ($qattrs as $qid => $qattr) { - if (isset($qattr[$src]) && trim($qattr[$src]) != '') + $updates = array(); + foreach ($attibutemap as $src=>$target) { - $updates[$target] = $qattr[$src]; + if (isset($qattr[$src]) && trim($qattr[$src]) != '') + { + $updates[$target] = $qattr[$src]; + } + } + if ($changeDB) + { + foreach ($updates as $key=>$value) + { + $query = "UPDATE {{question_attributes}} SET value=".Yii::app()->db->quoteValue($value)." WHERE qid={$qid} and attribute=".Yii::app()->db->quoteValue($key); + Yii::app()->db->createCommand($query)->execute(); + $query = "DELETE FROM {{question_attributes}} WHERE qid={$qid} and attribute=".Yii::app()->db->quoteValue($reverseAttributeMap[$key]); + Yii::app()->db->createCommand($query)->execute(); + + } } } - if (count($updates) > 0) - { - $qupdates[$qid] = $updates; - } } - if ($changeDB) - { - $queries = array(); - foreach ($qupdates as $qid=>$updates) - { - foreach ($updates as $key=>$value) - { - $query = "UPDATE {{question_attributes}} SET value=".Yii::app()->db->quoteValue($value)." WHERE qid=".$qid." and attribute=".Yii::app()->db->quoteValue($key); - $queries[] = $query; - $query = "DELETE FROM {{question_attributes}} WHERE qid=".$qid." and attribute=".Yii::app()->db->quoteValue($reverseAttributeMap[$key]); - $queries[] = $query; - } - } - // now update the datbase - foreach ($queries as $query) - { - dbExecuteAssoc($query); - } - return $queries; - } - else - { - return $qupdates; - } } /** @@ -8297,32 +8284,33 @@ EOD; function getGroupInfoForEM($surveyid,$lang=NULL) { - if (!is_null($lang)) { - $lang = " and a.language='".$lang."'"; + if (is_null($lang) && isset($_SESSION['LEMlang'])) + { + $lang = $_SESSION['LEMlang']; } - $query = "SELECT a.group_name, a.description, a.gid, a.group_order, a.grelevance" - ." FROM {{groups}} AS a" - ." WHERE a.sid=".$surveyid - .$lang - ." ORDER BY group_order"; - - $data = dbExecuteAssoc($query); - + elseif(is_null($lang)) + { + $lang=Survey::model()->findByPk($surveyid)->language; + } + $oQuestionGroups=QuestionGroup::model()->findAll(array('condition'=>"sid=:sid and language=:language",'order'=>'group_order','params'=>array(":sid"=>$surveyid,':language'=>$lang))); $qinfo = array(); $_order=0; - foreach ($data as $d) + foreach ($oQuestionGroups as $oQuestionGroup) { - $gid[$d['gid']] = array( + $gid[$oQuestionGroup->gid] = array( 'group_order' => $_order, - 'gid' => $d['gid'], - 'group_name' => $d['group_name'], - 'description' => $d['description'], - 'grelevance' => (!($this->sPreviewMode=='question' || $this->sPreviewMode=='group')) ? $d['grelevance']:1, - ); - $qinfo[$_order] = $gid[$d['gid']]; + 'gid' => $oQuestionGroup->gid, + 'group_name' => $oQuestionGroup->group_name, + 'description' => $oQuestionGroup->description, + 'grelevance' => (!($this->sPreviewMode=='question' || $this->sPreviewMode=='group')) ? $oQuestionGroup->grelevance:1, + ); + $qinfo[$_order] = $gid[$oQuestionGroup->gid]; ++$_order; } - if (isset($_SESSION['survey_'.$surveyid]) && isset($_SESSION['survey_'.$surveyid]['grouplist'])) { + // Needed for Randomization group. + $groupRemap= (!$this->sPreviewMode && !empty($_SESSION['survey_'.$surveyid]['groupReMap']) && !empty($_SESSION['survey_'.$surveyid]['grouplist'])); + if ($groupRemap) + { $_order=0; $qinfo = array(); foreach ($_SESSION['survey_'.$surveyid]['grouplist'] as $info) @@ -8332,7 +8320,6 @@ EOD; ++$_order; } } - return $qinfo; } @@ -8918,7 +8905,6 @@ EOD; ); $varNamesUsed = array(); // keeps track of whether variables have been declared - if (!is_null($qid)) { $surveyMode='question'; @@ -9109,6 +9095,10 @@ EOD; case 'max_num_of_files': case 'multiflexible_max': case 'multiflexible_min': + case 'slider_accuracy': + case 'slider_min': + case 'slider_max': + case 'slider_default': $value = '{' . $value . '}'; break; case 'other_replace_text': @@ -9906,7 +9896,7 @@ EOD; $token = Token::model($iSurveyId)->findByAttributes(array( 'token' => $sToken )); - + $this->knownVars['TOKEN:TOKEN'] = array( 'code'=> $sToken, 'jsName_on'=>'', diff --git a/sources/application/helpers/frontend_helper.php b/sources/application/helpers/frontend_helper.php index 3a49373..9df0148 100644 --- a/sources/application/helpers/frontend_helper.php +++ b/sources/application/helpers/frontend_helper.php @@ -13,44 +13,53 @@ function loadanswers() { + Yii::trace('start', 'survey.loadanswers'); global $surveyid; global $thissurvey, $thisstep; global $clienttoken; $clang = Yii::app()->lang; - $scid=returnGlobal('scid',true); + $scid=Yii::app()->request->getQuery('scid'); if (Yii::app()->request->getParam('loadall') == "reload") { - $query = "SELECT * FROM {{saved_control}} INNER JOIN {$thissurvey['tablename']} - ON {{saved_control}}.srid = {$thissurvey['tablename']}.id - WHERE {{saved_control}}.sid=$surveyid\n"; - if (isset($scid)) //Would only come from email - + $sLoadName=Yii::app()->request->getParam('loadname'); + $sLoadPass=Yii::app()->request->getParam('loadpass'); + $oCriteria= new CDbCriteria; + $oCriteria->join="LEFT JOIN {{saved_control}} ON t.id={{saved_control}}.srid"; + $oCriteria->condition="{{saved_control}}.sid=:sid"; + $aParams=array(':sid'=>$surveyid); + if (isset($scid)) //Would only come from email : we don't need it .... { - $query .= "AND {{saved_control}}.scid={$scid}\n"; + $oCriteria->addCondition("{{saved_control}}.scid=:scid"); + $aParams[':scid']=$scid; } - $query .="AND {{saved_control}}.identifier = '".autoEscape($_SESSION['survey_'.$surveyid]['holdname'])."' "; + $oCriteria->addCondition("{{saved_control}}.identifier=:identifier"); + $aParams[':identifier']=$sLoadName; if (in_array(Yii::app()->db->getDriverName(), array('mssql', 'sqlsrv', 'dblib'))) { - $query .="AND CAST({{saved_control}}.access_code as varchar(32))= '".md5($_SESSION['survey_'.$surveyid]['holdpass'])."'\n"; + // To be validated with mssql, think it's not needed + $oCriteria->addCondition(" CAST({{saved_control}}.access_code as varchar(32))=:access_code"); } else { - $query .="AND {{saved_control}}.access_code = '".md5($_SESSION['survey_'.$surveyid]['holdpass'])."'\n";// md5 don't need to be escaped + $oCriteria->addCondition("{{saved_control}}.access_code=:access_code"); } + $aParams[':access_code']=md5($sLoadPass); } elseif (isset($_SESSION['survey_'.$surveyid]['srid'])) { - $query = "SELECT * FROM {$thissurvey['tablename']} - WHERE {$thissurvey['tablename']}.id=".$_SESSION['survey_'.$surveyid]['srid']."\n"; + $oCriteria= new CDbCriteria; + $oCriteria->condition="id=:id"; + $aParams=array(':id'=>$_SESSION['survey_'.$surveyid]['srid']); } else { return; } - $aRow = Yii::app()->db->createCommand($query)->queryRow();// TODO : use Yii for query - if (!$aRow) + $oCriteria->params=$aParams; + $oResponses=SurveyDynamic::model($surveyid)->find($oCriteria); + if (!$oResponses) { return false; } @@ -59,8 +68,22 @@ function loadanswers() //A match has been found. Let's load the values! //If this is from an email, build surveysession first $_SESSION['survey_'.$surveyid]['LEMtokenResume']=true; + + // If survey come from reload (GET or POST); some value need to be found on saved_control, not on survey + if (Yii::app()->request->getParam('loadall') == "reload") + { + $oSavedSurvey=SavedControl::model()->find("identifier=:identifier AND access_code=:access_code",array(":identifier"=>$sLoadName,":access_code"=>md5($sLoadPass))); + // We don't need to control if we have one, because we do the test before + $_SESSION['survey_'.$surveyid]['scid'] = $oSavedSurvey->scid; + $_SESSION['survey_'.$surveyid]['step'] = ($oSavedSurvey->saved_thisstep>1)?$oSavedSurvey->saved_thisstep:1; + $thisstep=$_SESSION['survey_'.$surveyid]['step']-1;// deprecated ? + $_SESSION['survey_'.$surveyid]['srid'] = $oSavedSurvey->srid;// Seems OK without + $_SESSION['survey_'.$surveyid]['refurl'] = $oSavedSurvey->refurl; + } + // Get if survey is been answered - $submitdate=$aRow['submitdate']; + $submitdate=$oResponses->submitdate; + $aRow=$oResponses->attributes; foreach ($aRow as $column => $value) { if ($column == "token") @@ -68,12 +91,7 @@ function loadanswers() $clienttoken=$value; $token=$value; } - elseif ($column == "saved_thisstep" && $thissurvey['alloweditaftercompletion'] != 'Y' ) - { - $_SESSION['survey_'.$surveyid]['step']=($value>1? $value:1) ; - $thisstep=$_SESSION['survey_'.$surveyid]['step']-1; - } - elseif ($column =='lastpage' && isset($_GET['token'])) + elseif ($column =='lastpage' && !isset($_SESSION['survey_'.$surveyid]['step'])) { if(is_null($submitdate) || $submitdate=="N") { @@ -95,14 +113,6 @@ function loadanswers() UpdateSessionGroupList($value); // to refresh the language strings in the group list session variable UpdateFieldArray(); // to refresh question titles and question text }*/ - elseif ($column == "scid") - { - $_SESSION['survey_'.$surveyid]['scid']=$value; - } - elseif ($column == "srid") - { - $_SESSION['survey_'.$surveyid]['srid']=$value; - } elseif ($column == "datestamp") { $_SESSION['survey_'.$surveyid]['datestamp']=$value; @@ -133,8 +143,8 @@ function loadanswers() } // if (in_array( } // else } // foreach + return true; } - return true; } function makegraph($currentstep, $total) @@ -465,9 +475,9 @@ function submittokens($quotaexit=false) $today = dateShift(date("Y-m-d H:i:s"), "Y-m-d H:i", Yii::app()->getConfig("timeadjust")); // check how many uses the token has left - $token = Token::model($surveyid)->findByAttributes(array('token' => $clienttoken)); + $token = Token::model($surveyid)->findByAttributes(array('token' => $clienttoken)); - if ($quotaexit==true) + if ($quotaexit==true) { $token->completed = 'Q'; $token->usesleft--; @@ -510,7 +520,6 @@ function submittokens($quotaexit=false) // if($token->completed == "Y" || $token->completed == $today) // { $from = "{$thissurvey['adminname']} <{$thissurvey['adminemail']}>"; - $to = $token->email; $subject=$thissurvey['email_confirm_subj']; $aReplacementVars=array(); @@ -534,7 +543,7 @@ function submittokens($quotaexit=false) $dateformatdatat=getDateFormatData($thissurvey['surveyls_dateformat']); $numberformatdatat = getRadixPointData($thissurvey['surveyls_numberformat']); $redata=array('thissurvey'=>$thissurvey); - $subject=templatereplace($subject,$aReplacementVars,$redata); + $subject=templatereplace($subject,$aReplacementVars,$redata,'',false,null,array(),true); $subject=html_entity_decode($subject,ENT_QUOTES,$emailcharset); @@ -549,7 +558,7 @@ function submittokens($quotaexit=false) $message=$thissurvey['email_confirm']; //$message=ReplaceFields($message, $fieldsarray, true); - $message=templatereplace($message,$aReplacementVars,$redata); + $message=templatereplace($message,$aReplacementVars,$redata,'',false,null,array(),true); if (!$ishtml) { $message=strip_tags(breakToNewline(html_entity_decode($message,ENT_QUOTES,$emailcharset))); @@ -560,7 +569,8 @@ function submittokens($quotaexit=false) } //Only send confirmation email if there is a valid email address - if (validateEmailAddress($to)) { + $sToAddress=validateEmailAddresses($token->email); + if ($sToAddress) { $aAttachments = unserialize($thissurvey['attachments']); $aRelevantAttachments = array(); @@ -579,7 +589,7 @@ function submittokens($quotaexit=false) } } } - SendEmailMessage($message, $subject, $to, $from, $sitename, $ishtml, null, $aRelevantAttachments); + SendEmailMessage($message, $subject, $sToAddress, $from, $sitename, $ishtml, null, $aRelevantAttachments); } // } else { // Leave it to send optional confirmation at closed token @@ -610,7 +620,7 @@ function sendSubmitNotifications($surveyid) $aReplacementVars=array(); - if ($thissurvey['allowsave'] == "Y" && isset($_SESSION['survey_'.$surveyid]['scid'])) + if ($thissurvey['allowsave'] == "Y" && isset($_SESSION['survey_'.$surveyid]['scid']) && isset($_SESSION['survey_'.$surveyid]['holdname'])) { $aReplacementVars['RELOADURL']="".Yii::app()->getController()->createUrl("/survey/index/sid/{$surveyid}/loadall/reload/scid/".$_SESSION['survey_'.$surveyid]['scid']."/loadname/".urlencode($_SESSION['survey_'.$surveyid]['holdname'])."/loadpass/".urlencode($_SESSION['survey_'.$surveyid]['holdpass'])."/lang/".urlencode($clang->langcode)); if ($bIsHTML) @@ -648,6 +658,7 @@ function sendSubmitNotifications($surveyid) $aRecipient=explode(";", ReplaceFields($thissurvey['emailnotificationto'],array('ADMINEMAIL' =>$thissurvey['adminemail'] ), true)); foreach($aRecipient as $sRecipient) { + $sRecipient=trim($sRecipient); if(validateEmailAddress($sRecipient)) { $aEmailNotificationTo[]=$sRecipient; @@ -666,6 +677,7 @@ function sendSubmitNotifications($surveyid) $aRecipient=explode(";", ReplaceFields($thissurvey['emailresponseto'],array('ADMINEMAIL' =>$thissurvey['adminemail'] ), true)); foreach($aRecipient as $sRecipient) { + $sRecipient=trim($sRecipient); if(validateEmailAddress($sRecipient)) { $aEmailResponseTo[]=$sRecipient; @@ -681,18 +693,17 @@ function sendSubmitNotifications($surveyid) { if (substr($sFieldname,0,4)=='gid_') { - - $ResultTableHTML .= "\t
        \n"; + $ResultTableHTML .= "\t\n"; $ResultTableText .="\n{$fname[0]}\n\n"; } elseif (substr($sFieldname,0,4)=='qid_') { - $ResultTableHTML .= "\t\n"; + $ResultTableHTML .= "\t\n"; $ResultTableText .="\n{$fname[0]}\n"; } else { - $ResultTableHTML .= "\t"; + $ResultTableHTML .= "\t\n"; $ResultTableText .=" {$fname[0]} {$fname[1]}: {$fname[2]}\n"; } } @@ -765,8 +776,8 @@ function sendSubmitNotifications($surveyid) } if (count($aEmailResponseTo)>0) { - $sMessage=templatereplace($thissurvey['email_admin_responses'],$aReplacementVars,$redata,'frontend_helper[1414]',($thissurvey['anonymized'] == "Y")); - $sSubject=templatereplace($thissurvey['email_admin_responses_subj'],$aReplacementVars,$redata,'frontend_helper[1415]',($thissurvey['anonymized'] == "Y")); + $sMessage=templatereplace($thissurvey['email_admin_responses'],$aReplacementVars,$redata,'frontend_helper[1414]',($thissurvey['anonymized'] == "Y"),NULL, array(), true); + $sSubject=templatereplace($thissurvey['email_admin_responses_subj'],$aReplacementVars,$redata,'frontend_helper[1415]',($thissurvey['anonymized'] == "Y"),NULL, array(), true); foreach ($aEmailResponseTo as $sRecipient) { if (!SendEmailMessage($sMessage, $sSubject, $sRecipient, $sFrom, $sitename, true, getBounceEmail($surveyid), $aRelevantAttachments)) @@ -834,6 +845,7 @@ function submitfailed($errormsg='') */ function buildsurveysession($surveyid,$preview=false) { + Yii::trace('start', 'survey.buildsurveysession'); global $secerror, $clienttoken; global $tokensexist; //global $surveyid; @@ -844,7 +856,7 @@ function buildsurveysession($surveyid,$preview=false) $languagechanger=makeLanguageChangerSurvey($sLangCode); if(!$preview) $preview=Yii::app()->getConfig('previewmode'); - $thissurvey = getSurveyInfo($surveyid,$sLangCode); + $thissurvey = getSurveyInfo($surveyid,$sLangCode); $_SESSION['survey_'.$surveyid]['templatename']=validateTemplateDir($thissurvey['template']); $_SESSION['survey_'.$surveyid]['templatepath']=getTemplatePath($_SESSION['survey_'.$surveyid]['templatename']).DIRECTORY_SEPARATOR; @@ -1001,12 +1013,12 @@ function buildsurveysession($surveyid,$preview=false) //check if token actually does exist // check also if it is allowed to change survey after completion - if ($thissurvey['alloweditaftercompletion'] == 'Y' ) { + if ($thissurvey['alloweditaftercompletion'] == 'Y' ) { $oTokenEntry = Token::model($surveyid)->findByAttributes(array('token'=>$clienttoken)); } else { $oTokenEntry = Token::model($surveyid)->usable()->incomplete()->findByAttributes(array('token' => $clienttoken)); } - if (!isset($oTokenEntry)) + if (!isset($oTokenEntry)) { //TOKEN DOESN'T EXIST OR HAS ALREADY BEEN USED. EXPLAIN PROBLEM AND EXIT @@ -1038,15 +1050,15 @@ function buildsurveysession($surveyid,$preview=false) isset($_SESSION['survey_'.$surveyid]['secanswer']) && $loadsecurity == $_SESSION['survey_'.$surveyid]['secanswer']) { - if ($thissurvey['alloweditaftercompletion'] == 'Y' ) + if ($thissurvey['alloweditaftercompletion'] == 'Y' ) { $oTokenEntry = Token::model($surveyid)->findByAttributes(array('token'=> $clienttoken)); } else { $oTokenEntry = Token::model($surveyid)->incomplete()->findByAttributes(array( - 'token' => $clienttoken - )); + 'token' => $clienttoken + )); } if (!isset($oTokenEntry)) { @@ -1168,26 +1180,16 @@ function buildsurveysession($surveyid,$preview=false) unset($_SESSION['survey_'.$surveyid]['groupReMap']); $_SESSION['survey_'.$surveyid]['fieldnamesInfo'] = Array(); - - //RL: multilingual support - if (isset($_GET['token']) && tableExists('{{tokens_'.$surveyid.'}}')) - { - - //get language from token (if one exists) - $tkquery2 = "SELECT * FROM {{tokens_".$surveyid."}} WHERE token='".$clienttoken."' AND (completed = 'N' or completed='')"; - //echo $tkquery2; - $result = dbExecuteAssoc($tkquery2) or safeDie ("Couldn't get tokens
        $tkquery
        "); //Checked - foreach ($result->readAll() as $rw) - { - $tklanguage=$rw['language']; - } - } + // Multi lingual support order : by REQUEST, if not by Token->language else by survey default language if (returnGlobal('lang',true)) { $language_to_set=returnGlobal('lang',true); - } elseif (isset($tklanguage)) + } + elseif (isset($oTokenEntry) && $oTokenEntry) { - $language_to_set=$tklanguage; + // If survey have token : we have a $oTokenEntry + // Can use $oTokenEntry = Token::model($surveyid)->findByAttributes(array('token'=>$clienttoken)); if we move on another function : this par don't validate the token validity + $language_to_set=$oTokenEntry->language; } else { @@ -1240,7 +1242,7 @@ function buildsurveysession($surveyid,$preview=false) } - if ($totalquestions == 0) //break out and crash if there are no questions! + if ($totalquestions == 0) //break out and crash if there are no questions! { sendCacheHeaders(); doHeader(); @@ -1263,7 +1265,7 @@ function buildsurveysession($surveyid,$preview=false) } //Perform a case insensitive natural sort on group name then question title of a multidimensional array - // usort($arows, 'groupOrderThenQuestionOrder'); + // usort($arows, 'groupOrderThenQuestionOrder'); //3. SESSION VARIABLE - insertarray //An array containing information about used to insert the data into the db at the submit stage @@ -1480,17 +1482,17 @@ function buildsurveysession($surveyid,$preview=false) $_SESSION['survey_'.$surveyid]['insertarray'][]=$field['fieldname']; //fieldarray ARRAY CONTENTS - // [0]=questions.qid, - // [1]=fieldname, - // [2]=questions.title, - // [3]=questions.question - // [4]=questions.type, - // [5]=questions.gid, - // [6]=questions.mandatory, - // [7]=conditionsexist, - // [8]=usedinconditions - // [8]=usedinconditions - // [9]=used in group.php for question count - // [10]=new group id for question in randomization group (GroupbyGroup Mode) + // [1]=fieldname, + // [2]=questions.title, + // [3]=questions.question + // [4]=questions.type, + // [5]=questions.gid, + // [6]=questions.mandatory, + // [7]=conditionsexist, + // [8]=usedinconditions + // [8]=usedinconditions + // [9]=used in group.php for question count + // [10]=new group id for question in randomization group (GroupbyGroup Mode) if (!isset($_SESSION['survey_'.$surveyid]['fieldarray'][$field['sid'].'X'.$field['gid'].'X'.$field['qid']])) { @@ -1544,22 +1546,22 @@ function buildsurveysession($surveyid,$preview=false) $startingValues=array(); if (isset($_GET)) { - foreach ($_GET as $k=>$v) + foreach ($_GET as $k=>$v) { - if (!in_array($k,$reservedGetValues) && isset($_SESSION['survey_'.$surveyid]['fieldmap'][$k])) + if (!in_array($k,$reservedGetValues) && isset($_SESSION['survey_'.$surveyid]['fieldmap'][$k])) { $startingValues[$k] = $v; } - else - { // Search question codes to use those for prefilling. - foreach($_SESSION['survey_'.$surveyid]['fieldmap'] as $sgqa => $details) - { - if ($details['title'] == $k) - { - $startingValues[$sgqa] = $v; - } - } - } + else + { // Search question codes to use those for prefilling. + foreach($_SESSION['survey_'.$surveyid]['fieldmap'] as $sgqa => $details) + { + if ($details['title'] == $k) + { + $startingValues[$sgqa] = $v; + } + } + } } } $_SESSION['survey_'.$surveyid]['startingValues']=$startingValues; @@ -1598,6 +1600,7 @@ function buildsurveysession($surveyid,$preview=false) } } } + Yii::trace('end', 'survey.buildsurveysession'); } /** @@ -1881,12 +1884,12 @@ function UpdateGroupList($surveyid, $language) */ function UpdateFieldArray() { - global $surveyid; - $clang = Yii::app()->lang; + global $surveyid; + $clang = Yii::app()->lang; if (isset($_SESSION['survey_'.$surveyid]['fieldarray'])) { - foreach ($_SESSION['survey_'.$surveyid]['fieldarray'] as $key => $value) + foreach ($_SESSION['survey_'.$surveyid]['fieldarray'] as $key => $value) { $questionarray = &$_SESSION['survey_'.$surveyid]['fieldarray'][$key]; $query = "SELECT title, question FROM {{questions}} WHERE qid=".$questionarray[0]." AND language='".$_SESSION['survey_'.$surveyid]['s_lang']."'"; @@ -1902,217 +1905,147 @@ function UpdateFieldArray() } /** -* checkQuota() returns quota information for the current survey -* @param string $checkaction - action the function must take after completing: -* enforce: Enforce the Quota action -* return: Return the updated quota array from getQuotaAnswers() -* @param string $surveyid - Survey identification number -* @return array - nested array, Quotas->Members->Fields, includes quota status and which members matched in session. +* checkCompletedQuota() returns matched quotas information for the current response +* @param integer $surveyid - Survey identification number +* @param bool $return - set to true to return information, false do the quota +* @return array - nested array, Quotas->Members->Fields, includes quota information matched in session. */ -function checkQuota($checkaction,$surveyid) +function checkCompletedQuota($surveyid,$return=false) { - global $clienttoken ; if (!isset($_SESSION['survey_'.$surveyid]['srid'])) { return; } - $thissurvey=getSurveyInfo($surveyid, $_SESSION['survey_'.$surveyid]['s_lang']); - $sTemplatePath=getTemplatePath($thissurvey['templatedir']); - - $global_matched = false; - $quota_info = getQuotaInformation($surveyid, $_SESSION['survey_'.$surveyid]['s_lang']); - $x=0; - - $clang = Yii::app()->lang; - - if(count($quota_info) > 0) // Quota's have to exist + static $aMatchedQuotas; // EM call 2 times quotas with 3 lines of php code, then use static. + if(!$aMatchedQuotas) { - // Check each quota on saved data to see if it is full - $querycond = array(); - foreach ($quota_info as $quota) + $aMatchedQuotas=array(); + $quota_info=$aQuotasInfo = getQuotaInformation($surveyid, $_SESSION['survey_'.$surveyid]['s_lang']); + // $aQuotasInfo have an 'active' key, we don't use it ? + if(!$aQuotasInfo || empty($aQuotasInfo)) + return $aMatchedQuotas; + // OK, we have some quota, then find if this $_SESSION have some set + $aPostedFields = explode("|",Yii::app()->request->getPost('fieldnames','')); // Needed for quota allowing update + foreach ($aQuotasInfo as $aQuotaInfo) { - if (count($quota['members']) > 0) // Quota can't be empty + $iMatchedAnswers=0; + $bPostedField=false; + // Array of field with quota array value + $aQuotaFields=array(); + // Array of fieldnames with relevance value : EM fill $_SESSION with default value even is unrelevant (em_manager_helper line 6548) + $aQuotaRelevantFieldnames=array(); + foreach ($aQuotaInfo['members'] as $aQuotaMember) { - $fields_list = array(); // Keep a list of fields for easy reference - $y=0; - // We need to make the conditions for the select statement here - unset($querycond); - // fill the array of value and query for each fieldnames - $fields_value_array = array(); - $fields_query_array = array(); - foreach($quota['members'] as $member) + $aQuotaFields[$aQuotaMember['fieldname']][] = $aQuotaMember['value']; + $aQuotaRelevantFieldnames[$aQuotaMember['fieldname']]=isset($_SESSION['survey_'.$surveyid]['relevanceStatus'][$aQuotaMember['qid']]) && $_SESSION['survey_'.$surveyid]['relevanceStatus'][$aQuotaMember['qid']]; + } + // For each field : test if actual responses is in quota (and is relevant) + foreach ($aQuotaFields as $sFieldName=>$aValues) + { + $bInQuota=isset($_SESSION['survey_'.$surveyid][$sFieldName]) && in_array($_SESSION['survey_'.$surveyid][$sFieldName],$aValues); + if($bInQuota && $aQuotaRelevantFieldnames[$sFieldName]) { - foreach($member['fieldnames'] as $fieldname) - { - if (!in_array($fieldname,$fields_list)) - { - $fields_list[] = $fieldname; - $fields_value_array[$fieldname] = array(); - $fields_query_array[$fieldname] = array(); - } - $fields_value_array[$fieldname][]=$member['value']; - $fields_query_array[$fieldname][]= dbQuoteID($fieldname)." = '{$member['value']}'"; - } + $iMatchedAnswers++; } - - // fill the $querycond array with each fields_query grouped by fieldname - foreach($fields_list as $fieldname) - { - $select_query = " ( ".implode(' OR ',$fields_query_array[$fieldname]).' )'; - $querycond[] = $select_query; - } - // Test if the fieldname is in the array of value in the session - foreach($quota['members'] as $member) - { - foreach($member['fieldnames'] as $fieldname) - { - if (isset($_SESSION['survey_'.$surveyid][$fieldname])) - { - if (in_array($_SESSION['survey_'.$surveyid][$fieldname],$fields_value_array[$fieldname])){ - $quota_info[$x]['members'][$y]['insession'] = "true"; - } - } - } - $y++; - } - unset($fields_query_array);unset($fields_value_array); - - // Lets only continue if any of the quota fields is in the posted page - $matched_fields = false; - if (isset($_POST['fieldnames'])) - { - $posted_fields = explode("|",$_POST['fieldnames']); - foreach ($fields_list as $checkfield) - { - if (in_array($checkfield,$posted_fields)) - { - $matched_fields = true; - $global_matched = true; - } - } - } - - // A field was submitted that is part of the quota - if ($matched_fields == true) - { - // Check the status of the quota, is it full or not - $sQuery = "SELECT count(id) FROM {{survey_".$surveyid."}} - WHERE ".implode(' AND ',$querycond)." "." - AND submitdate IS NOT NULL"; - $iRowCount = Yii::app()->db->createCommand($sQuery)->queryScalar(); - if ($iRowCount >= $quota['Limit']) // Quota is full!! - { - // Now we have to check if the quota matches in the current session - // This will let us know if this person is going to exceed the quota - $counted_matches = 0; - foreach($quota_info[$x]['members'] as $member) - { - if (isset($member['insession']) && $member['insession'] == "true") $counted_matches++; - } - - if($counted_matches == count($quota['members'])) - { - // They are going to exceed the quota if data is submitted - $quota_info[$x]['status']="matched"; - } - else - { - $quota_info[$x]['status']="notmatched"; - } - } - else - { - // Quota is no in danger of being exceeded. - $quota_info[$x]['status']="notmatched"; - } + if(in_array($sFieldName,$aPostedFields))// Need only one posted value + $bPostedField=true; + } + // Count only needed quotas + if($iMatchedAnswers==count($aQuotaFields) && ( $aQuotaInfo['action']!=2 || $bPostedField ) ) + { + if((int)$aQuotaInfo['qlimit'] < 1){ + $aMatchedQuotas[]=$aQuotaInfo; + }else{ + $iCompleted=getQuotaCompletedCount($surveyid, $aQuotaInfo['id']);// Return a string + if(ctype_digit($iCompleted) && ((int)$iCompleted >= (int)$aQuotaInfo['qlimit'])) // This remove invalid quota and not completed + $aMatchedQuotas[]=$aQuotaInfo; } } - $x++; } } - else - { - return false; - } + if ($return) + return $aMatchedQuotas; + if(empty($aMatchedQuotas)) + return; // Now we have all the information we need about the quotas and their status. - // Lets see what we should do now - if ($checkaction == 'return') + // We need to construct the page and do all needed action + $aSurveyInfo=getSurveyInfo($surveyid, $_SESSION['survey_'.$surveyid]['s_lang']); + $sTemplatePath=getTemplatePath($aSurveyInfo['templatedir']); + $sClientToken=isset($_SESSION['survey_'.$surveyid]['token'])?$_SESSION['survey_'.$surveyid]['token']:"";// {TOKEN} is take by $redata ... + + // $redata for templatereplace + $aDataReplacement = array( + 'thissurvey'=>$aSurveyInfo, + 'clienttoken'=>$sClientToken, + 'token'=>$sClientToken, + ); + // We take only the first matched quota, no need for each + $aMatchedQuota=$aMatchedQuotas[0]; + // If a token is used then mark the token as completed, do it before event : this allow plugin to update token information + $event = new PluginEvent('afterSurveyQuota'); + $event->set('surveyId', $surveyid); + $event->set('responseId', $_SESSION['survey_'.$surveyid]['srid']);// We allways have a responseId + $event->set('aMatchedQuotas', $aMatchedQuotas);// Give all the matched quota : the first is the active + App()->getPluginManager()->dispatchEvent($event); + $blocks = array(); + foreach ($event->getAllContent() as $blockData) { - return $quota_info; + /* @var $blockData PluginEventContent */ + $blocks[] = CHtml::tag('div', array('id' => $blockData->getCssId(), 'class' => $blockData->getCssClass()), $blockData->getContent()); } - elseif ($global_matched == true && $checkaction == 'enforce') + // Allow plugin to update message, url, url description and action + $sMessage=$event->get('message',$aMatchedQuota['quotals_message']); + $sUrl=$event->get('url',$aMatchedQuota['quotals_url']); + $sUrlDescription=$event->get('urldescrip',$aMatchedQuota['quotals_urldescrip']); + $sAction=$event->get('action',$aMatchedQuota['action']); + $sAutoloadUrl=$event->get('autoloadurl',$aMatchedQuota['autoload_url']); + // Construct the default message + $sMessage = templatereplace($sMessage,array(),$aDataReplacement, 'QuotaMessage', $aSurveyInfo['anonymized']!='N', NULL, array(), true ); + $sUrl = passthruReplace($sUrl, $aSurveyInfo); + $sUrl = templatereplace($sUrl,array(),$aDataReplacement, 'QuotaUrl', $aSurveyInfo['anonymized']!='N', NULL, array(), true ); + $sUrlDescription = templatereplace($sUrlDescription,array(),$aDataReplacement, 'QuotaUrldescription', $aSurveyInfo['anonymized']!='N', NULL, array(), true ); + // Doing the action and show the page + if ($sAction == "1" && $sClientToken) + submittokens(true); + + // Construction of default message inside quotamessage class + $quotaMessage = "
        \n"; + $quotaMessage.= "\t".$sMessage."\n"; + if($sUrl) + $quotaMessage.= "

        \t".$sUrlDescription."
        \n"; + // Add the navigator with Previous button if quota allow modification. + if ($sAction == "2") { - // Need to add Quota action enforcement here. - reset($quota_info); + $sQuotaStep= isset($_SESSION['survey_'.$surveyid]['step'])?$_SESSION['survey_'.$surveyid]['step']:0; // Surely not needed + $sNavigator = CHtml::htmlButton(gT("Previous"),array('type'=>'submit','id'=>"moveprevbtn",'value'=>$sQuotaStep,'name'=>'move','accesskey'=>'p','class'=>"submit button")); + $quotaMessage.= CHtml::form(array("/survey/index"), 'post', array('id'=>'limesurvey','name'=>'limesurvey')); + $quotaMessage.= templatereplace(file_get_contents($sTemplatePath."/navigator.pstpl"),array('NAVIGATOR'=>$sNavigator,'SAVE'=>''),$aDataReplacement); + $quotaMessage.= CHtml::hiddenField('sid',$surveyid); + $quotaMessage.= CHtml::hiddenField('token',$sClientToken);// Did we really need it ? + $quotaMessage.= CHtml::endForm(); + } + $quotaMessage.= "
        \n"; + // Add the plugin message before default message + $quotaMessage = implode("\n", $blocks) ."\n". $quotaMessage; - $tempmsg =""; - $found = false; - $redata = compact(array_keys(get_defined_vars())); - foreach($quota_info as $quota) - { - $quota['Message'] = templatereplace($quota['Message'],array(),$redata); - $quota['Url'] = passthruReplace($quota['Url'], $thissurvey); - $quota['Url'] = templatereplace($quota['Url'],array(),$redata); - $quota['UrlDescrip'] = templatereplace($quota['UrlDescrip'],array(),$redata); - if ((isset($quota['status']) && $quota['status'] == "matched") && (isset($quota['Action']) && $quota['Action'] == "1")) - { - // If a token is used then mark the token as completed - if (isset($clienttoken) && $clienttoken) - { - submittokens(true); - } - - sendCacheHeaders(); - if($quota['AutoloadUrl'] == 1 && $quota['Url'] != "") - { - header("Location: ".$quota['Url']); - killSurveySession($surveyid); - } - doHeader(); - - echo templatereplace(file_get_contents($sTemplatePath."/startpage.pstpl"),array(),$redata,'frontend_helper[2617]'); - echo "\t
        \n"; - echo "\t".$quota['Message']."

        \n"; - echo "\t".$quota['UrlDescrip']."
        \n"; - echo "\t
        \n"; - echo templatereplace(file_get_contents($sTemplatePath."/endpage.pstpl"),array(),$redata,'frontend_helper[2622]'); - doFooter(); + // Send page to user and end. + sendCacheHeaders(); + if($sAutoloadUrl == 1 && $sUrl != "") + { + if ($sAction == "1") killSurveySession($surveyid); - exit; - } - - if ((isset($quota['status']) && $quota['status'] == "matched") && (isset($quota['Action']) && $quota['Action'] == "2")) - { - - sendCacheHeaders(); - doHeader(); - - $redata = compact(array_keys(get_defined_vars())); - echo templatereplace(file_get_contents($sTemplatePath."/startpage.pstpl"),array(),$redata,'frontend_helper[2634]'); - echo "\t
        \n"; - echo "\t".$quota['Message']."

        \n"; - echo "\t".$quota['UrlDescrip']."
        \n"; - echo CHtml::form(array("/survey/index"), 'post', array('id'=>'limesurvey','name'=>'limesurvey'))." - - - - - - \n"; - echo "\t
        \n"; - echo templatereplace(file_get_contents($sTemplatePath."/endpage.pstpl"),array(),$redata,'frontend_helper[2644]'); - doFooter(); - exit; - } - } - } - else - { - // Unknown value - return false; + header("Location: ".$sUrl); } + doHeader(); + echo templatereplace(file_get_contents($sTemplatePath."/startpage.pstpl"),array(),$aDataReplacement); + echo $quotaMessage; + echo templatereplace(file_get_contents($sTemplatePath."/endpage.pstpl"),array(),$aDataReplacement); + doFooter(); + if ($sAction == "1") + killSurveySession($surveyid); + Yii::app()->end(); } /** @@ -2163,21 +2096,14 @@ function GetReferringUrl() // read it from server variable if(isset($_SERVER["HTTP_REFERER"])) { - if(!preg_match('/'.$_SERVER["SERVER_NAME"].'/', $_SERVER["HTTP_REFERER"])) + if (!Yii::app()->getConfig('strip_query_from_referer_url')) { - if (!Yii::app()->getConfig('strip_query_from_referer_url')) - { - return $_SERVER["HTTP_REFERER"]; - } - else - { - $aRefurl = explode("?",$_SERVER["HTTP_REFERER"]); - return $aRefurl[0]; - } + return $_SERVER["HTTP_REFERER"]; } else { - return '-'; + $aRefurl = explode("?",$_SERVER["HTTP_REFERER"]); + return $aRefurl[0]; } } else @@ -2191,7 +2117,7 @@ function GetReferringUrl() */ function display_first_page() { global $token, $surveyid, $thissurvey, $navigator; - $totalquestions = $_SESSION['survey_'.$surveyid]['totalquestions']; + $totalquestions = $_SESSION['survey_'.$surveyid]['totalquestions']; $clang = Yii::app()->lang; @@ -2296,7 +2222,6 @@ function SetSurveyLanguage($surveyid, $language) $clang = new limesurvey_lang($_SESSION['survey_'.$surveyid]['s_lang']); $thissurvey=getSurveyInfo($surveyid, @$_SESSION['survey_'.$surveyid]['s_lang']); Yii::app()->loadHelper('surveytranslator'); - $_SESSION['dateformats'] = getDateFormatData($thissurvey['surveyls_dateformat'],$_SESSION['survey_'.$surveyid]['s_lang']); LimeExpressionManager::SetEMLanguage($_SESSION['survey_'.$surveyid]['s_lang']); } else diff --git a/sources/application/helpers/pdfHelper.php b/sources/application/helpers/pdfHelper.php index 1a9b007..a6ad02b 100644 --- a/sources/application/helpers/pdfHelper.php +++ b/sources/application/helpers/pdfHelper.php @@ -36,8 +36,7 @@ class pdfHelper { $pdffont=PDF_FONT_NAME_DATA; } - $pdfcorefont=array("courier","helvetica","symbol","times","zapfdingbats"); - $pdffontsize=Yii::app()->getConfig('pdffontsize'); + $pdfcorefont=array("freesans","dejavusans","courier","helvetica","freemono","symbol","times","zapfdingbats"); if (in_array($pdffont,$pdfcorefont)) { $alternatepdffontfile=Yii::app()->getConfig('alternatepdffontfile'); @@ -46,6 +45,7 @@ class pdfHelper $pdffont = $alternatepdffontfile[$language];// Actually use only core font } } + $pdffontsize=Yii::app()->getConfig('pdffontsize'); if ($pdffontsize=='auto') { $pdffontsize=PDF_FONT_SIZE_MAIN; diff --git a/sources/application/helpers/qanda_helper.php b/sources/application/helpers/qanda_helper.php index 867482f..e466c6d 100644 --- a/sources/application/helpers/qanda_helper.php +++ b/sources/application/helpers/qanda_helper.php @@ -57,11 +57,11 @@ function setNoAnswerMode($thissurvey) elseif ($thissurvey['shownoanswer'] == 'N') { define('SHOW_NO_ANSWER', 0); - } + } else { define('SHOW_NO_ANSWER', 1); - } + } } /** @@ -89,13 +89,9 @@ function retrieveAnswers($ia) $qtitle=$ia[3]; $inputnames=array(); - // TMSW - eliminate this - get from LEM - //A bit of housekeeping to stop PHP Notices - $answer = ""; - if (!isset($_SESSION['survey_'.Yii::app()->getConfig('surveyID')][$ia[1]])) {$_SESSION['survey_'.Yii::app()->getConfig('surveyID')][$ia[1]] = "";} $aQuestionAttributes = getQuestionAttributeValues($ia[0], $ia[4]); //Create the question/answer html - + $answer = ""; // Previously in limesurvey, it was virtually impossible to control how the start of questions were formatted. // this is an attempt to allow users (or rather system admins) some control over how the starting text is formatted. $number = isset($ia[9]) ? $ia[9] : ''; @@ -128,8 +124,8 @@ function retrieveAnswers($ia) case 'D': //DATE $values = do_date($ia); // if a drop box style date was answered incompletely (dropbox), print an error/help message - if (($_SESSION['survey_'.Yii::app()->getConfig('surveyID')]['step'] != $_SESSION['survey_'.Yii::app()->getConfig('surveyID')]['maxstep']) || - ($_SESSION['survey_'.Yii::app()->getConfig('surveyID')]['step'] == $_SESSION['survey_'.Yii::app()->getConfig('surveyID')]['prevstep'])) + if (($_SESSION['survey_'.Yii::app()->getConfig('surveyID')]['step'] != $_SESSION['survey_'.Yii::app()->getConfig('surveyID')]['maxstep']) || + ($_SESSION['survey_'.Yii::app()->getConfig('surveyID')]['step'] == $_SESSION['survey_'.Yii::app()->getConfig('surveyID')]['prevstep'])) { if (isset($_SESSION['survey_'.Yii::app()->getConfig('surveyID')]['qattribute_answer'.$ia[1]])) $question_text['help'] = ''.$_SESSION['survey_'.Yii::app()->getConfig('surveyID')]['qattribute_answer'.$ia[1]].''; @@ -164,10 +160,6 @@ function retrieveAnswers($ia) break; case 'R': //RANKING STYLE $values=do_ranking($ia); - if (count($values[1]) > 1 && $aQuestionAttributes['hide_tip']==0) - { - $question_text['help'] = $clang->gT("Double-click or drag-and-drop items in the left list to move them to the right - your highest ranking item should be on the top right, moving through to your lowest ranking item."); - } break; case 'M': //Multiple choice checkbox $values=do_multiplechoice($ia); @@ -926,11 +918,10 @@ function do_5pointchoice($ia) } $answer .= " onclick=\"$checkconditionFunction(this.value, this.name, this.type)\" />\n\n\t\n"; } - if ($ia[6] != "Y" && SHOW_NO_ANSWER == 1) // Add "No Answer" option if question is not mandatory { $answer .= "\t
      • \ngetConfig('surveyID')][$ia[1]])) + if (!$_SESSION['survey_'.Yii::app()->getConfig('surveyID')][$ia[1]]) { $answer .= CHECKED; } @@ -984,7 +975,7 @@ function do_date($ia) $sMaxdatetailor=''; // date_min: Determine whether we have an expression, a full date (YYYY-MM-DD) or only a year(YYYY) - if (trim($aQuestionAttributes['date_min'])!='') + if (trim($aQuestionAttributes['date_min'])!='') { $date_min=$aQuestionAttributes['date_min']; if (preg_match("/^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])/",$date_min)) @@ -993,8 +984,8 @@ function do_date($ia) } elseif ((strlen($date_min)==4) && ($date_min>=1900) && ($date_min<=2099)) { - // backward compatibility: if only a year is given, add month and day - $mindate=$date_min.'-01-01'; + // backward compatibility: if only a year is given, add month and day + $mindate=$date_min.'-01-01'; } else { @@ -1012,7 +1003,7 @@ function do_date($ia) } // date_max: Determine whether we have an expression, a full date (YYYY-MM-DD) or only a year(YYYY) - if (trim($aQuestionAttributes['date_max'])!='') + if (trim($aQuestionAttributes['date_max'])!='') { $date_max=$aQuestionAttributes['date_max']; if (preg_match("/^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])/",$date_max)) @@ -1021,8 +1012,8 @@ function do_date($ia) } elseif ((strlen($date_max)==4) && ($date_max>=1900) && ($date_max<=2099)) { - // backward compatibility: if only a year is given, add month and day - $maxdate=$date_max.'-12-31'; + // backward compatibility: if only a year is given, add month and day + $maxdate=$date_max.'-12-31'; } else { @@ -1086,7 +1077,7 @@ function do_date($ia) \n"; switch ((int)trim($aQuestionAttributes['dropdown_dates_month_style'])) { - case 0: + case 0: $montharray=array( $clang->gT('Jan'), $clang->gT('Feb'), @@ -1101,7 +1092,7 @@ function do_date($ia) $clang->gT('Nov'), $clang->gT('Dec')); break; - case 1: + case 1: $montharray=array( $clang->gT('January'), $clang->gT('February'), @@ -1116,11 +1107,11 @@ function do_date($ia) $clang->gT('November'), $clang->gT('December')); break; - case 2: + case 2: $montharray=array('01','02','03','04','05','06','07','08','09','10','11','12'); break; } - + for ($i=1; $i<=12; $i++) { if ($i == $currentmonth) { @@ -1143,15 +1134,16 @@ function do_date($ia) * yearmin = Minimum year value for dropdown list, if not set default is 1900 * yearmax = Maximum year value for dropdown list, if not set default is 2037 * if full dates (format: YYYY-MM-DD) are given, only the year is used + * expressions are not supported because contents of dropbox cannot be easily updated dynamically */ - $yearmin = (int)substr(LimeExpressionManager::ProcessString($mindate),0,4); - if (!isset($yearmin) || $yearmin==0) + $yearmin = (int)substr($mindate,0,4); + if (!isset($yearmin) || $yearmin<1900 || $yearmin>2037) { $yearmin = 1900; } - $yearmax = (int)substr(LimeExpressionManager::ProcessString($maxdate), 0, 4); - if (!isset($yearmax) || $yearmax==0) + $yearmax = (int)substr($maxdate, 0, 4); + if (!isset($yearmax) || $yearmax<1900 || $yearmax>2037) { $yearmax = 2037; } @@ -1270,7 +1262,7 @@ function do_date($ia) { //register timepicker extension App()->getClientScript()->registerPackage('jqueryui-timepicker'); - + // Locale for datepicker and timpicker extension if ($clang->langcode !== 'en') @@ -1288,8 +1280,9 @@ function do_date($ia) $goodchars = str_replace( array("m","d","y"), "", $dateformatdetails['jsdate']); $goodchars = "0123456789".substr($goodchars,0,1); + // Max length of date : Get the date of 1999-12-30 at 32:59:59 to be sure to have space with non leading 0 format // "+1" makes room for a trailing space in date/time values - $iLength=strlen($dateformatdetails['dateformat'])+1; + $iLength=strlen(date($dateformatdetails['phpdate'],mktime(23,59,59,12,30,1999)))+1; // HTML for date question using datepicker @@ -1301,7 +1294,7 @@ function do_date($ia)

        "; - // adds min and max date as a hidden element to the page so EM creates the needed LEM_tailor_Q_XX sections + // adds min and max date as a hidden element to the page so EM creates the needed LEM_tailor_Q_XX sections $sHiddenHtml=""; if (!empty($sMindatetailor)) { @@ -1320,32 +1313,32 @@ function do_date($ia) // works with full dates (format: YYYY-MM-DD, js not needed), only a year, for backward compatibility (YYYY, js not needed), // variable names which refer to another date question or expressions. // Actual conversion of date formats is handled in LEMval() - - + + if (!empty($sMindatetailor) || !empty($sMaxdatetailor)) { - $answer.=""; } - + if (trim($aQuestionAttributes['hide_tip'])==1) { $answer.="

        ".sprintf($clang->gT('Format: %s'),$dateformatdetails['dateformat'])."

        "; } @@ -1583,7 +1576,7 @@ function do_list_dropdown($ia) $answer .= ' \n"; } - if (($_SESSION['survey_'.Yii::app()->getConfig('surveyID')][$ia[1]] || $_SESSION['survey_'.Yii::app()->getConfig('surveyID')][$ia[1]] != '') && $ia[6] != 'Y' && $ia[6] != 'Y' && SHOW_NO_ANSWER == 1) + if (($_SESSION['survey_'.Yii::app()->getConfig('surveyID')][$ia[1]] || $_SESSION['survey_'.Yii::app()->getConfig('surveyID')][$ia[1]] != '') && $ia[6] != 'Y' && SHOW_NO_ANSWER == 1) { if ($prefixStyle == 1) { $_prefix = ++$_rowNum . ') '; @@ -2034,11 +2027,13 @@ function do_listwithcomment($ia) } else //Dropdown list { - // --> START NEW FEATURE - SAVE $answer .= '
          '; - for ($i=1; $i<=$anscount; $i++) + for ($i=1; $i<=$iMaxLine; $i++) { $myfname=$ia[1].$i; $answer .= "\n
        • "; @@ -2151,7 +2146,7 @@ function do_ranking($ia) } $answer .= ""; $answer .= " + /> -
        • + diff --git a/sources/application/views/admin/survey/Question/subQuestion_view.php b/sources/application/views/admin/survey/Question/subQuestion_view.php index 6255dd1..bca9ba8 100644 --- a/sources/application/views/admin/survey/Question/subQuestion_view.php +++ b/sources/application/views/admin/survey/Question/subQuestion_view.php @@ -13,8 +13,9 @@ var otherisreserved='eT("Error: 'other' is a reserved keyword.",'js'); ?>'; var sImageURL ='getConfig('adminimageurl'); ?>'; var saveaslabletitle = 'eT('Save as label set','js'); ?>'; - var lanameurl = 'createUrl('/admin/labels/getAllSets'); ?>'; - var lasaveurl = 'createUrl('/admin/labels/ajaxSets'); ?>'; + var lanameurl = 'createUrl('/admin/labels/sa/getAllSets'); ?>'; + var lasaveurl = 'createUrl('/admin/labels/sa/ajaxSets'); ?>'; + var sCheckLabelURL = 'createUrl('/admin/questions/sa/ajaxchecklabel'); ?>'; var lsdetailurl = 'createUrl('/admin/questions/sa/ajaxlabelsetdetails'); ?>'; var lspickurl = 'createUrl('/admin/questions/sa/ajaxlabelsetpicker'); ?>'; var check = true; @@ -198,7 +199,7 @@

      • '; + echo CHtml::dropDownList($sElement_id, $select, $aList, $aHtmlOptions); + + // textfield preparation + if(empty($defaultValues) || $defaultValues == 'Y') + { + $sEmfield_css_class = 'hide'; + } + echo CHtml::textField ($sElement_id . '_EM', $emValue,array( + 'id' => $sElement_id . '_EM', + 'class' => $sEmfield_css_class, + 'width' => 100 + )); + echo '
      • '; + } + } + } \ No newline at end of file diff --git a/sources/application/views/admin/survey/activateSurvey_view.php b/sources/application/views/admin/survey/activateSurvey_view.php index ca38bcd..5b3ad56 100644 --- a/sources/application/views/admin/survey/activateSurvey_view.php +++ b/sources/application/views/admin/survey/activateSurvey_view.php @@ -44,7 +44,7 @@ eT("Please check these settings now, then click the button below.");?> 'form44')); ?> - +
        • -
        @@ -51,7 +51,7 @@

        eT("The responses to this survey are no longer available using LimeSurvey."); ?>

        - gT("The responses table has been renamed to: ")." ".$sNewSurveyTableName; ?>
        + gT("The responses table has been renamed to: ")." ".$sNewSurveyTableName; ?>
        gT("The tokens table associated with this survey has been renamed to: ")." $tnewtable
        "; diff --git a/sources/application/views/admin/survey/deleteSurvey_view.php b/sources/application/views/admin/survey/deleteSurvey_view.php index c2b95e7..efe1f2f 100644 --- a/sources/application/views/admin/survey/deleteSurvey_view.php +++ b/sources/application/views/admin/survey/deleteSurvey_view.php @@ -31,8 +31,11 @@ eT("This survey has an associated tokens table. If you delete this survey this tokens table will be deleted. We recommend that you export or backup these tokens before deleting this survey."); ?>

        -

        - ', '_top')" /> - ', '_top')" /> - + createUrl("admin/survey/sa/delete/surveyid/{$surveyid}"), 'post');?> + + + ', '_top')" /> +
          \ No newline at end of file diff --git a/sources/application/views/admin/survey/editSurvey_view.php b/sources/application/views/admin/survey/editSurvey_view.php index 5059977..4af826b 100644 --- a/sources/application/views/admin/survey/editSurvey_view.php +++ b/sources/application/views/admin/survey/editSurvey_view.php @@ -17,10 +17,18 @@ $controller->renderPartial('/admin/survey/subview/tabPanelIntegration_view',$data); ?> - +hasSurveyPermission($surveyid,'surveysettings','update')){?> +

        + + renderPartial('/admin/survey/subview/tabResourceManagement_view',$data); @@ -28,12 +36,7 @@ ?> -hasSurveyPermission($surveyid,'surveysettings','update')) - {?> -

        -


        +
          diff --git a/sources/application/views/admin/survey/organizeGroupsAndQuestions_view.php b/sources/application/views/admin/survey/organizeGroupsAndQuestions_view.php index f92adf2..061c1b6 100644 --- a/sources/application/views/admin/survey/organizeGroupsAndQuestions_view.php +++ b/sources/application/views/admin/survey/organizeGroupsAndQuestions_view.php @@ -1,4 +1,4 @@ -getClientScript()->registerPackage('jquery-nestedSortable'); App()->getClientScript()->registerScriptFile(Yii::app()->getConfig('adminscripts') . 'organize.js'); ?> @@ -12,7 +12,7 @@ -
        • ' class='group-item' data-level='group'>
          +
        • ' class='group-item' data-level='group'>
            diff --git a/sources/application/views/admin/survey/subview/tabGeneralEditSurvey_view.php b/sources/application/views/admin/survey/subview/tabGeneralEditSurvey_view.php index 76e21c4..8d535f7 100644 --- a/sources/application/views/admin/survey/subview/tabGeneralEditSurvey_view.php +++ b/sources/application/views/admin/survey/subview/tabGeneralEditSurvey_view.php @@ -1,6 +1,12 @@ getController(); + $sConfirmLanguage="$(document).on('submit','#addnewsurvey',function(){\n" + . " if(!UpdateLanguageIDs(mylangs,'".gT("All questions, answers, etc for removed languages will be lost. Are you sure?", "js")."')){\n" + . " return false;\n" + . " }\n" + . "});\n"; + Yii::app()->getClientScript()->registerScript('confirmLanguage',$sConfirmLanguage,CClientScript::POS_BEGIN); ?>
              diff --git a/sources/application/views/admin/survey/subview/tabNotification_view.php b/sources/application/views/admin/survey/subview/tabNotification_view.php index 8d54c0e..e0752ba 100644 --- a/sources/application/views/admin/survey/subview/tabNotification_view.php +++ b/sources/application/views/admin/survey/subview/tabNotification_view.php @@ -1,19 +1,13 @@ -
                - - - +
                +
                • - + 70)) ?>
                • -
                • - + 70)) ?>
                • - - -
                • eT("Responses will be date stamped."); } ?> eT("Cannot be changed"); ?> - + - + gT("Yes"),"N"=>gT("No")),array('onchange'=>'alertDateStampAnonymization();')); ?>
                • -
                • - eT("Responses will not have the IP address logged."); @@ -49,25 +30,12 @@ $clang->eT("Responses will have the IP address logged"); } ?> eT("Cannot be changed"); ?> - ' /> + - + gT("Yes"),"N"=>gT("No"))); ?> -
                • -
                • @@ -77,96 +45,42 @@ $clang->eT("Responses will have their referring URL logged."); } ?> eT("Cannot be changed"); ?> - ' /> + - + gT("Yes"),"N"=>gT("No"))); ?>
                • - eT("Timings will not be saved.");} else { $clang->eT("Timings will be saved.");} ?> eT("Cannot be changed"); ?> - ' /> + - -
                • + gT("Yes"),"N"=>gT("No"))); ?> - +
                • -
                • - + gT("Yes"),"N"=>gT("No"))); ?> +
                • -
                • + gT("Yes"),"N"=>gT("No"))); ?> +
                • - ' name='googleanalyticsapikey' id='googleanalyticsapikey' size='20'/> + 20)) ?>
                • -
                • + gT("Do not use Google Analytics"),"1"=>gT("Default Google Analytics"),"2"=>gT("Survey name-[SID]/Group name"))); ?> + -
                +
              +
              diff --git a/sources/application/views/admin/survey/subview/tabTokens_view.php b/sources/application/views/admin/survey/subview/tabTokens_view.php index 417d43d..c73cd87 100644 --- a/sources/application/views/admin/survey/subview/tabTokens_view.php +++ b/sources/application/views/admin/survey/subview/tabTokens_view.php @@ -1,5 +1,5 @@
                -
              • @@ -38,21 +45,9 @@
              • +
              • - - -
              • -
              • - +
              • + + + +
              • + + +
              • +
              • + diff --git a/sources/application/views/admin/token/bounce.php b/sources/application/views/admin/token/bounce.php index 38d227e..173587c 100644 --- a/sources/application/views/admin/token/bounce.php +++ b/sources/application/views/admin/token/bounce.php @@ -1,3 +1,6 @@ +getClientScript()->registerScriptFile(Yii::app()->getConfig('adminscripts') . "tokenbounce.js"); +?>
                eT("Bounce settings"); ?>
                'bouncesettings', 'name'=>'bouncesettings', 'class'=>'form30')); ?> diff --git a/sources/application/views/admin/token/browse.php b/sources/application/views/admin/token/browse.php index 32aad88..f1842e7 100644 --- a/sources/application/views/admin/token/browse.php +++ b/sources/application/views/admin/token/browse.php @@ -1,21 +1,11 @@ session['adminlang']); - if (Yii::app()->session['adminlang'] != 'auto') + $aLanguageNames=array(); + foreach ($aLanguages as $sCode => $sName) { - $lname[0] = Yii::app()->session['adminlang'] . ":" . $getlangvalues[Yii::app()->session['adminlang']]['description']; + $aLanguageNames[] = $sCode . ":" . str_replace(";", " -", $sName); } - foreach ($getlangvalues as $keycode => $keydesc) - { - if (Yii::app()->session['adminlang'] != $keycode) - { - $cleanlangdesc = str_replace(";", " -", $keydesc['description']); - $lname[$j] = $keycode . ":" . $cleanlangdesc; - $j++; - } - } - $langnames = implode(";", $lname); + $aLanguageNames = implode(";", $aLanguageNames); // Build the column information : columnname=>Description,search(true/false) (type ?) // Don't add id : because we don't really need it. This different from columnNames (no action). // TODO: Merge columnNames and aTokenColumns : need more option (name,index,search, type, editable ...) @@ -46,7 +36,11 @@ { foreach ($attributes as $sFieldname=>$aData) { - $uidNames[] = '{ "name":"' . $sFieldname . '", "index":"' . $sFieldname . '", "sorttype":"string", "sortable": true, "align":"left", "editable":true, "width":75}'; + $customEdit = ''; + if($aData['mandatory'] == 'Y'){ + $customEdit = ', editrules:{custom:true, custom_func:checkMandatoryAttr}'; + } + $uidNames[] = '{ "name":"' . $sFieldname . '", "index":"' . $sFieldname . '", "sorttype":"string", "sortable": true, "align":"left", "editable":true, "width":75' . $customEdit . '}'; $aColumnHeaders[]=$aData['description']; } $columnNames='"'.implode('","',$aColumnHeaders).'"'; @@ -91,11 +85,11 @@ var sRefreshTitle ='eT("Reload participant list",'js');?>'; var noSearchResultsTxt = 'eT("No survey participants matching the search criteria",'js');?>'; var sFind= 'eT("Filter",'js');?>'; - var remindurl = "getController()->createUrl("admin/tokens/sa/email/action/remind/surveyid/{$surveyid}/tokenids/|"); ?>"; + var remindurl = "getController()->createUrl("admin/tokens/sa/email/action/remind/surveyid/{$surveyid}"); ?>"; var attMapUrl = "createUrl("admin/participants/sa/attributeMapToken/sid/");?>"; var invitemsg = "eT("Send an invitation email to the selected entries (if they have not yet been sent an invitation email)"); ?>" var remindmsg = "eT("Send a reminder email to the selected entries (if they have already received the invitation email)"); ?>" - var inviteurl = "getController()->createUrl("admin/tokens/sa/email/action/invite/surveyid/{$surveyid}/tokenids/|"); ?>"; + var inviteurl = "getController()->createUrl("admin/tokens/sa/email/action/invite/surveyid/{$surveyid}"); ?>"; var sSummary = 'eT("Summary",'js');?>'; var showDelButton = ; var showBounceButton = ; @@ -123,7 +117,7 @@ { "name":"email", "index":"email","align":"left","width":170, "sorttype":"string", "sortable": true, "editable":true}, { "name":"emailstatus", "index":"emailstatus","align":"left","width":80,"sorttype":"string", "sortable": true, "editable":true}, { "name":"token", "index":"token","align":"left", "sorttype":"int", "sortable": true,"width":150,"editable":true}, - { "name":"language", "index":"language","align":"left", "sorttype":"int", "sortable": true,"width":100,"editable":true, "formatter":'select', "edittype":"select", "editoptions":{"value":""}}, + { "name":"language", "index":"language","align":"left", "sorttype":"int", "sortable": true,"width":100,"editable":true, "formatter":'select', "edittype":"select", "editoptions":{"value":""}}, { "name":"sent", "index":"sent","align":"left", "sorttype":"int", "sortable": true,"width":130,"editable":true}, { "name":"remindersent", "index":"remindersent","align":"left", "sorttype":"int", "sortable": true,"width":80,"editable":true}, { "name":"remindercount", "index":"remindercount","align":"right", "sorttype":"int", "sortable": true,"width":80,"editable":true}, @@ -133,6 +127,13 @@ { "name":"validuntil", "index":"validuntil","align":"left", "sorttype":"int", "sortable": true,"width":160,"editable":true} ]; var colInformation= + + function checkMandatoryAttr(value, colname) { + if (value == '') + return [false, 'eT("Please enter a value for: ") ?>'+colname]; + else + return [true,'']; + }
              • gT("%s records imported"), $xz); ?>
              - +
              eT('Warnings'); ?>
              @@ -44,7 +44,7 @@ @@ -62,7 +62,21 @@
            - + + + +
          1. + gT("%s records with invalid information"), count($errorlist)); ?> + [eT("List"); ?>] + +
          2. +
        diff --git a/sources/application/views/admin/token/email.php b/sources/application/views/admin/token/email.php index 39332ce..ea066ff 100644 --- a/sources/application/views/admin/token/email.php +++ b/sources/application/views/admin/token/email.php @@ -68,25 +68,31 @@
        • - "; ?>" />
        • + ",array('size'=>50)); ?> +
        • -
        • + 83)); ?> +
        • - - gT("Invitation email:", "js") . "](" . $language . ")", $surveyid, '', '', "tokens"); ?> + 80,'rows'=>20)); ?> + gT("Invitation email:", "js") . "](" . $language . ")", $surveyid, '', '', "tokens"); ?>
        + 0) + { ?> +

        + +

        +

        - + gT("Yes"),"N"=>gT("No"))); ?>

        diff --git a/sources/application/views/admin/token/emailpost.php b/sources/application/views/admin/token/emailpost.php index b087e60..93c55cd 100644 --- a/sources/application/views/admin/token/emailpost.php +++ b/sources/application/views/admin/token/emailpost.php @@ -5,7 +5,7 @@ gT("Sending to Token IDs") . ": " . implode(", ", $tokenids) . ")"; + echo " (" . $clang->gT("Sending to Token IDs") . ": " . short_implode(", ", "-", $tokenids) . ")"; } ?>

        diff --git a/sources/application/views/admin/token/exportdialog.php b/sources/application/views/admin/token/exportdialog.php index 4b2d42c..586dc5a 100644 --- a/sources/application/views/admin/token/exportdialog.php +++ b/sources/application/views/admin/token/exportdialog.php @@ -32,7 +32,7 @@ if($resultr){ } ?> -

      • +
      •  
      • diff --git a/sources/application/views/admin/token/remind.php b/sources/application/views/admin/token/remind.php index ea9a08a..ea88703 100644 --- a/sources/application/views/admin/token/remind.php +++ b/sources/application/views/admin/token/remind.php @@ -68,7 +68,7 @@ { ?>
      • -
      • +
      • diff --git a/sources/application/views/admin/token/tokenbar.php b/sources/application/views/admin/token/tokenbar.php index 6ec6158..870f2b0 100644 --- a/sources/application/views/admin/token/tokenbar.php +++ b/sources/application/views/admin/token/tokenbar.php @@ -78,8 +78,10 @@ App()->getClientScript()->registerPackage('jqueryui-timepicker'); - diff --git a/sources/application/views/admin/token/tokenform.php b/sources/application/views/admin/token/tokenform.php index 8b3333a..1368282 100644 --- a/sources/application/views/admin/token/tokenform.php +++ b/sources/application/views/admin/token/tokenform.php @@ -43,7 +43,7 @@ echo $email; } ?>" />
      • -
      • + + + + - + @@ -62,9 +62,9 @@ function dirReport($dir, $write, $clang) - + @@ -141,7 +141,7 @@ function dirReport($dir, $write, $clang) - +
         
        \n"; - + if(Permission::model()->hasSurveyPermission($surveyid,'surveysecurity','update')) { if($PermissionRow['uid']!=Yii::app()->user->getId() || Permission::model()->hasGlobalPermission('superadmin','read')) // Can not update own security @@ -171,7 +171,7 @@ class surveypermission extends Survey_Common_Action { } else { - + } if(Permission::model()->hasSurveyPermission($surveyid,'surveysecurity','create')) { @@ -182,7 +182,7 @@ class surveypermission extends Survey_Common_Action { . "gT("Please select a user first","js")."'); return false;}\"/>" . "" . "\n"; - + $surveysecurity .= CHtml::form(array("admin/surveypermission/sa/addusergroup/surveyid/{$surveyid}"), 'post', array('class'=>"form44"))."
        • \n" . "
        {$aCRUDPermissions[
        {$aCRUDPermissions['title']}
        {$fname[0]}
        ".strip_tags($fname[0])."
        {$fname[0]}
        ".strip_tags($fname[0])."
        {$fname[0]} {$fname[1]}{$fname[2]}
        ".strip_tags("{$fname[0]} {$fname[1]}")."".CHtml::encode($fname[2])."
        -

        " />

        +

        + eT("Total screened out"); ?> + + +
        eT("Total surveys completed"); ?> diff --git a/sources/application/views/admin/translate/translateformheader_view.php b/sources/application/views/admin/translate/translateformheader_view.php index dec6ff0..2f2d740 100644 --- a/sources/application/views/admin/translate/translateformheader_view.php +++ b/sources/application/views/admin/translate/translateformheader_view.php @@ -10,6 +10,7 @@ eT("Current"); ?>
        eT("PHP version"); ?> 5.3.0+
        eT("Minimum memory available"); ?> 64MBeT("Too low"); ?>: return_bytes(ini_get('memory_limit'))/1024/1024; ?>MB - eT("Unlimited"); else { echo $this->return_bytes(ini_get('memory_limit'))/1024/1024; echo ' MB';} ?>eT("Too low"); ?>: MB + eT("Unlimited"); else { echo convertPHPSizeToBytes(ini_get('memory_limit'))/1024/1024; echo ' MB';} ?>
        eT("PHP PDO driver library"); ?>Check
        diff --git a/sources/application/views/plugins/configure.php b/sources/application/views/plugins/configure.php index f301e72..4d2d13a 100644 --- a/sources/application/views/plugins/configure.php +++ b/sources/application/views/plugins/configure.php @@ -1,8 +1,11 @@ widget('ext.SettingsWidget.SettingsWidget', array( + $title = isset($properties['pluginName']) ? sprintf(gT("Settings for plugin: %s"), $properties['pluginName']) : null; + if (is_null($title)) $title = isset($plugin['name']) ? sprintf(gT("Settings for plugin %s"), $plugin['name']) : null; + + $this->widget('ext.SettingsWidget.SettingsWidget', array( 'settings' => $settings, - 'title' => isset($plugin['name']) ? sprintf(gT("Settings for plugin %s"), $plugin['name']) : null, + 'title' => $title, 'formHtmlOptions' => array( 'id' => "pluginsettings-{$plugin['name']}", ), @@ -15,4 +18,4 @@ ) ) )); -?> \ No newline at end of file +?> diff --git a/sources/application/views/surveys/publicSurveyList.php b/sources/application/views/surveys/publicSurveyList.php index f258c5a..ed67857 100644 --- a/sources/application/views/surveys/publicSurveyList.php +++ b/sources/application/views/surveys/publicSurveyList.php @@ -5,7 +5,7 @@ { $list .= CHtml::openTag('li'); - $list .= CHtml::link($survey->localizedTitle, array('survey/index', 'sid' => $survey->sid, 'lang' => App()->lang->langcode), array('class' => 'surveytitle')); + $list .= CHtml::link(stripJavaScript($survey->localizedTitle), array('survey/index', 'sid' => $survey->sid, 'lang' => App()->lang->langcode), array('class' => 'surveytitle')); if ($survey->publicstatistics == "Y") { $list .= CHtml::link('(' . App()->lang->gT('View statistics') . ')', array('statistics_user/action', 'surveyid' => $survey->sid,'language' => App()->lang->langcode)); @@ -20,7 +20,7 @@ { $list .= CHtml::openTag('li'); - $list .= CHtml::link($survey->localizedTitle, array('survey/index', 'sid' => $survey->sid, 'lang' => App()->lang->langcode), array('class' => 'surveytitle')); + $list .= CHtml::link(stripJavaScript($survey->localizedTitle), array('survey/index', 'sid' => $survey->sid, 'lang' => App()->lang->langcode), array('class' => 'surveytitle')); $list .= CHtml::closeTag('li'); $list .= CHtml::tag('div', array( 'data-regformsurvey' => $survey->sid, diff --git a/sources/docs/demosurveys/ls205_sample_survey_multilingual.lss b/sources/docs/demosurveys/ls205_sample_survey_multilingual.lss index 94a35f5..26b29e2 100644 --- a/sources/docs/demosurveys/ls205_sample_survey_multilingual.lss +++ b/sources/docs/demosurveys/ls205_sample_survey_multilingual.lss @@ -1,7 +1,7 @@ Survey - 177 + 178 fr de-informal @@ -19,7 +19,7 @@ - + @@ -28,7 +28,7 @@ - + @@ -37,7 +37,7 @@ - + @@ -46,7 +46,7 @@ - + @@ -55,7 +55,7 @@ - + @@ -64,7 +64,7 @@ - + @@ -73,7 +73,7 @@ - + @@ -82,7 +82,7 @@ - + @@ -91,7 +91,7 @@ - + @@ -100,7 +100,7 @@ - + @@ -109,7 +109,7 @@ - + @@ -118,7 +118,7 @@ - + @@ -127,7 +127,7 @@ - + @@ -136,7 +136,7 @@ - + @@ -145,7 +145,7 @@ - + @@ -154,7 +154,7 @@ - + @@ -163,7 +163,7 @@ - + @@ -172,7 +172,7 @@ - + @@ -181,7 +181,7 @@ - + @@ -190,7 +190,7 @@ - + @@ -199,7 +199,7 @@ - + @@ -208,7 +208,7 @@ - + @@ -217,7 +217,7 @@ - + @@ -226,7 +226,7 @@ - + @@ -235,7 +235,7 @@ - + @@ -244,7 +244,7 @@ - + @@ -253,7 +253,7 @@ - + @@ -262,7 +262,7 @@ - + @@ -271,7 +271,7 @@ - + @@ -280,7 +280,7 @@ - + @@ -289,7 +289,7 @@ - + @@ -298,7 +298,7 @@ - + @@ -307,7 +307,7 @@ - + @@ -316,7 +316,7 @@ - + @@ -325,7 +325,7 @@ - + @@ -334,7 +334,7 @@ - + @@ -343,7 +343,7 @@ - + @@ -352,7 +352,7 @@ - + @@ -361,7 +361,7 @@ - + @@ -370,7 +370,7 @@ - + @@ -379,7 +379,7 @@ - + @@ -388,7 +388,7 @@ - + @@ -397,7 +397,7 @@ - + @@ -406,7 +406,7 @@ - + @@ -415,7 +415,7 @@ - + @@ -424,7 +424,7 @@ - + @@ -433,7 +433,7 @@ - + @@ -442,7 +442,7 @@ - + @@ -451,7 +451,7 @@ - + @@ -460,7 +460,7 @@ - + @@ -469,7 +469,7 @@ - + @@ -478,7 +478,7 @@ - + @@ -487,7 +487,7 @@ - + @@ -496,7 +496,7 @@ - + @@ -505,7 +505,7 @@ - + @@ -514,7 +514,7 @@ - + @@ -523,7 +523,7 @@ - + @@ -532,7 +532,7 @@ - + @@ -541,7 +541,7 @@ - + @@ -550,7 +550,7 @@ - + @@ -559,7 +559,7 @@ - + @@ -568,7 +568,7 @@ - + @@ -577,7 +577,7 @@ - + @@ -586,7 +586,7 @@ - + @@ -595,7 +595,7 @@ - + @@ -604,7 +604,7 @@ - + @@ -613,7 +613,7 @@ - + @@ -622,7 +622,7 @@ - + @@ -631,7 +631,7 @@ - + @@ -640,7 +640,7 @@ - + @@ -649,7 +649,7 @@ - + @@ -658,7 +658,7 @@ - + @@ -667,7 +667,7 @@ - + @@ -676,7 +676,7 @@ - + @@ -685,7 +685,7 @@ - + @@ -694,7 +694,7 @@ - + @@ -703,7 +703,7 @@ - + @@ -712,7 +712,7 @@ - + @@ -721,7 +721,7 @@ - + @@ -730,7 +730,7 @@ - + @@ -739,7 +739,7 @@ - + @@ -748,7 +748,7 @@ - + @@ -757,7 +757,7 @@ - + @@ -766,7 +766,7 @@ - + @@ -775,7 +775,7 @@ - + @@ -784,7 +784,7 @@ - + @@ -793,7 +793,7 @@ - + @@ -802,7 +802,7 @@ - + @@ -811,7 +811,7 @@ - + @@ -820,7 +820,7 @@ - + @@ -829,7 +829,7 @@ - + @@ -838,7 +838,7 @@ - + @@ -847,7 +847,7 @@ - + @@ -856,7 +856,7 @@ - + @@ -865,7 +865,7 @@ - + @@ -874,7 +874,7 @@ - + @@ -883,7 +883,7 @@ - + @@ -892,7 +892,7 @@ - + @@ -901,7 +901,7 @@ - + @@ -910,7 +910,7 @@ - + @@ -919,7 +919,7 @@ - + @@ -928,7 +928,7 @@ - + @@ -937,7 +937,7 @@ - + @@ -946,7 +946,7 @@ - + @@ -955,7 +955,7 @@ - + @@ -964,7 +964,7 @@ - + @@ -973,7 +973,7 @@ - + @@ -982,7 +982,7 @@ - + @@ -991,7 +991,7 @@ - + @@ -1000,7 +1000,7 @@ - + @@ -1009,7 +1009,7 @@ - + @@ -1018,7 +1018,7 @@ - + @@ -1027,7 +1027,7 @@ - + @@ -1036,7 +1036,7 @@ - + @@ -1045,7 +1045,7 @@ - + @@ -1054,7 +1054,7 @@ - + @@ -1063,7 +1063,7 @@ - + @@ -1072,7 +1072,7 @@ - + @@ -1081,7 +1081,7 @@ - + @@ -1090,7 +1090,7 @@ - + @@ -1099,7 +1099,7 @@ - + @@ -1108,7 +1108,7 @@ - + @@ -1117,7 +1117,7 @@ - + @@ -1126,7 +1126,7 @@ - + @@ -1135,7 +1135,7 @@ - + @@ -1144,7 +1144,7 @@ - + @@ -1153,7 +1153,7 @@ - + @@ -1162,7 +1162,7 @@ - + @@ -1171,7 +1171,7 @@ - + @@ -1180,7 +1180,7 @@ - + @@ -1189,7 +1189,7 @@ - + @@ -1198,7 +1198,7 @@ - + @@ -1207,7 +1207,7 @@ - + @@ -1216,7 +1216,7 @@ - + @@ -1225,7 +1225,7 @@ - + @@ -1234,7 +1234,7 @@ - + @@ -1243,7 +1243,7 @@ - + @@ -1252,7 +1252,7 @@ - + @@ -1261,7 +1261,7 @@ - + @@ -1270,7 +1270,7 @@ - + @@ -1279,7 +1279,7 @@ - + @@ -1288,7 +1288,7 @@ - + @@ -1297,7 +1297,7 @@ - + @@ -1306,7 +1306,7 @@ - + @@ -1315,7 +1315,7 @@ - + @@ -1324,7 +1324,7 @@ - + @@ -1333,7 +1333,7 @@ - + @@ -1342,7 +1342,7 @@ - + @@ -1351,7 +1351,7 @@ - + @@ -1360,7 +1360,7 @@ - + @@ -1369,7 +1369,7 @@ - + @@ -1378,7 +1378,7 @@ - + @@ -1387,7 +1387,7 @@ - + @@ -1396,7 +1396,7 @@ - + @@ -1405,7 +1405,7 @@ - + @@ -1414,7 +1414,7 @@ - + @@ -1423,7 +1423,7 @@ - + @@ -1432,7 +1432,7 @@ - + @@ -1441,7 +1441,7 @@ - + @@ -1463,136 +1463,136 @@ - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + @@ -1610,39 +1610,39 @@ - + - + - + - + - + - + - + - + - + @@ -1650,7 +1650,7 @@ - + @@ -1658,7 +1658,7 @@ - + @@ -1666,33 +1666,33 @@ - + - + - + - + - + - + - + - + @@ -1712,7 +1712,7 @@ - + @@ -1721,7 +1721,7 @@ - + @@ -1730,7 +1730,7 @@ - + @@ -1740,7 +1740,7 @@ - + @@ -1750,7 +1750,7 @@ - + @@ -1759,7 +1759,7 @@ - + @@ -1768,7 +1768,7 @@ - + @@ -1777,7 +1777,7 @@ - + @@ -1786,7 +1786,7 @@ - + @@ -1796,7 +1796,7 @@ - + @@ -1806,7 +1806,7 @@ - + @@ -1815,7 +1815,7 @@ - + @@ -1824,71 +1824,71 @@ - + - Limesurvey unterstützt eine Vielzahl von Bedingungen und Filtern zum Anzeigen und Vestecken von Fragen. Dies umfasst Bedingungen mit UND- sowie ODER-Verknüpfungen. Weitere Informationen finden sich in der LimeSurvey Dokumentation.

        + Limesurvey unterstützt eine Vielzahl von Bedingungen und Filtern zum Anzeigen und Vestecken von Fragen. Dies umfasst Bedingungen mit UND- sowie ODER-Verknüpfungen. Weitere Informationen finden sich in der LimeSurvey Dokumentation.

        ]]>
        - + LimeSurvey can use a lot of condition and filter to show or hide question. You an use AND or OR condition. You can use previous question answers and tokens.

        - More information on condition on the LimeSurvey documentation

        -]]>
        + More information : Conditions Engine and expression manager

        + ]]>
        - + LimeSurvey peut utiliser de nombreuses conditions et filtres pour masquer certaines questions. Il est possible d'utiliser des conditions de type OR ou AND. Vous pouvez utiliser les réponses précédentes mais aussi les attributs des invitations.

        - Plus d'informations sur les conditions sur La documentation de LimeSurvey

        + Plus d'informations : le gestionnaire de conditions et le gestionnaire d'expressions

        ]]>
        - + - Fitre de tableau]]> + Filtre de tableau et Filttre d’exclusion. On utilise le gestionnaire d'expression pour masquer ou montrer les questions correspondantes.]]> - + - Array Filter and Array Filter Exclusion]]> + Array Filter and Array Filter Exclusion. We use Expression Manager to hide and show question too. ]]> - + - Array Filter und Array Filter Exclusion gefiltert werden.]]> + Array Filter und Array Filter Exclusion gefiltert werden. ]]> @@ -1916,10 +1916,10 @@ - + - + <![CDATA[S]]> @@ -1933,10 +1933,10 @@ - + - + <![CDATA[S]]> @@ -1950,10 +1950,10 @@ - + - + <![CDATA[S]]> @@ -1967,10 +1967,10 @@ - + - + <![CDATA[T]]> @@ -1978,16 +1978,16 @@ - + - + - + <![CDATA[T]]> @@ -1995,16 +1995,16 @@ - + - + - + <![CDATA[T]]> @@ -2012,16 +2012,16 @@ - + - + - + <![CDATA[H]]> @@ -2029,16 +2029,16 @@ - + - + - + <![CDATA[H]]> @@ -2046,16 +2046,16 @@ - + - + - + <![CDATA[H]]> @@ -2063,16 +2063,16 @@ - + - + - + <![CDATA[S1]]> @@ -2080,16 +2080,16 @@ - + - + - + <![CDATA[S1]]> @@ -2097,16 +2097,16 @@ - + - + - + <![CDATA[S1]]> @@ -2114,16 +2114,16 @@ - + - + - + <![CDATA[T1]]> @@ -2131,16 +2131,16 @@ - + - + - + <![CDATA[T1]]> @@ -2148,16 +2148,16 @@ - + - + - + <![CDATA[T1]]> @@ -2171,16 +2171,16 @@ - + - + - + <![CDATA[Q]]> @@ -2188,16 +2188,16 @@ - + - + - + <![CDATA[Q]]> @@ -2205,16 +2205,16 @@ - + - + - + <![CDATA[Q]]> @@ -2222,16 +2222,16 @@ - + - + - + <![CDATA[Q1]]> @@ -2239,16 +2239,16 @@ - + - + - + <![CDATA[Q1]]> @@ -2256,16 +2256,16 @@ - + - + - + <![CDATA[Q1]]> @@ -2273,16 +2273,16 @@ - + - + - + <![CDATA[M2]]> @@ -2290,16 +2290,16 @@ - + - + - + <![CDATA[M2]]> @@ -2307,16 +2307,16 @@ - + - + - + <![CDATA[M2]]> @@ -2324,16 +2324,16 @@ - + - + - + <![CDATA[N]]> @@ -2347,10 +2347,10 @@ - + - + <![CDATA[N]]> @@ -2364,10 +2364,10 @@ - + - + <![CDATA[N]]> @@ -2381,10 +2381,10 @@ - + - + <![CDATA[MN]]> @@ -2399,10 +2399,10 @@ - + - + <![CDATA[MN]]> @@ -2417,10 +2417,10 @@ - + - + <![CDATA[MN]]> @@ -2435,10 +2435,10 @@ - + - + <![CDATA[MNM]]> @@ -2446,17 +2446,17 @@ - + - + - + <![CDATA[MNM]]> @@ -2464,17 +2464,17 @@ - + - + - + <![CDATA[MNM]]> @@ -2482,17 +2482,17 @@ - + - + - + <![CDATA[Q2]]> @@ -2500,16 +2500,16 @@ - + - + - + <![CDATA[Q2]]> @@ -2517,16 +2517,16 @@ - + - + - + <![CDATA[Q2]]> @@ -2538,16 +2538,16 @@ Nutzung des Text-Separators]]> - + - + - + <![CDATA[Y]]> @@ -2561,10 +2561,10 @@ Nutzung des Text-Separators]]> - + - + <![CDATA[Y]]> @@ -2578,10 +2578,10 @@ Nutzung des Text-Separators]]> - + - + <![CDATA[Y]]> @@ -2595,10 +2595,10 @@ Nutzung des Text-Separators]]> - + - + <![CDATA[G]]> @@ -2612,10 +2612,10 @@ Nutzung des Text-Separators]]> - + - + <![CDATA[G]]> @@ -2629,10 +2629,10 @@ Nutzung des Text-Separators]]> - + - + <![CDATA[G]]> @@ -2646,10 +2646,10 @@ Nutzung des Text-Separators]]> - + - + <![CDATA[q5]]> @@ -2657,16 +2657,16 @@ Nutzung des Text-Separators]]> - + - + - + <![CDATA[q5]]> @@ -2674,16 +2674,16 @@ Nutzung des Text-Separators]]> - + - + - + <![CDATA[q5]]> @@ -2691,16 +2691,16 @@ Nutzung des Text-Separators]]> - + - + - + <![CDATA[I]]> @@ -2712,16 +2712,16 @@ Nutzung des Text-Separators]]> ]]> - + - + - + <![CDATA[I]]> @@ -2733,16 +2733,16 @@ Nutzung des Text-Separators]]> ]]> - + - + - + <![CDATA[I]]> @@ -2750,16 +2750,16 @@ Nutzung des Text-Separators]]> - + - + - + <![CDATA[ldc]]> @@ -2767,17 +2767,17 @@ Nutzung des Text-Separators]]> - + - + - + <![CDATA[ldc]]> @@ -2785,17 +2785,17 @@ Nutzung des Text-Separators]]> - + - + - + <![CDATA[ldc]]> @@ -2803,17 +2803,17 @@ Nutzung des Text-Separators]]> - + - + - + <![CDATA[L]]> @@ -2821,16 +2821,16 @@ Nutzung des Text-Separators]]> - + - + - + <![CDATA[L]]> @@ -2838,16 +2838,16 @@ Nutzung des Text-Separators]]> - + - + - + <![CDATA[L]]> @@ -2855,16 +2855,16 @@ Nutzung des Text-Separators]]> - + - + - + <![CDATA[O]]> @@ -2872,16 +2872,16 @@ Nutzung des Text-Separators]]> - + - + - + <![CDATA[O]]> @@ -2889,16 +2889,16 @@ Nutzung des Text-Separators]]> - + - + - + <![CDATA[O]]> @@ -2906,16 +2906,16 @@ Nutzung des Text-Separators]]> - + - + - + <![CDATA[M]]> @@ -2929,10 +2929,10 @@ Nutzung des Text-Separators]]> - + - + <![CDATA[M]]> @@ -2946,10 +2946,10 @@ Nutzung des Text-Separators]]> - + - + <![CDATA[M]]> @@ -2963,10 +2963,10 @@ Nutzung des Text-Separators]]> - + - + <![CDATA[moe]]> @@ -2974,17 +2974,17 @@ Nutzung des Text-Separators]]> - + - + - + <![CDATA[moe]]> @@ -2992,17 +2992,17 @@ Nutzung des Text-Separators]]> - + - + - + <![CDATA[moe]]> @@ -3012,17 +3012,17 @@ Nutzung des Text-Separators]]> - + - + - + <![CDATA[K]]> @@ -3030,37 +3030,37 @@ Nutzung des Text-Separators]]> - + - + - + <![CDATA[K]]> $(document).ready(function() { - $('#answer282267X314X3529SQ002comment').hide(); + $('#answer282267X2016X43864SQ002comment').hide(); }); Multiple option with comments (default answers and 1 Minimum Answer)]]> - + - + - + <![CDATA[K]]> @@ -3068,16 +3068,16 @@ $(document).ready(function() { - + - + - + <![CDATA[D]]> @@ -3085,16 +3085,16 @@ $(document).ready(function() { - + - + - + <![CDATA[D]]> @@ -3102,16 +3102,16 @@ $(document).ready(function() { - + - + - + <![CDATA[D]]> @@ -3119,16 +3119,16 @@ $(document).ready(function() { - + - + - + <![CDATA[D1]]> @@ -3136,16 +3136,16 @@ $(document).ready(function() { - + - + - + <![CDATA[D1]]> @@ -3153,16 +3153,16 @@ $(document).ready(function() { - + - + - + <![CDATA[D1]]> @@ -3170,16 +3170,16 @@ $(document).ready(function() { - + - + - + <![CDATA[R]]> @@ -3187,16 +3187,16 @@ $(document).ready(function() { - + - + - + <![CDATA[R]]> - + - + - + <![CDATA[R]]> - + - + - + <![CDATA[F]]> @@ -3250,16 +3250,16 @@ $("#CHOICES_25 option[value='A1'").remove(); - + - + - + <![CDATA[F]]> @@ -3267,16 +3267,16 @@ $("#CHOICES_25 option[value='A1'").remove(); - + - + - + <![CDATA[F]]> @@ -3284,16 +3284,16 @@ $("#CHOICES_25 option[value='A1'").remove(); - + - + - + <![CDATA[A]]> @@ -3301,16 +3301,16 @@ $("#CHOICES_25 option[value='A1'").remove(); - + - + - + <![CDATA[A]]> @@ -3318,16 +3318,16 @@ $("#CHOICES_25 option[value='A1'").remove(); - + - + - + <![CDATA[A]]> @@ -3335,16 +3335,16 @@ $("#CHOICES_25 option[value='A1'").remove(); - + - + - + <![CDATA[B]]> @@ -3352,16 +3352,16 @@ $("#CHOICES_25 option[value='A1'").remove(); - + - + - + <![CDATA[B]]> @@ -3369,16 +3369,16 @@ $("#CHOICES_25 option[value='A1'").remove(); - + - + - + <![CDATA[B]]> @@ -3386,16 +3386,16 @@ $("#CHOICES_25 option[value='A1'").remove(); - + - + - + <![CDATA[E]]> @@ -3403,16 +3403,16 @@ $("#CHOICES_25 option[value='A1'").remove(); - + - + - + <![CDATA[E]]> @@ -3420,16 +3420,16 @@ $("#CHOICES_25 option[value='A1'").remove(); - + - + - + <![CDATA[E]]> @@ -3437,16 +3437,16 @@ $("#CHOICES_25 option[value='A1'").remove(); - + - + - + <![CDATA[X]]> @@ -3454,16 +3454,16 @@ $("#CHOICES_25 option[value='A1'").remove(); - + - + - + <![CDATA[X]]> @@ -3471,16 +3471,16 @@ $("#CHOICES_25 option[value='A1'").remove(); - + - + - + <![CDATA[X]]> @@ -3488,16 +3488,16 @@ $("#CHOICES_25 option[value='A1'").remove(); - + - + - + <![CDATA[AT]]> @@ -3505,17 +3505,17 @@ $("#CHOICES_25 option[value='A1'").remove(); - + - + - + <![CDATA[AT]]> @@ -3523,17 +3523,17 @@ $("#CHOICES_25 option[value='A1'").remove(); - + - + - + <![CDATA[AT]]> @@ -3541,17 +3541,17 @@ $("#CHOICES_25 option[value='A1'").remove(); - + - + - + <![CDATA[ANT]]> @@ -3559,17 +3559,17 @@ $("#CHOICES_25 option[value='A1'").remove(); - + - + - + <![CDATA[ANT]]> @@ -3577,17 +3577,17 @@ $("#CHOICES_25 option[value='A1'").remove(); - + - + - + <![CDATA[ANT]]> @@ -3595,17 +3595,17 @@ $("#CHOICES_25 option[value='A1'").remove(); - + - + - + <![CDATA[arn]]> @@ -3613,17 +3613,17 @@ $("#CHOICES_25 option[value='A1'").remove(); - + - + - + <![CDATA[arn]]> @@ -3631,17 +3631,17 @@ $("#CHOICES_25 option[value='A1'").remove(); - + - + - + <![CDATA[arn]]> @@ -3649,17 +3649,17 @@ $("#CHOICES_25 option[value='A1'").remove(); - + - + - + <![CDATA[dual]]> @@ -3667,17 +3667,17 @@ $("#CHOICES_25 option[value='A1'").remove(); - + - + - + <![CDATA[dual]]> @@ -3685,17 +3685,17 @@ $("#CHOICES_25 option[value='A1'").remove(); - + - + - + <![CDATA[dual]]> @@ -3703,17 +3703,17 @@ $("#CHOICES_25 option[value='A1'").remove(); - + - + - + <![CDATA[q12]]> @@ -3721,16 +3721,16 @@ $("#CHOICES_25 option[value='A1'").remove(); - + - + - + <![CDATA[q12]]> @@ -3738,16 +3738,16 @@ $("#CHOICES_25 option[value='A1'").remove(); - + - + - + <![CDATA[q12]]> @@ -3755,16 +3755,16 @@ $("#CHOICES_25 option[value='A1'").remove(); - + - + - + <![CDATA[abc]]> @@ -3772,17 +3772,17 @@ $("#CHOICES_25 option[value='A1'").remove(); - + - + - + <![CDATA[abc]]> @@ -3790,17 +3790,17 @@ $("#CHOICES_25 option[value='A1'").remove(); - + - + - + <![CDATA[abc]]> @@ -3808,17 +3808,17 @@ $("#CHOICES_25 option[value='A1'").remove(); - + - + - + <![CDATA[AN]]> @@ -3826,16 +3826,16 @@ $("#CHOICES_25 option[value='A1'").remove(); - + - + - + <![CDATA[AN]]> @@ -3843,16 +3843,16 @@ $("#CHOICES_25 option[value='A1'").remove(); - + - + - + <![CDATA[AN]]> @@ -3860,16 +3860,16 @@ $("#CHOICES_25 option[value='A1'").remove(); - + - + - + <![CDATA[ldd]]> @@ -3877,17 +3877,17 @@ $("#CHOICES_25 option[value='A1'").remove(); - + - + - + <![CDATA[ldd]]> @@ -3895,17 +3895,17 @@ $("#CHOICES_25 option[value='A1'").remove(); - + - + - + <![CDATA[ldd]]> @@ -3913,17 +3913,17 @@ $("#CHOICES_25 option[value='A1'").remove(); - + - + - + <![CDATA[C]]> @@ -3931,16 +3931,16 @@ $("#CHOICES_25 option[value='A1'").remove(); - + - + - + <![CDATA[C]]> @@ -3948,16 +3948,16 @@ $("#CHOICES_25 option[value='A1'").remove(); - + - + - + <![CDATA[C]]> @@ -3965,16 +3965,16 @@ $("#CHOICES_25 option[value='A1'").remove(); - + - + - + <![CDATA[R1]]> @@ -3982,16 +3982,16 @@ $("#CHOICES_25 option[value='A1'").remove(); - + - + - + <![CDATA[R1]]> @@ -3999,16 +3999,16 @@ $("#CHOICES_25 option[value='A1'").remove(); - + - + - + <![CDATA[R1]]> @@ -4016,16 +4016,16 @@ $("#CHOICES_25 option[value='A1'").remove(); - + - + - + <![CDATA[XB]]> @@ -4033,16 +4033,16 @@ $("#CHOICES_25 option[value='A1'").remove(); - + - + - + <![CDATA[XB]]> @@ -4050,16 +4050,16 @@ $("#CHOICES_25 option[value='A1'").remove(); - + - + - + <![CDATA[XB]]> @@ -4067,16 +4067,16 @@ $("#CHOICES_25 option[value='A1'").remove(); - + - + - + <![CDATA[XC]]> @@ -4084,16 +4084,16 @@ $("#CHOICES_25 option[value='A1'").remove(); - + - + - + <![CDATA[XC]]> @@ -4101,16 +4101,16 @@ $("#CHOICES_25 option[value='A1'").remove(); - + - + - + <![CDATA[XC]]> @@ -4118,16 +4118,16 @@ $("#CHOICES_25 option[value='A1'").remove(); - + - + - + <![CDATA[QC]]> @@ -4141,10 +4141,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - + - + <![CDATA[QC]]> @@ -4158,10 +4158,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - + - + <![CDATA[QC]]> @@ -4175,10 +4175,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - + - + <![CDATA[QCYes]]> @@ -4190,13 +4190,13 @@ $("#CHOICES_25 option[value='A1'").remove(); - + - + - + <![CDATA[QCYes]]> @@ -4208,13 +4208,13 @@ $("#CHOICES_25 option[value='A1'").remove(); - + - + - + <![CDATA[QCYes]]> @@ -4226,13 +4226,13 @@ $("#CHOICES_25 option[value='A1'").remove(); - + - + - + <![CDATA[QCNo]]> @@ -4240,17 +4240,17 @@ $("#CHOICES_25 option[value='A1'").remove(); - + - + - + - + <![CDATA[QCNo]]> @@ -4258,17 +4258,17 @@ $("#CHOICES_25 option[value='A1'").remove(); - + - + - + - + <![CDATA[QCNo]]> @@ -4276,17 +4276,17 @@ $("#CHOICES_25 option[value='A1'").remove(); - + - + - + - + <![CDATA[QCDefault]]> @@ -4294,17 +4294,17 @@ $("#CHOICES_25 option[value='A1'").remove(); - + - + - + - + <![CDATA[QCDefault]]> @@ -4312,17 +4312,17 @@ $("#CHOICES_25 option[value='A1'").remove(); - + - + - + - + <![CDATA[QCDefault]]> @@ -4330,17 +4330,17 @@ $("#CHOICES_25 option[value='A1'").remove(); - + - + - + - + <![CDATA[QCS1]]> @@ -4348,16 +4348,16 @@ $("#CHOICES_25 option[value='A1'").remove(); - + - + - + <![CDATA[QCS1]]> @@ -4365,16 +4365,16 @@ $("#CHOICES_25 option[value='A1'").remove(); - + - + - + <![CDATA[QCS1]]> @@ -4382,16 +4382,16 @@ $("#CHOICES_25 option[value='A1'").remove(); - + - + - + <![CDATA[QCS2]]> @@ -4399,16 +4399,16 @@ $("#CHOICES_25 option[value='A1'").remove(); - + - + - + <![CDATA[QCS2]]> @@ -4416,16 +4416,16 @@ $("#CHOICES_25 option[value='A1'").remove(); - + - + - + <![CDATA[QCS2]]> @@ -4433,16 +4433,16 @@ $("#CHOICES_25 option[value='A1'").remove(); - + - + - + <![CDATA[CC01]]> Afficher la question 1 sur l'une des questions précédentes.]]> @@ -4450,17 +4450,17 @@ $("#CHOICES_25 option[value='A1'").remove(); - + - + - + - + <![CDATA[CC01]]> Show question 1 at one of previous question]]> @@ -4468,17 +4468,17 @@ $("#CHOICES_25 option[value='A1'").remove(); - + - + - + - + <![CDATA[CC01]]> @@ -4486,17 +4486,17 @@ $("#CHOICES_25 option[value='A1'").remove(); - + - + - + - + <![CDATA[QC02]]> @@ -4504,17 +4504,17 @@ $("#CHOICES_25 option[value='A1'").remove(); - + - + - + - + <![CDATA[QC02]]> Afficher la question 1 sur l'une des questions précédentes.]]> @@ -4522,17 +4522,17 @@ $("#CHOICES_25 option[value='A1'").remove(); - + - + - + - + <![CDATA[QC02]]> Show question 2 at one of previous question.]]> @@ -4540,17 +4540,17 @@ $("#CHOICES_25 option[value='A1'").remove(); - + - + - + - + <![CDATA[QCS3]]> Afficher sur l'une des questions précédentes.]]> @@ -4558,17 +4558,17 @@ $("#CHOICES_25 option[value='A1'").remove(); - + - + - + - + <![CDATA[QCS3]]> display an previous question.]]> @@ -4576,17 +4576,17 @@ $("#CHOICES_25 option[value='A1'").remove(); - + - + - + - + <![CDATA[QCS3]]> @@ -4594,17 +4594,17 @@ $("#CHOICES_25 option[value='A1'").remove(); - + - + - + - + <![CDATA[AF]]> @@ -4618,10 +4618,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - + - + <![CDATA[AF]]> @@ -4635,10 +4635,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - + - + <![CDATA[AF]]> @@ -4652,10 +4652,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - + - + <![CDATA[FAF]]> @@ -4663,16 +4663,17 @@ $("#CHOICES_25 option[value='A1'").remove(); - + + 0]]> - + - + <![CDATA[FAF]]> @@ -4680,16 +4681,17 @@ $("#CHOICES_25 option[value='A1'").remove(); - + + 0]]> - + - + <![CDATA[FAF]]> @@ -4697,16 +4699,17 @@ $("#CHOICES_25 option[value='A1'").remove(); - + + 0]]> - + - + <![CDATA[FAFE]]> @@ -4714,16 +4717,17 @@ $("#CHOICES_25 option[value='A1'").remove(); - + + - + - + <![CDATA[FAFE]]> @@ -4731,16 +4735,17 @@ $("#CHOICES_25 option[value='A1'").remove(); - + + - + - + <![CDATA[FAFE]]> @@ -4748,10 +4753,173 @@ $("#CHOICES_25 option[value='A1'").remove(); - + + + + + + + + + + <![CDATA[QEMYes]]> + + + + + + + + + + + + + + + + + + <![CDATA[QEMYes]]> + + + + + + + + + + + + + + + + + + <![CDATA[QEMYes]]> + + + + + + + + + + + + + + + + + + <![CDATA[QEMNo]]> + + + + + + + + + + + + + + + + + + <![CDATA[QEMNo]]> + + + + + + + + + + + + + + + + + + <![CDATA[QEMNo]]> + + + + + + + + + + + + + + + + + + <![CDATA[QEMDefault]]> + + + + + + + + + + + + + + + + + + <![CDATA[QEMDefault]]> + + + + + + + + + + + + + + + + + + <![CDATA[QEMDefault]]> + + + + + + + + + + @@ -4776,10 +4944,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ001]]> @@ -4793,10 +4961,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ001]]> @@ -4810,10 +4978,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ001]]> @@ -4827,10 +4995,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ002]]> @@ -4844,10 +5012,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ002]]> @@ -4861,10 +5029,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ002]]> @@ -4878,10 +5046,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ003]]> @@ -4895,10 +5063,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ003]]> @@ -4912,10 +5080,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ003]]> @@ -4929,10 +5097,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ001]]> @@ -4946,10 +5114,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ001]]> @@ -4963,10 +5131,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ001]]> @@ -4980,10 +5148,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ002]]> @@ -4997,10 +5165,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ002]]> @@ -5014,10 +5182,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ002]]> @@ -5031,10 +5199,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ003]]> @@ -5048,10 +5216,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ003]]> @@ -5065,10 +5233,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ003]]> @@ -5082,10 +5250,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ004]]> @@ -5099,10 +5267,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ004]]> @@ -5116,10 +5284,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ004]]> @@ -5133,10 +5301,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ01]]> @@ -5150,10 +5318,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ01]]> @@ -5167,10 +5335,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ01]]> @@ -5184,10 +5352,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ02]]> @@ -5201,10 +5369,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ02]]> @@ -5218,10 +5386,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ02]]> @@ -5235,10 +5403,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ03]]> @@ -5252,10 +5420,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ03]]> @@ -5269,10 +5437,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ03]]> @@ -5286,10 +5454,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ04]]> @@ -5303,10 +5471,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ04]]> @@ -5320,10 +5488,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ04]]> @@ -5337,10 +5505,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQX01]]> @@ -5354,10 +5522,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQX01]]> @@ -5371,10 +5539,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQX01]]> @@ -5388,10 +5556,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQX02]]> @@ -5405,10 +5573,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQX02]]> @@ -5422,10 +5590,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQX02]]> @@ -5439,10 +5607,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQX03]]> @@ -5456,10 +5624,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQX03]]> @@ -5473,10 +5641,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQX03]]> @@ -5490,10 +5658,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQX04]]> @@ -5507,10 +5675,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQX04]]> @@ -5524,10 +5692,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQX04]]> @@ -5541,10 +5709,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQY01]]> @@ -5558,10 +5726,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQY01]]> @@ -5575,10 +5743,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQY01]]> @@ -5592,10 +5760,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQY02]]> @@ -5609,10 +5777,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQY02]]> @@ -5626,10 +5794,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQY02]]> @@ -5643,10 +5811,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQY03]]> @@ -5660,10 +5828,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQY03]]> @@ -5677,10 +5845,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQY03]]> @@ -5694,10 +5862,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQY04]]> @@ -5711,10 +5879,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQY04]]> @@ -5728,10 +5896,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQY04]]> @@ -5745,10 +5913,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQX01]]> @@ -5762,10 +5930,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQX01]]> @@ -5779,10 +5947,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQX01]]> @@ -5796,10 +5964,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQX02]]> @@ -5813,10 +5981,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQX02]]> @@ -5830,10 +5998,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQX02]]> @@ -5847,10 +6015,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQX03]]> @@ -5864,10 +6032,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQX03]]> @@ -5881,10 +6049,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQX03]]> @@ -5898,10 +6066,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQX04]]> @@ -5915,10 +6083,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQX04]]> @@ -5932,10 +6100,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQX04]]> @@ -5949,10 +6117,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQX01]]> @@ -5966,10 +6134,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQX01]]> @@ -5983,10 +6151,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQX01]]> @@ -6000,10 +6168,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQX02]]> @@ -6017,10 +6185,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQX02]]> @@ -6034,10 +6202,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQX02]]> @@ -6051,10 +6219,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQX03]]> @@ -6068,10 +6236,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQX03]]> @@ -6085,10 +6253,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQX03]]> @@ -6102,10 +6270,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQX04]]> @@ -6119,10 +6287,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQX04]]> @@ -6136,10 +6304,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQX04]]> @@ -6153,10 +6321,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SH101]]> @@ -6170,10 +6338,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SH101]]> @@ -6187,10 +6355,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SH101]]> @@ -6204,10 +6372,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SH102]]> @@ -6221,10 +6389,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SH102]]> @@ -6238,10 +6406,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SH102]]> @@ -6255,10 +6423,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ201]]> @@ -6272,10 +6440,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ201]]> @@ -6289,10 +6457,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ201]]> @@ -6306,10 +6474,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ202]]> @@ -6323,10 +6491,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ202]]> @@ -6340,10 +6508,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ202]]> @@ -6357,10 +6525,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ01]]> @@ -6374,10 +6542,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ01]]> @@ -6391,10 +6559,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ01]]> @@ -6408,10 +6576,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ02]]> @@ -6425,10 +6593,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ02]]> @@ -6442,10 +6610,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ02]]> @@ -6459,10 +6627,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ03]]> @@ -6476,10 +6644,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ03]]> @@ -6493,10 +6661,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ03]]> @@ -6510,10 +6678,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ04]]> @@ -6527,10 +6695,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ04]]> @@ -6544,10 +6712,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ04]]> @@ -6561,10 +6729,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ01]]> @@ -6578,10 +6746,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ01]]> @@ -6595,10 +6763,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ01]]> @@ -6612,10 +6780,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ02]]> @@ -6629,10 +6797,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ02]]> @@ -6646,10 +6814,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ02]]> @@ -6663,10 +6831,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ03]]> @@ -6680,10 +6848,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ03]]> @@ -6697,10 +6865,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ03]]> @@ -6714,10 +6882,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ04]]> @@ -6731,10 +6899,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ04]]> @@ -6748,10 +6916,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ04]]> @@ -6765,10 +6933,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQY01]]> @@ -6782,10 +6950,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQY01]]> @@ -6799,10 +6967,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQY01]]> @@ -6816,10 +6984,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQY02]]> @@ -6833,10 +7001,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQY02]]> @@ -6850,10 +7018,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQY02]]> @@ -6867,10 +7035,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQY03]]> @@ -6884,10 +7052,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQY03]]> @@ -6901,10 +7069,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQY03]]> @@ -6918,10 +7086,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQY04]]> @@ -6935,10 +7103,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQY04]]> @@ -6952,10 +7120,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQY04]]> @@ -6969,10 +7137,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQX01]]> @@ -6986,10 +7154,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQX01]]> @@ -7003,10 +7171,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQX01]]> @@ -7020,10 +7188,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQX02]]> @@ -7037,10 +7205,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQX02]]> @@ -7054,10 +7222,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQX02]]> @@ -7071,10 +7239,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQX03]]> @@ -7088,10 +7256,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQX03]]> @@ -7105,10 +7273,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQX03]]> @@ -7122,10 +7290,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQX04]]> @@ -7139,10 +7307,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQX04]]> @@ -7156,10 +7324,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQX04]]> @@ -7173,10 +7341,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ01]]> @@ -7190,10 +7358,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ01]]> @@ -7207,10 +7375,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ01]]> @@ -7224,10 +7392,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ02]]> @@ -7241,10 +7409,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ02]]> @@ -7258,10 +7426,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ02]]> @@ -7275,10 +7443,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ03]]> @@ -7292,10 +7460,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ03]]> @@ -7309,10 +7477,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ03]]> @@ -7326,10 +7494,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ04]]> @@ -7343,10 +7511,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ04]]> @@ -7360,10 +7528,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ04]]> @@ -7377,10 +7545,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ01]]> @@ -7394,10 +7562,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ01]]> @@ -7411,10 +7579,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ01]]> @@ -7428,10 +7596,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ02]]> @@ -7445,10 +7613,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ02]]> @@ -7462,10 +7630,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ02]]> @@ -7479,10 +7647,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ03]]> @@ -7496,10 +7664,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ03]]> @@ -7513,10 +7681,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ03]]> @@ -7530,10 +7698,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ04]]> @@ -7547,10 +7715,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ04]]> @@ -7564,10 +7732,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ04]]> @@ -7581,10 +7749,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ01]]> @@ -7598,10 +7766,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ01]]> @@ -7615,10 +7783,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ01]]> @@ -7632,10 +7800,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ02]]> @@ -7649,10 +7817,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ02]]> @@ -7666,10 +7834,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ02]]> @@ -7683,10 +7851,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ03]]> @@ -7700,10 +7868,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ03]]> @@ -7717,10 +7885,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ03]]> @@ -7734,10 +7902,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ04]]> @@ -7751,10 +7919,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ04]]> @@ -7768,10 +7936,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ04]]> @@ -7785,10 +7953,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ01]]> @@ -7802,10 +7970,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ01]]> @@ -7819,10 +7987,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ01]]> @@ -7836,10 +8004,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ02]]> @@ -7853,10 +8021,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ02]]> @@ -7870,10 +8038,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ02]]> @@ -7887,10 +8055,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ03]]> @@ -7904,10 +8072,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ03]]> @@ -7921,10 +8089,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ03]]> @@ -7938,10 +8106,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ04]]> @@ -7955,10 +8123,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ04]]> @@ -7972,10 +8140,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ04]]> @@ -7989,10 +8157,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ01]]> @@ -8006,10 +8174,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ01]]> @@ -8023,10 +8191,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ01]]> @@ -8040,10 +8208,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ02]]> @@ -8057,10 +8225,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ02]]> @@ -8074,10 +8242,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ02]]> @@ -8091,10 +8259,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ03]]> @@ -8108,10 +8276,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ03]]> @@ -8125,10 +8293,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ03]]> @@ -8142,10 +8310,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ04]]> @@ -8159,10 +8327,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ04]]> @@ -8176,10 +8344,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ04]]> @@ -8193,10 +8361,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ01]]> @@ -8210,10 +8378,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ01]]> @@ -8227,10 +8395,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ01]]> @@ -8244,10 +8412,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ02]]> @@ -8261,10 +8429,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ02]]> @@ -8278,10 +8446,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ02]]> @@ -8295,10 +8463,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ03]]> @@ -8312,10 +8480,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ03]]> @@ -8329,10 +8497,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ03]]> @@ -8346,10 +8514,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ04]]> @@ -8363,10 +8531,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ04]]> @@ -8380,10 +8548,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ04]]> @@ -8397,10 +8565,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ01]]> @@ -8414,10 +8582,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ01]]> @@ -8431,10 +8599,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ01]]> @@ -8448,10 +8616,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ02]]> @@ -8465,10 +8633,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ02]]> @@ -8482,10 +8650,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ02]]> @@ -8499,10 +8667,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ03]]> @@ -8516,10 +8684,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ03]]> @@ -8533,10 +8701,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ03]]> @@ -8550,10 +8718,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ04]]> @@ -8567,10 +8735,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ04]]> @@ -8584,10 +8752,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ04]]> @@ -8601,10 +8769,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ01]]> @@ -8618,10 +8786,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ01]]> @@ -8635,10 +8803,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ01]]> @@ -8652,10 +8820,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ02]]> @@ -8669,10 +8837,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ02]]> @@ -8686,10 +8854,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ02]]> @@ -8703,10 +8871,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ03]]> @@ -8720,10 +8888,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ03]]> @@ -8737,10 +8905,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ03]]> @@ -8754,10 +8922,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ04]]> @@ -8771,10 +8939,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ04]]> @@ -8788,10 +8956,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ04]]> @@ -8805,10 +8973,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ01]]> @@ -8822,10 +8990,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ01]]> @@ -8839,10 +9007,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ01]]> @@ -8856,10 +9024,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ02]]> @@ -8873,10 +9041,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ02]]> @@ -8890,10 +9058,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ02]]> @@ -8907,10 +9075,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ03]]> @@ -8924,10 +9092,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ03]]> @@ -8941,10 +9109,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ03]]> @@ -8958,10 +9126,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ04]]> @@ -8975,10 +9143,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ04]]> @@ -8992,10 +9160,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ04]]> @@ -9009,10 +9177,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ01]]> @@ -9026,10 +9194,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ01]]> @@ -9043,10 +9211,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ01]]> @@ -9060,10 +9228,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ02]]> @@ -9077,10 +9245,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ02]]> @@ -9094,10 +9262,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ02]]> @@ -9111,10 +9279,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ03]]> @@ -9128,10 +9296,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ03]]> @@ -9145,10 +9313,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ03]]> @@ -9162,10 +9330,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ04]]> @@ -9179,10 +9347,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ04]]> @@ -9196,10 +9364,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ04]]> @@ -9213,10 +9381,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ01]]> @@ -9230,10 +9398,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ01]]> @@ -9247,10 +9415,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ01]]> @@ -9264,10 +9432,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ02]]> @@ -9281,10 +9449,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ02]]> @@ -9298,10 +9466,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ02]]> @@ -9315,10 +9483,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ03]]> @@ -9332,10 +9500,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ03]]> @@ -9349,10 +9517,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ03]]> @@ -9366,10 +9534,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ04]]> @@ -9383,10 +9551,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ04]]> @@ -9400,10 +9568,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ04]]> @@ -9417,10 +9585,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ01]]> @@ -9434,10 +9602,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ01]]> @@ -9451,10 +9619,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ01]]> @@ -9468,10 +9636,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ02]]> @@ -9485,10 +9653,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ02]]> @@ -9502,10 +9670,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ02]]> @@ -9519,10 +9687,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ03]]> @@ -9536,10 +9704,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ03]]> @@ -9553,10 +9721,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ03]]> @@ -9570,10 +9738,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ04]]> @@ -9587,10 +9755,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ04]]> @@ -9604,10 +9772,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ04]]> @@ -9621,10 +9789,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ05]]> @@ -9638,10 +9806,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ05]]> @@ -9655,10 +9823,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ05]]> @@ -9672,10 +9840,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQY01]]> @@ -9689,10 +9857,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQY01]]> @@ -9706,10 +9874,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQY01]]> @@ -9723,10 +9891,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQY02]]> @@ -9740,10 +9908,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQY02]]> @@ -9757,10 +9925,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQY02]]> @@ -9774,10 +9942,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQY03]]> @@ -9791,10 +9959,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQY03]]> @@ -9808,10 +9976,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQY03]]> @@ -9825,10 +9993,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQY04]]> @@ -9842,10 +10010,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQY04]]> @@ -9859,10 +10027,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQY04]]> @@ -9876,10 +10044,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ01]]> @@ -9893,10 +10061,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ01]]> @@ -9910,10 +10078,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ01]]> @@ -9927,10 +10095,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ02]]> @@ -9944,10 +10112,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ02]]> @@ -9961,10 +10129,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ02]]> @@ -9978,10 +10146,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ03]]> @@ -9995,10 +10163,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ03]]> @@ -10012,10 +10180,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ03]]> @@ -10029,10 +10197,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ04]]> @@ -10046,10 +10214,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ04]]> @@ -10063,10 +10231,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ04]]> @@ -10080,10 +10248,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ01]]> @@ -10097,10 +10265,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ01]]> @@ -10114,10 +10282,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ01]]> @@ -10131,10 +10299,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ02]]> @@ -10148,10 +10316,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ02]]> @@ -10165,10 +10333,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ02]]> @@ -10182,10 +10350,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ03]]> @@ -10199,10 +10367,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ03]]> @@ -10216,10 +10384,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ03]]> @@ -10233,10 +10401,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ04]]> @@ -10250,10 +10418,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ04]]> @@ -10267,10 +10435,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ04]]> @@ -10284,10 +10452,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ01]]> @@ -10301,10 +10469,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ01]]> @@ -10318,10 +10486,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ01]]> @@ -10335,10 +10503,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ02]]> @@ -10352,10 +10520,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ02]]> @@ -10369,10 +10537,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ02]]> @@ -10386,10 +10554,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ03]]> @@ -10403,10 +10571,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ03]]> @@ -10420,10 +10588,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ03]]> @@ -10437,10 +10605,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ04]]> @@ -10454,10 +10622,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ04]]> @@ -10471,10 +10639,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQ04]]> @@ -10488,10 +10656,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQY01]]> @@ -10505,10 +10673,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQY01]]> @@ -10522,10 +10690,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQY01]]> @@ -10539,10 +10707,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQY02]]> @@ -10556,10 +10724,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQY02]]> @@ -10573,10 +10741,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQY02]]> @@ -10590,10 +10758,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQY03]]> @@ -10607,10 +10775,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQY03]]> @@ -10624,10 +10792,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQY03]]> @@ -10641,10 +10809,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQY04]]> @@ -10658,10 +10826,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQY04]]> @@ -10675,10 +10843,10 @@ $("#CHOICES_25 option[value='A1'").remove(); - - + + - + <![CDATA[SQY04]]> @@ -10702,4171 +10870,4091 @@ $("#CHOICES_25 option[value='A1'").remove(); - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + alert(bravo);]]> - + alert(bravo);]]> - + alert(bravo);]]> - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -14920,43 +15008,43 @@ $("#CHOICES_25 option[value='A1'").remove(); bounceaccountuser showwelcome showprogress - questionindex navigationdelay nokeyboard alloweditaftercompletion googleanalyticsstyle googleanalyticsapikey + questionindex - + - + - + - + - + - + - + @@ -14966,7 +15054,7 @@ $("#CHOICES_25 option[value='A1'").remove(); - + @@ -14976,10 +15064,12 @@ $("#CHOICES_25 option[value='A1'").remove(); - + + + @@ -15014,13 +15104,13 @@ $("#CHOICES_25 option[value='A1'").remove(); - + Dies ist die Willkommensnachricht des Fragebogens. Sie kann unter Fragebogeneinstellungen -> Texte angepasst werden.

        ]]>
        - + - + This is the welcome text for the survey! You can can edit it in the survey properties.

        ]]>
        This is the end message for the survey! A good place to thank you to answer to this survey.

        -

        - LimeSurvey : THE survey software is a free software, help LimeSurvey project : donate

        ]]>
        @@ -15225,16 +15313,13 @@ The following answers were given by the participant:
        - + Ceci est le message d'accueil de votre sondage !! Vous pouvez l'éditer dans les paramètres du questionnaire.

        ]]>
        - Ceci est le message de fin de votre questionnaire ! Un bon endroit pour vous remercier d'avoir répondu à ce questionnaire.

        -

        - LimeSurvey : THE survey software est un logiciel libre, pour soutenir le projet : donation

        -]]>
        + Ceci est le message de fin de votre questionnaire ! Un bon endroit pour vous remercier d'avoir répondu à ce questionnaire.

        ]]>
        diff --git a/sources/docs/release_notes.txt b/sources/docs/release_notes.txt index 4bd065f..1af7e83 100644 --- a/sources/docs/release_notes.txt +++ b/sources/docs/release_notes.txt @@ -59,7 +59,650 @@ Thank you to everyone who helped with this new release! CHANGE LOG ------------------------------------------------------ -Changes from 2.05+ (build 140612) to 2.05+ (build 140618) June 18, 2014 + +Changes from 2.05+ (build 150508) to 2.05+ (build 150520) May 20, 2015 +-New translation: Kyrgyz (Carsten Schmitz) +-New translation: Polish (Informal) (elisa) +-Fixed issue #8917: Error in R export plugin when exporting Yes/No question results (Carsten Schmitz) +-Fixed issue #9289: Unable to delete a member of a group (Carsten Schmitz) +-Fixed issue #9299: Bad handling of broken links to uploaded files (Carsten Schmitz) +-Fixed issue #9448: Label set update : can remove existing language (Carsten Schmitz) +-Fixed issue #9449: Label set updates clear out existing assessment values (Carsten Schmitz) +-Fixed issue #9466: "Import response from deactivated table" doesn't import timing table (Carsten Schmitz) +-Fixed issue #9485: Reminder/invitation mails are not coded right (Carsten Schmitz) +-Fixed issue #9493: Mandatory check can fails with array filtered array (numbers) (Denis Chenu) +-Fixed issue #9512: User without update permission can't create label in main label magement screen - partial fix (Carsten Schmitz) +-Fixed issue #9521: Quota members are shown in the wrong translation for multilingual surveys (LouisGac) +-Fixed issue #9529: Public statistics only available in base language (Carsten Schmitz) +-Fixed issue #9530: When editing a token the language drop down menu lists all languages - should list only languages used (Carsten Schmitz) +-Fixed issue #9569: Admin with uid>1 cannot set superadmin permissions (Carsten Schmitz) +-Fixed issue #9592: Unable to run survey when using database sessions with Postgres (Carsten Schmitz) +-Fixed issue #9614: False question codes are replaced in the question texts, too (Denis Chenu) +-Fixed issue #9632: Conditions can be wrongfully substituted (answer code : 0) (Denis Chenu) +-Fixed issue #9633: Error when you insert subquestions in a multilingual survey on MSSQL (Carsten Schmitz) +-Fixed issue: Wrong information in installer error message (LouisGac) +#Updated translation: Arabic by malbariqi +#Updated translation: Catalan by qualitatuvic +#Updated translation: Esperanto by Fabricio +#Updated translation: French (France) by arnaud21 +#Updated translation: German by jankal, actxcellence +#Updated translation: German (Informal) by actxcellence +#Updated translation: Italian by lfanfoni +#Updated translation: Italian (Informal) by lfanfoni +#Updated translation: Korean by spn +#Updated translation: Norwegian (Bokmal) by pmonstad +#Updated translation: Norwegian (Nynorsk) by pmonstad +#Updated translation: Polish by elisa +#Updated translation: Polish (Informal) by elisa +#Updated translation: Portuguese (Brazil) by mauriciofurtado +#Updated translation: Portuguese (Portugal) by efialho, samarta +#Updated translation: Russian by vipgroup, nickdsl +#Updated translation: Spanish (Spain) by arnaldoanez, aesteban +#Updated translation: Swedish by maxzomborszki +#Updated translation: Turkish by kayazeren + +Changes from 2.05+ (build 150413) to 2.05+ (build 150508) May 7, 2015 +-Fixed issue #9603: Undefined variable: iSurveyID in /var/www/limesurvey/application/controllers/admin/tokens.php(36) (Alfredo Esteban) +-Fixed issue #9605: Crash when trying to grant permission in specific survey to user without any global permission (Denis Chenu) +-Fixed issue #9609: Template with dash (-) in the name cannot be used as default site template (Denis Chenu) +-Fixed issue #9611: High memory use of STATA export plugin (mfaber) +-Fixed issue: delete_question API method shuffled questions, not keeping its original order. (Gabriel Jenik) +#Updated translation: Arabic by malbariqi, malkadi +#Updated translation: Catalan by qualitatuvic +#Updated translation: Danish by Vasilij, overfrakken, lovepade, docl +#Updated translation: Dutch by c_schmitz +#Updated translation: French (France) by arnaud21, odarteve +#Updated translation: Galician by Calidonia +#Updated translation: German by jweberhofer +#Updated translation: German (Informal) by jweberhofer +#Updated translation: Greek by kiolalis +#Updated translation: Hungarian by lukacs +#Updated translation: Japanese by nomoto +#Updated translation: Korean by spn +#Updated translation: Polish by elisa +#Updated translation: Polish (Informal) by elisa +#Updated translation: Slovak by gadeynebram +#Updated translation: Spanish (Chile) by gabrieljenik +#Updated translation: Spanish (Spain) by aesteban, larjona +#Updated translation: Thai by tomzt +#Updated translation: Turkish by kayazeren + +Changes from 2.05+ (build 150310) to 2.05+ (build 150413) Apr 13, 2015 +-Fixed issue 09577: Wrong instructions (Marcel Minke) +-Fixed issue #9447: Token sending email is unusuable with a lot of token (Alfredo Esteban) +-Fixed issue #9560: "Bounce settings" changeable although "Use global settings" were chosen (Denis Chenu) +-Fixed issue #9573: Question by question survey : Empty mandatory subquestion are not shown with error (Denis Chenu) +-Fixed issue #9587: Quotas do not work with PostgreSQL on some system (Denis Chenu) +-Fixed issue #9591: Sometimes date_max / date_min validations for date/time questions doesn't allow to use the maximum date expected. (Gabriel Jenik) +-Fixed issue #9594: EM nl2br() function doesn't work when content comes from current page (Denis Chenu) +-Fixed issue #9595: PHP error when deleting a condition (Gabriele Mambrini) +-Fixed issue: Default memory limit too low (Carsten Schmitz) +-Fixed issue: Display of public statistics in LimeSpired template (Carsten Schmitz) +-Fixed issue: Question selector unusuable in RTL mode (Carsten Schmitz) +-Fixed issue: Use capital on extension for file upload don't display file (Denis Chenu) +-Fixed issue: Wrong message (Alfredo Esteban) +#Updated translation: Chinese (Simplified) by yanglaw +#Updated translation: Croatian by rovinj, Apach3 +#Updated translation: Czech by slansky +#Updated translation: Czech (Informal) by slansky +#Updated translation: Dutch by Han +#Updated translation: Dutch (Informal) by Han +#Updated translation: Finnish by morbid, Tuomo, jhnrk, hannikkala +#Updated translation: French (France) by arnaud21, tamacheq, DenisChenu, JMI +#Updated translation: German by actxcellence, Mazi, c_schmitz +#Updated translation: German (Informal) by actxcellence, c_schmitz +#Updated translation: Italian by lfanfoni, emp +#Updated translation: Italian (Informal) by lfanfoni +#Updated translation: Japanese by yamatt +#Updated translation: Korean by spn +#Updated translation: Latvian by marcic +#Updated translation: Norwegian (Bokmal) by pmonstad +#Updated translation: Norwegian (Nynorsk) by pmonstad +#Updated translation: Polish by elisa +#Updated translation: Portuguese (Portugal) by samarta, jweberhofer +#Updated translation: Russian by ddrmoscow, vipgroup +#Updated translation: Serbian by MilaVeljovic +#Updated translation: Spanish (Mexican) by emphasis034 +#Updated translation: Swedish by maxzomborszki +#Updated translation: Thai by tomzt +#Updated translation: Ukrainian by myksyd + +Changes from 2.05+ (build 150211) to 2.05+ (build 150310) Mar 10, 2015 +-New feature #9554: Added the possibility to change an answer value with plugin event beforeQuestionRender() (Denis Chenu) +-Fixed Issue #9241: Behaviour of numeric question type (and multi numeric) (gabrieljenik) +-Fixed issue #9454: Token edit fails after mandatory have been added (and left blank) (tpartner) +-Fixed issue #9491: Id column and Primary key is not generated when the survey is re-activated. (Carsten Schmitz) +-Fixed issue #9528: TSV show allways error screen without import information (Denis Chenu) +-Fixed issue #9531: URL parameters in panel integration are duplicated when adding additional languages to the survey (Carsten Schmitz) +-Fixed issue #9532: Standard user is not able to change his password, email or fullname (Alfredo Esteban) +-Fixed issue #9535: List with comment (dropdown presentation) doesn't display "Please choose..." (Denis Chenu) +-Fixed issue #9550: Numerical input integer evaluates incorrectly on survey load with token (Denis Chenu) +-Fixed issue: On RemoteControl2, when reordering not possible, not message is set in results. (Gabriel Jenik) +-Fixed issue: Reordering doesn't have to consider subquestions. (Gabriel Jenik) +-Fixed issue: Several XSS issues fixed in administration - thanks to Stefan Peherstorfer from http://www.hackner-security.com (Carsten Schmitz) +-Fixed issue: TSV export/import multiple with other add a other sub-question (Denis Chenu) +#Updated translation: Czech by slansky, Artaud +#Updated translation: Czech (Informal) by slansky +#Updated translation: Dutch by Han +#Updated translation: Dutch (Informal) by Han +#Updated translation: French (France) by DenisChenu, arnaud21 +#Updated translation: German by madflow +#Updated translation: Greek by kiolalis +#Updated translation: Japanese by nomoto, yamatt +#Updated translation: Korean by spn +#Updated translation: Mongolian by baatar +#Updated translation: Norwegian (Bokmal) by pmonstad +#Updated translation: Norwegian (Nynorsk) by pmonstad +#Updated translation: Polish by elisa +#Updated translation: Portuguese (Brazil) by andrepacheco, mauriciofurtado, hugomusetti +#Updated translation: Russian by ddrmoscow, vipgroup +#Updated translation: Thai by tomzt +#Updated translation: Turkish by kayazeren +#Updated translation: Ukrainian by myksyd + +Changes from 2.05+ (build 141229) to 2.05+ (build 150211) Feb 11, 2015 +-Fixed issue #9397: List_surveys API does not return surveys that specified user owns (Carsten Schmitz) +-Fixed issue #9407: Question and group export uses HTML content-type (Carsten Schmitz) +-Fixed issue #9430: AuditLog: Password logged as modified every time an user is modified (Alfredo Esteban) +-Fixed issue #9433: Auto translate not working for informal languages (mfaber) +-Fixed issue #9435: Trying to get property of non-object with debug=2 and AuditLog enabled (Alfredo Esteban) +-Fixed issue #9436: Forgotpassword functionality may disclose information about users (Alfredo Esteban) +-Fixed issue #9441: refurl does not catch external referrer url (Alfredo Esteban) +-Fixed issue #9446: Error when exporting question group to .lsg file with debugsql=1 (Denis Chenu) +-Fixed issue #9447: Token sending email is unusuable with a lot of token (Alfredo Esteban) +-Fixed issue #9453: URL parameters limited to 20 because of grid-issue (Carsten Schmitz) +-Fixed issue #9458: Under specific condition : HTMLPurifier inserts ! characters at random into emailed surveys (Denis Chenu) +-Fixed issue #9462: Regular expressions for validating fields don't validate if survey skips welcome screen (Carsten Schmitz) +-Fixed issue #9463: E-mail subject for confirmation and admin notification use non static var (Denis Chenu) +-Fixed issue #9465: Array (number)(with checkbox) question type highlight the rows that have been answered (Denis Chenu) +-Fixed issue #9466: "Import response from deactivated table" doesn't import timing table (Carsten Schmitz) +-Fixed issue #9467: Regenerate question code still usuable with activated survey (Denis Chenu) +-Fixed issue #9475: question validation tip not evaluated dynamically when questions are answered (Denis Chenu) +-Fixed issue #9476: wrongly rendered selectable years in dropbox date question (mfaber) +-Fixed issue #9477: Change of date stamp in survey settings shows a strange hint (Carsten Schmitz) +-Fixed issue #9481: RemoteControl function export_responses results is broken with JSON-RPC (Carsten Schmitz) +-Fixed issue #9482: Missing check for duplicate question IDs on activation (Carsten Schmitz) +-Fixed issue #9488: Radix separator is allways set to the base language in javascript (Denis Chenu) +-Fixed issue #9507: Admin GUI: Decimal format in answers pdf export even for 'only intenger' numeric questions (Alfredo Esteban) +-Fixed issue: Array (number) (default (dropdown)) question type don't remind actual answer (Denis Chenu) +-Fixed issue: Useless line (Alfredo Esteban) +-Fixed issue: Wrong hint text for Numeric question type when using min/max settings (Carsten Schmitz) +#Updated translation: Albanian by Helda +#Updated translation: Basque by ikt +#Updated translation: Czech by slansky +#Updated translation: Czech (Informal) by slansky +#Updated translation: Dutch by Han, mdekker +#Updated translation: Dutch (Informal) by Han +#Updated translation: Finnish by morbid +#Updated translation: French (France) by DenisChenu, arnaud21 +#Updated translation: Galician by Calidonia +#Updated translation: German by actxcellence, Liam +#Updated translation: German (Informal) by Liam +#Updated translation: Greek by kiolalis +#Updated translation: Italian by tebala, lfanfoni +#Updated translation: Italian (Informal) by lfanfoni +#Updated translation: Japanese by nomoto, yamatt +#Updated translation: Korean by kswcfe +#Updated translation: Latvian by marcic +#Updated translation: Norwegian (Bokmal) by pmonstad +#Updated translation: Norwegian (Nynorsk) by pmonstad +#Updated translation: Persian by ardalan +#Updated translation: Polish by elisa +#Updated translation: Portuguese (Brazil) by mauriciofurtado, holch +#Updated translation: Russian by vipgroup, ddrmoscow +#Updated translation: Spanish (Spain) by valdomir, aesteban, asntcrz, artasom, elkinjosetm +#Updated translation: Swedish by maxzomborszki +#Updated translation: Thai by tomzt, L_S20 +#Updated translation: Turkish by kayazeren +#Updated translation: Ukrainian by skipenko + +Changes from 2.05+ (build 141210) to 2.05+ (build 141229) Dec 29, 2014 +-Fixed issue #9171: Unable to subscribe to event (Alfredo Esteban) +-Fixed issue #9326: High memory usage if non-superadmin imports survey with acivated XSS filter (Carsten Schmitz) +-Fixed issue #9386: XSS issue related to survey deletion (Carsten Schmitz) +-Fixed issue #9400: Export Started but not yet completed tokens don't work (Denis Chenu) +-Fixed issue #9408: Excel statistics for question types "5 point array" and "5 point choice" show wrong aggregated percentage (Carsten Schmitz) +-Fixed issue #9409: PDF export by user contains html tag (Alfredo Esteban) +-Fixed issue #9415: Invalid url for image broke Print to PDF with debug 2 (Alfredo Esteban) +-Fixed issue #9418: Plugin Settings | The class name is being showed, instead of name of the plugin. (gabrieljenik) +-Fixed issue #9419: Unable to delete survey (Alfredo Esteban) +-Fixed issue #9422: Answers PDF from admin gui doesn't show question group name (Alfredo Esteban) +-Fixed issue #9425: Absence of delimeter at the end of a question group (Alfredo Esteban) +-Fixed issue #9426: No title at beginning of new respondent answers in HTML export from admin gui (Alfredo Esteban) +-Fixed issue: LimesurveyApi->getOldResponseTables return timing table (Denis Chenu) +-Fixed issue: Removing HTML tags from pdf title (Alfredo Esteban) +-Fixed issue: {TOKEN} is not replaced by token in quota message and url (Denis Chenu) +-Fixed issue: Trailing space in token key leads to unrecoverable survey situation (Carsten Schmitz) +-Removed feature: 'allowmandbackwards' config option is deprecated (Carsten Schmitz) +-Updated feature: Answers PDF export from admin GUI. (Alfredo Esteban) +-Updated feature: Audit plugin logs login, logout and failed login attempt (Alfredo Esteban) +#Updated translation: Basque by ikt +#Updated translation: Croatian by rovinj, nmisic +#Updated translation: Dutch by Han +#Updated translation: Dutch (Informal) by Han +#Updated translation: Estonian by mariliis +#Updated translation: Finnish by morbid +#Updated translation: French (France) by arnaud21 +#Updated translation: Icelandic by svelgur +#Updated translation: Italian by lfanfoni, Zeos +#Updated translation: Italian (Informal) by lfanfoni +#Updated translation: Japanese by nomoto +#Updated translation: Norwegian (Bokmal) by peterhol, pmonstad +#Updated translation: Norwegian (Nynorsk) by pmonstad +#Updated translation: Polish by elisa +#Updated translation: Russian by severt, vipgroup +#Updated translation: Spanish (Chile) by jrojas +#Updated translation: Spanish (Spain) by aesteban, valdomir +#Updated translation: Swedish by maxzomborszki +#Updated translation: Thai by tomzt + +Changes from 2.05+ (build 141126) to 2.05+ (build 141210) Dec 10, 2014 +-Updated feature: Answers export to PDF (user and admin gui) (Aestu) +-New translation: Esperanto (Carsten Schmitz) +-Fixed issue #9187: Default value edit page - Set value for all languages is not working (kairavesloot) +-Fixed issue #9187: (kairavesloot) +-Fixed issue #9255: Cannot import .lss file on MSSQL when certain text contents size limits are approached (Carsten Schmitz) +-Fixed issue #9369: Mandatory type N fields are validated upon first submit (Denis Chenu) +-Fixed issue #9372: RemoteControl export_responses breaks with some XML-RPC clients (Carsten Schmitz) +-Fixed issue #9378: Auth plugin base : lowercase uppercase mix : Not loggued but no error (Denis Chenu) +-Fixed issue #9379: DB error during installation when unsufficient permissions to create tables (Carsten Schmitz) +-Fixed issue #9381: Bug when showing message of invalid token (Aestu) +-Fixed issue #9389: Non mandatory array question type show 'error' header if there are one mandatory error (Denis Chenu) +-Fixed issue #9395: All in one survey with mandatory array have errormandatory without submit (Denis Chenu) +-Fixed issue: Array question type can show scroll bar (Denis Chenu) +-Fixed issue: PDF logo was not found in all admin templates (Aestu) +-Fixed issue: Question help text are not updated if update lang by url param (Denis Chenu) +-Fixed issue: Wrong redirect URL after upload in template editor. (Yong Zhang) +#Updated translation: Afrikaans by alistair4004 +#Updated translation: Albanian by Dorina1988, Helda +#Updated translation: Basque by losimo, artasom +#Updated translation: Chinese (Hong Kong) (Traditional) by achan, billych +#Updated translation: Croatian by rovinj, pstrbenac +#Updated translation: Dutch by Han +#Updated translation: Dutch (Informal) by Han, atvoogt +#Updated translation: Esperanto by Fabricio, sudastelaro +#Updated translation: French (France) by arnaud21 +#Updated translation: Galician by c_schmitz +#Updated translation: Greek by kiolalis +#Updated translation: Indonesian by ysulistya +#Updated translation: Italian by Zeos +#Updated translation: Kurdish (Sorani) by c_schmitz, Muhammed +#Updated translation: Polish by elisa +#Updated translation: Russian by ddrmoscow +#Updated translation: Swedish by maxzomborszki +#Updated translation: Thai by naphatthakorn, vinate + +Changes from 2.05+ (build 141123) to 2.05+ (build 141126) Nov 26, 2014 +-Fixed issue #9140: VV-Import not working with MSSQL (Carsten Schmitz) +-Fixed issue #9283: More than 255 characters can be entered into a short text question on Postgres and MSSQL which leads to an error (Carsten Schmitz) +-Fixed issue #9344: AND rules with ATTRIBUTE disappear when modify and importing the survey (Denis Chenu) +-Fixed issue #9371: Invitations/reminders cannot be sent to selected tokens (Carsten Schmitz) +#Updated translation: Japanese by yamatt + +Changes from 2.05+ (build 141113) to 2.05+ (build 141123) Nov 23, 2014 +-Fixed issue #8589: PHP object injection in surveys (Carsten Schmitz) +-Fixed issue #9282: Deactivating survey with tokens fails with postgres - patch provided by random1 (Carsten Schmitz) +-Fixed issue #9317: Participants CSV import ignores delimiter setting (Carsten Schmitz) +-Fixed issue #9322: E-mail template content lost when you trying to save after session timeout (Carsten Schmitz) +-Fixed issue #9332: Date question + debug > 1 : broken Reorder survey (gabrieljenik) +-Fixed issue #9338: Database name text is forced to lowercase (Carsten Schmitz) +-Fixed issue #9358: Strange characters in email notifications when using Chrome browser (Carsten Schmitz) +-Fixed issue #9361: HTML in group name breaks question reordering (Carsten Schmitz) +-Fixed issue #9362: Loss of attribute descriptions on update (Carsten Schmitz) +-Fixed issue #9365: The method list_question doesn't return subquestions (Carsten Schmitz) +-Fixed issue: Ugly default font for PDF output (Carsten Schmitz) +#Updated translation: Dutch by Han +#Updated translation: Dutch (Informal) by Han, atvoogt +#Updated translation: French (France) by MVT, DenisChenu +#Updated translation: German by actxcellence, jlpd, pseitz +#Updated translation: German (Informal) by actxcellence +#Updated translation: Greek by kiolalis +#Updated translation: Polish by elisa +#Updated translation: Portuguese (Portugal) by algarvio +#Updated translation: Spanish (Spain) by aesteban, artasom + +Changes from 2.05+ (build 141110) to 2.05+ (build 141113) Nov 13, 2014 +-Fixed issue #8806: Questionindex to 2 allows invalid survey submitted (Denis Chenu) +-Fixed issue #9198: Complete group's navigation can stop before clicked group (Denis Chenu) +-Fixed issue #9285: Index complete + mandatory question: Undefined notice (Denis Chenu) +-Fixed issue #9328: Language changer causes warning for mandatory questions (Denis Chenu) +-Fixed issue #9342: Attribute descriptions are not deleted in database when field is deleted (Carsten Schmitz) +-Fixed issue #9351: Database error during update when using a database other than MySQL (Carsten Schmitz) +-Fixed issue #9355: Group rights cannot be set (Carsten Schmitz) +-Fixed issue: Black background with PDF charts when using Linux (Carsten Schmitz) +-Updated translation: Finnish by morbid +-Updated translation: Polish by elisa + +Changes from 2.05+ (build 141109) to 2.05+ (build 141110) Nov 10, 2014 +Fixed issue #9351: Error on update for non-MySQL installations + +Changes from 2.05+ (build 141020) to 2.05+ (build 141109) Nov 09, 2014 +-Fixed issue #9026: If empty survey, export 1 empty record to avoid blank results. (gabrieljenik) +-Fixed issue #9307: Calling a survey with a non-existing token leads to PHP Warning (debug=1) (Denis Chenu) +-Fixed issue #9320: Unable to edit local the bounce parameters in token management (Denis Chenu) +-Fixed issue #9339: Duplicate questions IDs used when new survey that has different based language than previous surveys (Carsten Schmitz) +-Fixed issue #9343: Unable to see Question group survey_logic_file after import (Denis Chenu) +-Fixed issue: Files cannot be downloaded if magic_quotes is activated on the server (Carsten Schmitz) +-Fixed issue: Placing several quota members on the same question leads to unrecoverable error in admin and survey runtime (Carsten Schmitz) +#Updated translation: Catalan by valdomir +#Updated translation: Croatian by netcom +#Updated translation: Czech by slansky +#Updated translation: Czech (Informal) by slansky +#Updated translation: Finnish by morbid +#Updated translation: Greek by kiolalis +#Updated translation: Hungarian by lukacs +#Updated translation: Italian by lfanfoni +#Updated translation: Italian (Informal) by lfanfoni +#Updated translation: Japanese by yamatt, nomoto, ngyuki +#Updated translation: Lithuanian by simasj +#Updated translation: Polish by elisa +#Updated translation: Portuguese (Brazil) by mauriciofurtado, holch +#Updated translation: Serbian by MilaVeljovic +#Updated translation: Spanish (Chile) by jcarcamo +#Updated translation: Spanish (Spain) by valdomir +#Updated translation: Turkish by kayazeren + +Changes from 2.05+ (build 141003) to 2.05+ (build 141020) Oct 20, 2014 +-Fixed issue #9218: When adding conditions fields referring to the same token field (Carsten Schmitz) +-Fixed issue #9261: Emailstatus not filled by default when using remotecontrol invite_participants (Denis Chenu) +-Fixed issue #9266: Chinese and Japanese characters not suppoerted when using MS SQL Server (Carsten Schmitz) +-Fixed issue #9267: Error message when importing an survey archive having survey URL parameters (Carsten Schmitz) +-Fixed issue #9274: Uppercase database name leads to errors (Carsten Schmitz) +-Fixed issue #9278: Simple quote are replaced by HTML entities with HTML editor (Denis Chenu) +-Fixed issue #9281: Unable to use Expression Manager for mail notification (Denis Chenu) +-Fixed issue #9287: Missing asterisk in mandatory fields (Denis Chenu) +-Fixed issue #9293: Quotation marks in email subjects are stripped when saved to the database including all following text (Denis Chenu) +-Fixed issue #9298: Sort for a numeric token_attribute field in any participant table fails completely (Carsten Schmitz) +-Fixed issue #9300: XSS protection or variable substitution breaks links with variable substitutions (Denis Chenu) +-Fixed issue #9314: Error on PDF export w/ chinese content (mfaber) +#Updated translation: Croatian by rovinj, daniflo +#Updated translation: Dutch by Han +#Updated translation: Dutch (Informal) by Han +#Updated translation: French (France) by arnaud21 +#Updated translation: German by actxcellence +#Updated translation: German (Informal) by actxcellence +#Updated translation: Greek by kiolalis +#Updated translation: Hungarian by lukacs +#Updated translation: Norwegian (Bokmal) by pmonstad +#Updated translation: Norwegian (Nynorsk) by pmonstad +#Updated translation: Polish by elisa +#Updated translation: Portuguese (Portugal) by samarta +#Updated translation: Russian by vipgroup +#Updated translation: Slovenian by dusan +#Updated translation: Spanish (Spain) by caybar +#Updated translation: Swedish by maxzomborszki + +Changes from 2.05+ (build 140915) to 2.05+ (build 141003) Oct 3, 2014 +-Fixed issue #9181: When dumping database sometimes lines are left out (Carsten Schmitz) +-Fixed issue #9182: Data check integrity function uses too much memory if you have many surveys (Carsten Schmitz) +-Fixed issue #9225: Infite redirection loop with WebServer authentication (Denis Chenu) +-Fixed issue #9232: Error when calling list_participants and passing aAttributes array (Carsten Schmitz) +-Fixed issue #9233: list_participants delivers invalid token data (Carsten Schmitz) +-Fixed issue #9234: White page after save global settings if done just after auto-update (Carsten Schmitz) +-Fixed issue #9239: Wrong language used for Expresson Manager in printable version (Denis Chenu) +-Fixed issue #9240: Leading zeros removed during display for text (Denis Chenu) +-Fixed issue #9258: Quick translation broken ith valid KEY (Denis Chenu) +-Fixed issue #9259: slider min/max can be set as non-numeric, which then breaks survey (Denis Chenu) +-Fixed issue #9269: Unable to delete label set with urlFormat get (Denis Chenu) +-Fixed issue #9270: getallsets/ajaxsets issue when saving labelset (Denis Chenu) +-Fixed issue #9271: Array dual scale causes errors (Denis Chenu) +-Fixed issue: High memory usage on database backup procedure (Carsten Schmitz) +-Fixed issue: High memory usage on db upgrade from older versions (Carsten Schmitz) +-Fixed issue: PDF statistics cannot be shown (Carsten Schmitz) +-New feature: can use Expression Manager in slider min/max/step and default (Denis Chenu) +#Updated translation: Czech by slansky +#Updated translation: Czech (Informal) by slansky +#Updated translation: Dutch by Han +#Updated translation: Dutch (Informal) by Han +#Updated translation: French (France) by arnaud21, DenisChenu +#Updated translation: Georgian by Davitus +#Updated translation: German by c_schmitz, actxcellence +#Updated translation: German (Informal) by c_schmitz, actxcellence +#Updated translation: Greek by kiolalis +#Updated translation: Italian by lfanfoni +#Updated translation: Italian (Informal) by lfanfoni +#Updated translation: Japanese by nomoto, yamatt +#Updated translation: Lithuanian by simasj +#Updated translation: Norwegian (Bokmal) by pmonstad +#Updated translation: Norwegian (Nynorsk) by pmonstad +#Updated translation: Polish by elisa +#Updated translation: Russian by vipgroup, ddrmoscow +#Updated translation: Spanish (Spain) by kadejo +#Updated translation: Swedish by maxzomborszki +#Updated translation: Turkish by kayazeren + +Changes from 2.05+ (build 140911) to 2.05+ (build 140915) Sept 15, 2014 +-New feature #8596: Allow empty dates for RemoteControl add_response call (Nate Baker) +-Fixed issue #8221: Update TCPDF to ver. 6.xx (Alain Bearez) +-Fixed issue #9031: get_summary does not return correct completed_responses (patch by ravindrakhokharia) (Carsten Schmitz) +-Fixed issue #9149: Enable token-based response persistence? lack of explanation (Denis Chenu) +-Fixed issue #9173: Only one record of same name/email can be added from CPDB to a token table (Carsten Schmitz) +-Fixed issue #9195: SPSS Export - Text answers are cut on export - wrong data types assigned (Carsten Schmitz) +-Fixed issue #9209: RemoteControl export_responses_by_token does not return all responses (Carsten Schmitz) +-Fixed issue #9220: Slider cannot be changed if decimal separator is comma and Slider accuracy is less than 1 (Denis Chenu) +-Fixed issue #9224: Confirmation emails not being sent if several email addresses are used in the token (Carsten Schmitz) +-Fixed issue #9229: Language switch in token form with urlFormat to get broken (Denis Chenu) +-Fixed issue #9231: Error when exporting survey archive (Carsten Schmitz) +#Updated translation: Czech by slansky, kubaj +#Updated translation: Czech (Informal) by slansky +#Updated translation: Finnish by morbid, hannikkala +#Updated translation: French (France) by arnaud21 +#Updated translation: Indonesian by ysulistya +#Updated translation: Italian by lfanfoni +#Updated translation: Italian (Informal) by lfanfoni +#Updated translation: Norwegian (Bokmal) by pmonstad +#Updated translation: Norwegian (Nynorsk) by pmonstad +#Updated translation: Polish by elisa +#Updated translation: Turkish by kayazeren + +Changes from 2.05+ (build 140902) to 2.05+ (build 140911) Sept 11, 2014 +-Fixed issue #9024: Unable to access attribute management (tpartner) +-Fixed issue #9047: Replacement field properties don't show up/bad layout (tpartner) +-Fixed issue #9132: Remote API won't work when using MSSQL dblib driver on Linux (Carsten Schmitz) +-Fixed issue #9140: Auto ID is not set properly when using Postgres and deactivating and reactivating the survey (Carsten Schmitz) +-Fixed issue #9140: Auto ID is not set properly when using Postgres and insert new id with VV import (Denis Chenu) +-Fixed issue #9140: No error message if data is not inserted on first page (Carsten Schmitz) +-Fixed issue #9152: CSV export of CPDB with additional attributes doesn't export attribute values properly (Carsten Schmitz) +-Fixed issue #9162: Pagination in CPDB panel not working (Carsten Schmitz) +-Fixed issue #9172: Sent invitations are not being marked as sent when a semi-colon exist in the email address field (Carsten Schmitz) +-Fixed issue #9174: OPTOUTURL from invitation email not working si EmailStatuts is not exactly on "OK" (Denis Chenu) +-Fixed issue #9181: When dumping database sometimes lines are left out (Carsten Schmitz) +-Fixed issue #9183: Template upload: "zip" is added to the templatename (Carsten Schmitz) +-Fixed issue #9185: End page doesn't display correctly if it contains only an image and no text (Carsten Schmitz) +-Fixed issue #9188: Array (Numbers) with Checkbox layout maximum/minimum answer validation not working if item was check and unchecked (Carsten Schmitz) +-Fixed issue #9196: Can't update a token response if the last group was hidden (Carsten Schmitz) +-Fixed issue #9199: JS error "showhelp is not defined" (Carsten Schmitz) +-Fixed issue #9200: Delete selected participants from CPDB does not allow to select a deletion mode (Carsten Schmitz) +-Fixed issue #9201: Possibility to perform XSS across email (Denis Chenu) +-Fixed issue #9208: RemoteControl function export_responses_by_token ignores completion status when several responses for the same token exist (Carsten Schmitz) +-Fixed issue #9210: ComfortUpdate not working if debug mode is activated (Carsten Schmitz) +-Fixed issue #9213: Resume on Multiple numerical input displays 10 trailing zeros after the decimal place (Denis Chenu) +-Fixed issue #9216: CPDB paging doesn't seem to be working properly (tpartner) +#Updated translation: Dutch by Han +#Updated translation: Dutch (Informal) by Han +#Updated translation: French (France) by arnaud21 +#Updated translation: German by actxcellence, c_schmitz, DLange +#Updated translation: German (Informal) by actxcellence +#Updated translation: Greek by kiolalis +#Updated translation: Indonesian by ysulistya +#Updated translation: Japanese by nomoto, yamatt +#Updated translation: Norwegian (Bokmal) by pmonstad +#Updated translation: Norwegian (Nynorsk) by pmonstad +#Updated translation: Polish by elisa +#Updated translation: Russian by vipgroup +#Updated translation: Spanish (Spain) by jigal +#Updated translation: Swedish by maxzomborszki +#Updated translation: Turkish by kayazeren + +Changes from 2.05+ (build 140821) to 2.05+ (build 140902) Sept 2, 2014 +-Fixed issue #9190 : reduce memory footprint for "Ranking" (R) type (Denis Chenu) +-Fixed issue: CSS being broken when loading email template for detailed admin notification (Carsten Schmitz) +-Fixed issue: Misuse of 'xml' as file extension for tab-separated-values format (vundicind) +-Fixed issue: Notification emails not being sent if spaces are preceding the email address (Carsten Schmitz) +-New feature: Add title on question list when exporting result (Denis Chenu) +-New feature: Default value for yes/no question type (kairavesloot) +-New translation: Kazakh +#Updated translation: Arabic by sessid, safi00972 +#Updated translation: Bulgarian by simid +#Updated translation: Chinese (Simplified) by yanglaw +#Updated translation: Dutch by L191 +#Updated translation: Dutch (Informal) by Han +#Updated translation: French (France) by arnaud21 +#Updated translation: Greek by MikeConom, kiolalis +#Updated translation: Kazakh by c_schmitz +#Updated translation: Norwegian (Bokma) by pmonstad +#Updated translation: Norwegian (Nynorsk) by pmonstad +#Updated translation: Polish by elisa +#Updated translation: Russian by ddrmoscow, vipgroup +#Updated translation: Spanish (Mexican) by c_schmitz +#Updated translation: Spanish (Spain) by aesteban +#Updated translation: Swedish by maxzomborszki +#Updated translation: Tamil by apmuthu + +Changes from 2.05+ (build 140811) to 2.05+ (build 140821) Aug 21, 2014 +-Fixed issue #9164: Error when adding participant to exported and imported survey (Carsten Schmitz) +-Fixed issue #9167: Small JS issue in survey browsing, public survey list and data entry (Carsten Schmitz) +-Fixed issue #9175: Feature "Allow multiple responses or update responses with one token" failed (Denis Chenu) +-Fixed issue #9177: Surveys with quote causing error in MSSQL (Denis Chenu) +-Fixed issue: Multiple question codes in array filter break printable version (Carsten Schmitz) +-Fixed issue: Vulnerability in installer (Carsten Schmitz) +#Updated translation: Finnish by morbid +#Updated translation: French (France) by arnaud21 +#Updated translation: Georgian by giorgi +#Updated translation: Greek by kiolalis +#Updated translation: Italian by lfanfoni +#Updated translation: Italian (Informal) by lfanfoni +#Updated translation: Japanese by yamatt +#Updated translation: Latvian by marcic, vipgroup, zemnieks +#Updated translation: Malay by qfirdaus +#Updated translation: Polish by elisa +#Updated translation: Russian by vipgroup +#Updated translation: Swedish by maxzomborszki +#Updated translation: Ukrainian by bkrupinski + +Changes from 2.05+ (build 140730) to 2.05+ (build 140811) Aug 11, 2014 +-Fixed issue #9101: I can not switch to a template with uppercase cahracter in template editor (Carsten Schmitz) +-Fixed issue #9122: User can view 'edit local settings' button even without access (Denis Chenu) +-Fixed issue #9153: Database dump tool not properly quoting all special chars (Carsten Schmitz) +-Fixed issue : HTML editor broke using < > ... in Expression (Denis Chenu) +-Fixed issue: Lost function convert_value() (weberho) +#Updated translation: Chinese (Hong Kong) (Traditional) by alviniun +#Updated translation: Chinese (Taiwan) (Traditional) by drawinglee +#Updated translation: Czech by slansky +#Updated translation: Czech (Informal) by slansky +#Updated translation: Dutch by Han, L191 +#Updated translation: Dutch (Informal) by Han +#Updated translation: Estonian by klaster, mariliis +#Updated translation: Finnish by morbid +#Updated translation: French (France) by tamacheq, arnaud21, DenisChenu +#Updated translation: Greek by kiolalis +#Updated translation: Italian by lfanfoni +#Updated translation: Italian (Informal) by lfanfoni +#Updated translation: Japanese by yamatt +#Updated translation: Norwegian (Bokmal) by pmonstad +#Updated translation: Norwegian (Nynorsk) by pmonstad +#Updated translation: Polish by elisa +#Updated translation: Russian by vipgroup +#Updated translation: Thai by bordin +#Updated translation: Turkish by kayazeren + +Changes from 2.05+ (build 140717) to 2.05+ (build 140730) Jul 30, 2014 +-Fixed issue #9052: Importing old .csv survey structure file does not properly import quotas (Carsten Schmitz) +-Fixed issue #9100: ComfortUpdate step 2 shows absolute file paths (Carsten Schmitz) +-Fixed issue #9105: Unable to open popup email for administrator in French (Carsten Schmitz) +-Fixed issue #9115: Chrome has a bug which causes slider layouts not to be styled properly redraw (Carsten Schmitz) +-Fixed issue #9120: Migration issue from 1.90 to 2.05 when using Postgres (Carsten Schmitz) +-Fixed issue #9138: Sending multiple invitations, reminders to the same token (Carsten Schmitz) +-Fixed issue #9143: Comfort update backups have different extensions (Carsten Schmitz) +-Fixed issue #9147: Deprecated notice on PHP 5.5 when emailing invitations (Carsten Schmitz) +-Fixed issue : Quota with unrelevant question and default value are true even if question is unrelevant (Denis Chenu) +-Fixed issue : Unable to save a survey again after reload a survey (Denis Chenu) +-Fixed issue: XAMPP package not properly installing the database (Carsten Schmitz) +#Updated translation: Chinese (Taiwan) (Traditional) by drawinglee +#Updated translation: Czech by slansky +#Updated translation: Czech (Informal) by slansky +#Updated translation: Dutch by Han, L191 +#Updated translation: Dutch (Informal) by Han +#Updated translation: Finnish by morbid +#Updated translation: French (France) by arnaud21, DenisChenu, JMI +#Updated translation: German by c_schmitz +#Updated translation: German (Informal) by c_schmitz +#Updated translation: Greek by kiolalis +#Updated translation: Hungarian by aron +#Updated translation: Japanese by nomoto, yamatt +#Updated translation: Norwegian (Bokmal) by pmonstad +#Updated translation: Norwegian (Nynorsk) by pmonstad +#Updated translation: Polish by elisa +#Updated translation: Russian by vipgroup +#Updated translation: Swedish by maxzomborszki + +Changes from 2.05+ (build 140703) to 2.05+ (build 140717) Jul 17, 2014 +-Fixed issue #7895: Quota are not tested for hidden question (relevance to 1) (Denis Chenu) +-Fixed issue #8906: Long URI with autofilter (Denis Chenu) +-Fixed issue #9126: Survey's token and EM variables aren't set when exporting printing results view to PDF format. (Denis Chenu) +-Fixed issue #9128: Using screen readers JAWS and NVDA, image menu are unreadable (Denis Chenu) +-Fixed issue #9134: Database error when trying to reload survey data (Denis Chenu) +-Fixed issue #9141: No file can be uploaded if Max number of files is not set (Denis Chenu) +-Fixed issue: Tip before tooltip on footer manual link (Denis Chenu) +-Fixed issue: Unable to enter some date without datepicker (Denis Chenu) +-Fixed issue: XSS in label management and use (Denis Chenu) +-New feature #9066: afterSurveyComplete aren't call from Quota : afterSurveyQuota (Denis Chenu) +#Updated translation: Czech by slansky +#Updated translation: Czech (Informal) by slansky +#Updated translation: Dutch by Han, L191 +#Updated translation: Dutch (Informal) by Han +#Updated translation: Finnish by morbid +#Updated translation: French (France) by arnaud21, ipwnin3D +#Updated translation: German (Informal) by DLange +#Updated translation: Greek by kiolalis +#Updated translation: Italian by lfanfoni +#Updated translation: Italian (Informal) by lfanfoni +#Updated translation: Polish by elisa +#Updated translation: Russian by vipgroup, ddrmoscow +#Updated translation: Swedish by ipwnin3D +#Updated translation: Swedish by sofve +#Updated translation: Thai by adzpire +#Updated translation: Turkish by kayazeren + +Changes from 2.05+ (build 140618) to 2.05+ (build 140703) Jul 3, 2014 +-Fixed issue #8028: File upload dialog function can be updated (Denis Chenu) +-Fixed issue #9001: Gramar error in validation message (Carsten Schmitz) +-Fixed issue #9071: Language switch not working when using move previous (Denis Chenu) +-Fixed issue #9105: Unable to open popup email editor in French (Carsten Schmitz) +-Fixed issue #9117: Array dual scale (dropdown) question : First answer is allways selected if don't show no answer (Denis Chenu) +-Fixed issue #9127: Invalid quota broke quota view (Denis Chenu) +-Fixed issue: Asterisks in global settings not visible for fixed settings (Carsten Schmitz) +-Fixed issue: Miscalculation of completed quota for Multi Question type (Denis Chenu) +-Fixed issue: Missing translation in token send email process (Denis Chenu) +-Fixed issue: Search parameter vulnerability in CPDB (Carsten Schmitz) +-Fixed issue: Untranslated text in multitext array question sum function (Carsten Schmitz) +-Fixed issue: Vulnerable parameter on survey resume (Carsten Schmitz) +-Fixed issue: XSS reflection in CPDB and global settings (Carsten Schmitz) +-New feature : use shortest url with urlFormat path (Denis Chenu) +#Updated translation: Albanian by florianika +#Updated translation: Czech by slansky +#Updated translation: Czech (Informal) by slansky +#Updated translation: Dutch by Han, L191 +#Updated translation: Dutch (Informal) by Han +#Updated translation: French (France) by DenisChenu, arnaud21 +#Updated translation: German by c_schmitz, DLange +#Updated translation: German (Informal) by c_schmitz, DLange +#Updated translation: Italian by lfanfoni +#Updated translation: Italian (Informal) by lfanfoni +#Updated translation: Japanese by nomoto, yamatt +#Updated translation: Malay by astrasia +#Updated translation: Norwegian (Bokmal) by pmonstad +#Updated translation: Norwegian (Nynorsk) by pmonstad +#Updated translation: Polish by elisa +#Updated translation: Portuguese (Brazil) by mauriciofurtado, rhnascimento +#Updated translation: Romanian by Borgie +#Updated translation: Romanian by filipguttman, Borgie +#Updated translation: Russian by vipgroup +#Updated translation: Tamil by apmuthu +#Updated translation: Thai by adzpire +#Updated translation: Turkish by kayazeren + +Changes from 2.05+ (build 140612) to 2.05+ (build 140618) Jun 18, 2014 -Fixed issue #9025: Error showing pie chart in statistics when using MS SQL server (Carsten Schmitz) -Fixed issue #9050: Template permissions for a user are lost after global permissions are saved (Carsten Schmitz) -Fixed issue #9077: CSS issue with Basic template when using Array filter (tpartner) @@ -92,7 +735,7 @@ Changes from 2.05+ (build 140612) to 2.05+ (build 140618) June 18, 2014 #Updated translation: Portuguese (Brazil) by rhnascimento, mauriciofurtado #Updated translation: Thai by adzpire -Changes from 2.05+ (build 140611) to 2.05+ (build 140612) June 12, 2014 +Changes from 2.05+ (build 140611) to 2.05+ (build 140612) Jun 12, 2014 Fixed issue #9064: Blank page/error on step 4 when updating from version 2.0 Changes from 2.05+ (build 140520) to 2.05+ (build 140611) June 11, 2014 diff --git a/sources/framework/CHANGELOG b/sources/framework/CHANGELOG index fd5e1d7..1a5b0c3 100644 --- a/sources/framework/CHANGELOG +++ b/sources/framework/CHANGELOG @@ -1,6 +1,10 @@ Yii Framework Change Log ======================== +Version 1.1.15 June 29, 2014 +---------------------------- +- Bug (CVE-2014-4672): CDetailView may be exploited to allow executing arbitrary PHP script on the server (cebe, qiangxue) + Version 1.1.14 August 11, 2013 ------------------------------ - Bug: There was unnecessary echo in CRUD views generated by Gii (samdark) diff --git a/sources/framework/UPGRADE b/sources/framework/UPGRADE index dfe1960..62067f2 100644 --- a/sources/framework/UPGRADE +++ b/sources/framework/UPGRADE @@ -1,4 +1,4 @@ - Upgrading Instructions for Yii Framework v1.1.14 + Upgrading Instructions for Yii Framework v1.1.15 ================================================ !!!IMPORTANT!!! @@ -17,6 +17,11 @@ General upgrade instructions - Check if everything is OK, if not — revert from backup and post issues to Yii issue tracker. + +Upgrading from v1.1.14 +---------------------- + + Upgrading from v1.1.13 ---------------------- diff --git a/sources/framework/YiiBase.php b/sources/framework/YiiBase.php index e4486dc..b9e27b7 100644 --- a/sources/framework/YiiBase.php +++ b/sources/framework/YiiBase.php @@ -80,7 +80,7 @@ class YiiBase */ public static function getVersion() { - return '1.1.14'; + return '1.1.15'; } /** diff --git a/sources/framework/web/CDbHttpSession.php b/sources/framework/web/CDbHttpSession.php index bb4a6f1..9b1e58b 100644 --- a/sources/framework/web/CDbHttpSession.php +++ b/sources/framework/web/CDbHttpSession.php @@ -246,6 +246,9 @@ class CDbHttpSession extends CHttpSession { $expire=time()+$this->getTimeout(); $db=$this->getDbConnection(); + + if($db->getDriverName()=='pgsql' ) + $data=new CDbExpression("convert_to(".$db->quoteValue($data).", 'UTF8')"); if($db->getDriverName()=='sqlsrv' || $db->getDriverName()=='mssql' || $db->getDriverName()=='dblib') $data=new CDbExpression('CONVERT(VARBINARY(MAX), '.$db->quoteValue($data).')'); if($db->createCommand()->select('id')->from($this->sessionTableName)->where('id=:id',array(':id'=>$id))->queryScalar()===false) diff --git a/sources/framework/yiilite.php b/sources/framework/yiilite.php index b7d33cb..fc9ce51 100644 --- a/sources/framework/yiilite.php +++ b/sources/framework/yiilite.php @@ -40,7 +40,7 @@ class YiiBase private static $_logger; public static function getVersion() { - return '1.1.14'; + return '1.1.15'; } public static function createWebApplication($config=null) { diff --git a/sources/framework/zii/widgets/CDetailView.php b/sources/framework/zii/widgets/CDetailView.php index 95f081b..56d05a1 100644 --- a/sources/framework/zii/widgets/CDetailView.php +++ b/sources/framework/zii/widgets/CDetailView.php @@ -209,7 +209,7 @@ class CDetailView extends CWidget if(!isset($attribute['type'])) $attribute['type']='text'; if(isset($attribute['value'])) - $value=is_callable($attribute['value']) ? call_user_func($attribute['value'],$this->data) : $attribute['value']; + $value=is_object($attribute['value']) && get_class($attribute['value']) === 'Closure' ? call_user_func($attribute['value'],$this->data) : $attribute['value']; elseif(isset($attribute['name'])) $value=CHtml::value($this->data,$attribute['name']); else diff --git a/sources/index.php b/sources/index.php index 7646522..85fa96d 100644 --- a/sources/index.php +++ b/sources/index.php @@ -192,7 +192,7 @@ if (!file_exists(APPPATH . 'config/config' . EXT)) { $runtimePath = $config['runtimePath']; if (!is_dir($runtimePath) || !is_writable($runtimePath)) { // @@TODO: present html page styled like the installer - die (sprintf('%s should be writable by the webserver (755 or 775).', $runtimePath)); + die (sprintf('%s should be writable by the webserver (766 or 776).', $runtimePath)); } } diff --git a/sources/installer/sql/create-mssql.sql b/sources/installer/sql/create-mssql.sql index ec735e5..36f0813 100644 --- a/sources/installer/sql/create-mssql.sql +++ b/sources/installer/sql/create-mssql.sql @@ -1,13 +1,13 @@ -- Note that MSSQL needs to have specified if a column is NULL or not NULL because -- depending on the database driver the default may by varying. --- +-- To store Unicode/UTF-8 the related columns need to be nvarchar/ntext -- Table structure for table answers -- CREATE TABLE [prefix_answers] ( [qid] int NOT NULL default '0', [code] varchar(5) NOT NULL default '', -[answer] varchar(max) NOT NULL, +[answer] nvarchar(max) NOT NULL, [sortorder] int NOT NULL, [assessment_value] int NOT NULL default '0', [language] varchar(20)NOT NULL default 'en', @@ -23,10 +23,10 @@ CREATE TABLE [prefix_assessments] ( [sid] int NOT NULL default '0', [scope] varchar(5) NOT NULL default '', [gid] int NOT NULL default '0', -[name] varchar(max) NOT NULL, +[name] nvarchar(max) NOT NULL, [minimum] varchar(50) NOT NULL default '', [maximum] varchar(50) NOT NULL default '', -[message] varchar(max) NOT NULL, +[message] nvarchar(max) NOT NULL, [language] varchar(20) NOT NULL default 'en', PRIMARY KEY ([id],[language]) ); @@ -41,7 +41,7 @@ CREATE TABLE [prefix_conditions] ( [cqid] int NOT NULL default 0, [cfieldname] varchar(50) NOT NULL default '', [method] varchar(5) NOT NULL default '', -[value] varchar(255) NOT NULL default '', +[value] nvarchar(255) NOT NULL default '', [scenario] int NOT NULL default 1, PRIMARY KEY ([cid]) ); @@ -56,7 +56,7 @@ CREATE TABLE [prefix_defaultvalues] ( [sqid] int NOT NULL default 0, [language] varchar(20) NOT NULL, [specialtype] varchar(20) NOT NULL default '', -[defaultvalue] varchar(max) NULL, +[defaultvalue] nvarchar(max) NULL, PRIMARY KEY ([qid] , [specialtype], [language], [scale_id], [sqid]) ); @@ -95,12 +95,12 @@ CREATE TABLE [prefix_failed_login_attempts] ( CREATE TABLE [prefix_groups] ( [gid] int NOT NULL IDENTITY (1,1), [sid] int NOT NULL default 0, -[group_name] varchar(100) NOT NULL default '', +[group_name] nvarchar(100) NOT NULL default '', [group_order] int NOT NULL default 0, -[description] varchar(max) NULL, -[language] varchar(20) NOT NULL default 'en', -[randomization_group] varchar(20) NOT NULL default '', -[grelevance] varchar(max) NULL, +[description] nvarchar(max) NULL, +[language] nvarchar(20) NOT NULL default 'en', +[randomization_group] nvarchar(20) NOT NULL default '', +[grelevance] nvarchar(max) NULL, PRIMARY KEY ([gid],[language]) ) ; @@ -111,8 +111,8 @@ PRIMARY KEY ([gid],[language]) -- CREATE TABLE [prefix_labels] ( [lid] int NOT NULL default '0', -[code] varchar(5) NOT NULL default '', -[title] varchar(max) NULL, +[code] nvarchar(5) NOT NULL default '', +[title] nvarchar(max) NULL, [sortorder] int NOT NULL, [language] varchar(20) NOT NULL default 'en', [assessment_value] int NOT NULL default '0', @@ -126,7 +126,7 @@ create index [labels_code_idx] on [prefix_labels] ([code]); -- CREATE TABLE [prefix_labelsets] ( [lid] int NOT NULL IDENTITY (1,1), -[label_name] varchar(100) NOT NULL default '', +[label_name] nvarchar(100) NOT NULL default '', [languages] varchar(200) default 'en' NULL, PRIMARY KEY ([lid]) ); @@ -138,7 +138,7 @@ PRIMARY KEY ([lid]) CREATE TABLE [prefix_participant_attribute] ( [participant_id] varchar(50) NOT NULL, [attribute_id] int NOT NULL, -[value] varchar(max) NOT NULL, +[value] nvarchar(max) NOT NULL, PRIMARY KEY ([participant_id],[attribute_id]) ); @@ -148,7 +148,7 @@ PRIMARY KEY ([participant_id],[attribute_id]) -- CREATE TABLE [prefix_participant_attribute_names_lang] ( [attribute_id] int NOT NULL, -[attribute_name] varchar(255) NOT NULL, +[attribute_name] nvarchar(255) NOT NULL, [lang] varchar(20) NOT NULL, PRIMARY KEY ([attribute_id],[lang]) ); @@ -160,7 +160,7 @@ PRIMARY KEY ([attribute_id],[lang]) CREATE TABLE [prefix_participant_attribute_names] ( [attribute_id] int NOT NULL IDENTITY (1,1), [attribute_type] varchar(4) NOT NULL, -[defaultname] varchar(50) NOT NULL, +[defaultname] nvarchar(50) NOT NULL, [visible] varchar(5) NOT NULL, PRIMARY KEY ([attribute_id],[attribute_type]) ); @@ -172,7 +172,7 @@ PRIMARY KEY ([attribute_id],[attribute_type]) CREATE TABLE [prefix_participant_attribute_values] ( [value_id] int NOT NULL IDENTITY (1,1) PRIMARY KEY, [attribute_id] int NOT NULL, -[value] varchar(max) NOT NULL +[value] nvarchar(max) NOT NULL ); @@ -193,9 +193,9 @@ PRIMARY KEY ([participant_id],[share_uid]) -- CREATE TABLE [prefix_participants] ( [participant_id] varchar(50) NOT NULL, -[firstname] varchar(40) NULL, -[lastname] varchar(40) NULL, -[email] varchar(254) NULL, +[firstname] nvarchar(40) NULL, +[lastname] nvarchar(40) NULL, +[email] nvarchar(254) NULL, [language] varchar(40) NULL, [blacklisted] varchar(1) NOT NULL, [owner_uid] int NOT NULL, @@ -245,7 +245,7 @@ CREATE TABLE [prefix_plugin_settings] ( [model] varchar(50) NULL, [model_id] int NULL, [key] varchar(50) NOT NULL, -[value] varchar(max) NULL, +[value] nvarchar(max) NULL, PRIMARY KEY (id), ); @@ -256,8 +256,8 @@ PRIMARY KEY (id), CREATE TABLE [prefix_question_attributes] ( [qaid] int NOT NULL IDENTITY (1,1), [qid] int NOT NULL default '0', -[attribute] varchar(50) NULL, -[value] varchar(max) NULL, +[attribute] nvarchar(50) NULL, +[value] nvarchar(max) NULL, [language] varchar(20) NULL, PRIMARY KEY ([qaid]) ); @@ -272,10 +272,10 @@ CREATE TABLE [prefix_questions] ( [sid] int NOT NULL default '0', [gid] int NOT NULL default '0', [type] varchar(1) NOT NULL default 'T', -[title] varchar(20) NOT NULL default '', -[question] varchar(max) NOT NULL, -[preg] varchar(max) NULL, -[help] varchar(max) NULL, +[title] nvarchar(20) NOT NULL default '', +[question] nvarchar(max) NOT NULL, +[preg] nvarchar(max) NULL, +[help] nvarchar(max) NULL, [other] varchar(1) NOT NULL default 'N', [mandatory] varchar(1) NULL, [question_order] int NOT NULL, @@ -292,7 +292,7 @@ PRIMARY KEY ([qid],[language]) CREATE TABLE [prefix_quota] ( [id] int NOT NULL IDENTITY (1,1), [sid] int NULL, -[name] varchar(255) NULL, +[name] nvarchar(255) NULL, [qlimit] int NULL, [action] int NULL, [active] int NOT NULL default '1', @@ -308,10 +308,10 @@ CREATE TABLE [prefix_quota_languagesettings] ( [quotals_id] int NOT NULL IDENTITY (1,1), [quotals_quota_id] int NOT NULL default 0, [quotals_language] varchar(45) NOT NULL default 'en', -[quotals_name] varchar(255) NULL, -[quotals_message] varchar(max) NOT NULL, -[quotals_url] varchar(255) NULL, -[quotals_urldescrip] varchar(255) NULL, +[quotals_name] nvarchar(255) NULL, +[quotals_message] nvarchar(max) NOT NULL, +[quotals_url] nvarchar(255) NULL, +[quotals_urldescrip] nvarchar(255) NULL, PRIMARY KEY ([quotals_id]) ); @@ -336,9 +336,9 @@ CREATE TABLE [prefix_saved_control] ( [scid] int NOT NULL IDENTITY (1,1), [sid] int NOT NULL default '0', [srid] int NOT NULL default '0', -[identifier] varchar(max) NOT NULL, -[access_code] varchar(max) NOT NULL, -[email] varchar(254) NULL, +[identifier] nvarchar(max) NOT NULL, +[access_code] nvarchar(max) NOT NULL, +[email] nvarchar(254) NULL, [ip] varchar(max) NOT NULL, [saved_thisstep] varchar(max) NOT NULL, [status] varchar(1) NOT NULL default '', @@ -364,7 +364,7 @@ PRIMARY KEY ( [id] ) -- CREATE TABLE [prefix_settings_global] ( [stg_name] varchar(50) NOT NULL default '', -[stg_value] varchar(255) NOT NULL default '', +[stg_value] nvarchar(255) NOT NULL default '', PRIMARY KEY ([stg_name]) ); @@ -401,16 +401,16 @@ CREATE TABLE prefix_survey_url_parameters ( CREATE TABLE [prefix_surveys] ( [sid] int NOT NULL, [owner_id] int NOT NULL, -[admin] varchar(50) NULL, +[admin] nvarchar(50) NULL, [active] varchar(1) NOT NULL default 'N', [expires] DATETIME NULL, [startdate] DATETIME NULL, -[adminemail] varchar(254) NULL, +[adminemail] nvarchar(254) NULL, [anonymized] varchar(1) NOT NULL default 'N', -[faxto] varchar(20) NULL, +[faxto] nvarchar(20) NULL, [format] varchar(1) NULL, [savetimings] varchar(1) NOT NULL default 'N', -[template] varchar(100) default 'default', +[template] nvarchar(100) default 'default', [language] varchar(50) NULL, [additional_languages] varchar(255) NULL, [datestamp] varchar(1) NOT NULL default 'N', @@ -433,7 +433,7 @@ CREATE TABLE [prefix_surveys] ( [assessments] varchar(1) NOT NULL default 'N', [usecaptcha] varchar(1) NOT NULL default 'N', [usetokens] varchar(1) NOT NULL default 'N', -[bounce_email] varchar(254) NULL, +[bounce_email] nvarchar(254) NULL, [attributedescriptions] varchar(max) NULL, [emailresponseto] varchar(max) NULL, [emailnotificationto] varchar(max) NULL, @@ -446,9 +446,9 @@ CREATE TABLE [prefix_surveys] ( [bounceprocessing] varchar(1) NULL default 'N', [bounceaccounttype] varchar(4) NULL, [bounceaccounthost] varchar(200) NULL, -[bounceaccountpass] varchar(100) NULL, +[bounceaccountpass] nvarchar(100) NULL, [bounceaccountencryption] varchar(3) NULL, -[bounceaccountuser] varchar(200) NULL, +[bounceaccountuser] nvarchar(200) NULL, [showwelcome] varchar(1) NULL default 'Y', [showprogress] varchar(1) NULL default 'Y', [questionindex] int NOT NULL default '0', @@ -467,28 +467,28 @@ PRIMARY KEY ([sid]) CREATE TABLE [prefix_surveys_languagesettings] ( [surveyls_survey_id] int NOT NULL, [surveyls_language] varchar(45) NOT NULL DEFAULT 'en', -[surveyls_title] varchar(200) NOT NULL, -[surveyls_description] varchar(max) NULL, -[surveyls_welcometext] varchar(max) NULL, -[surveyls_endtext] varchar(max) NULL, -[surveyls_url] varchar(max) NULL, -[surveyls_urldescription] varchar(255) NULL, -[surveyls_email_invite_subj] varchar(255) NULL, -[surveyls_email_invite] varchar(max) NULL, -[surveyls_email_remind_subj] varchar(255) NULL, -[surveyls_email_remind] varchar(max) NULL, -[surveyls_email_register_subj] varchar(255) NULL, -[surveyls_email_register] varchar(max) NULL, -[surveyls_email_confirm_subj] varchar(255) NULL, -[surveyls_email_confirm] varchar(max) NULL, +[surveyls_title] nvarchar(200) NOT NULL, +[surveyls_description] nvarchar(max) NULL, +[surveyls_welcometext] nvarchar(max) NULL, +[surveyls_endtext] nvarchar(max) NULL, +[surveyls_url] nvarchar(max) NULL, +[surveyls_urldescription] nvarchar(255) NULL, +[surveyls_email_invite_subj] nvarchar(255) NULL, +[surveyls_email_invite] nvarchar(max) NULL, +[surveyls_email_remind_subj] nvarchar(255) NULL, +[surveyls_email_remind] nvarchar(max) NULL, +[surveyls_email_register_subj] nvarchar(255) NULL, +[surveyls_email_register] nvarchar(max) NULL, +[surveyls_email_confirm_subj] nvarchar(255) NULL, +[surveyls_email_confirm] nvarchar(max) NULL, [surveyls_dateformat] int NOT NULL DEFAULT 1, -[surveyls_attributecaptions] varchar(max) NULL, -[email_admin_notification_subj] varchar(255) NULL, -[email_admin_notification] varchar(max) NULL, -[email_admin_responses_subj] varchar(255) NULL, -[email_admin_responses] varchar(max) NULL, +[surveyls_attributecaptions] nvarchar(max) NULL, +[email_admin_notification_subj] nvarchar(255) NULL, +[email_admin_notification] nvarchar(max) NULL, +[email_admin_responses_subj] nvarchar(255) NULL, +[email_admin_responses] nvarchar(max) NULL, [surveyls_numberformat] int NOT NULL DEFAULT 0, -[attachments] varchar(max) NULL default NULL, +[attachments] nvarchar(max) NULL default NULL, PRIMARY KEY ([surveyls_survey_id],[surveyls_language]) ); @@ -498,8 +498,8 @@ PRIMARY KEY ([surveyls_survey_id],[surveyls_language]) -- CREATE TABLE [prefix_user_groups] ( [ugid] int NOT NULL IDENTITY (1,1) PRIMARY KEY, -[name] varchar(20) NOT NULL UNIQUE, -[description] varchar(max) NOT NULL, +[name] nvarchar(20) NOT NULL UNIQUE, +[description] nvarchar(max) NOT NULL, [owner_id] int NOT NULL ); @@ -519,16 +519,16 @@ PRIMARY KEY ([ugid],[uid]) -- CREATE TABLE [prefix_users] ( [uid] int NOT NULL IDENTITY (1,1) PRIMARY KEY, -[users_name] varchar(64) NOT NULL UNIQUE default '', -[password] text NOT NULL, -[full_name] varchar(50) NOT NULL, +[users_name] nvarchar(64) NOT NULL UNIQUE default '', +[password] ntext NOT NULL, +[full_name] nvarchar(50) NOT NULL, [parent_id] int NOT NULL, [lang] varchar(20) NULL, -[email] varchar(254) NULL, +[email] nvarchar(254) NULL, [htmleditormode] varchar(7) NULL default 'default', [templateeditormode] varchar(7) NOT NULL default 'default', [questionselectormode] varchar(7) NOT NULL default 'default', -[one_time_pw] text NULL, +[one_time_pw] ntext NULL, [dateformat] int NOT NULL DEFAULT 1, [created] datetime NULL, [modified] datetime NULL @@ -539,7 +539,7 @@ CREATE TABLE [prefix_users] ( -- Table structure for table templates -- CREATE TABLE [prefix_templates] ( -[folder] varchar(255) NOT NULL, +[folder] nvarchar(255) NOT NULL, [creator] int NOT NULL, PRIMARY KEY ([folder]) ); @@ -566,4 +566,4 @@ create index [parent_qid_idx] on [prefix_questions] ([parent_qid]); -- -- Version Info -- -INSERT INTO [prefix_settings_global] VALUES ('DBVersion', '177'); \ No newline at end of file +INSERT INTO [prefix_settings_global] VALUES ('DBVersion', '178'); \ No newline at end of file diff --git a/sources/installer/sql/create-mysql.sql b/sources/installer/sql/create-mysql.sql index d9a398d..500eba1 100644 --- a/sources/installer/sql/create-mysql.sql +++ b/sources/installer/sql/create-mysql.sql @@ -9,7 +9,7 @@ CREATE TABLE `prefix_answers` ( `assessment_value` int(11) NOT NULL default '0', `language` varchar(20) default 'en', `scale_id` int(11) NOT NULL default '0', - PRIMARY KEY (`qid`,`code`,`language`,`scale_id`) + PRIMARY KEY (`qid`,`code`,`language`,`scale_id`) ) ENGINE=MYISAM CHARACTER SET utf8 COLLATE utf8_unicode_ci; @@ -26,8 +26,8 @@ CREATE TABLE `prefix_assessments` ( `maximum` varchar(50) NOT NULL default '', `message` text NOT NULL, `language` varchar(20) NOT NULL default 'en', - PRIMARY KEY (`id`,`language`) -) ENGINE=MYISAM AUTO_INCREMENT=1 CHARACTER SET utf8 COLLATE utf8_unicode_ci; + PRIMARY KEY (`id`,`language`) +) ENGINE=MYISAM CHARACTER SET utf8 COLLATE utf8_unicode_ci; -- @@ -41,8 +41,8 @@ CREATE TABLE `prefix_conditions` ( `method` varchar(5) NOT NULL default '', `value` varchar(255) NOT NULL default '', `scenario` int(11) NOT NULL default '1', - PRIMARY KEY (`cid`) -) ENGINE=MYISAM AUTO_INCREMENT=1 CHARACTER SET utf8 COLLATE utf8_unicode_ci; + PRIMARY KEY (`cid`) +) ENGINE=MYISAM CHARACTER SET utf8 COLLATE utf8_unicode_ci; -- @@ -55,7 +55,7 @@ CREATE TABLE `prefix_defaultvalues` ( `language` varchar(20) NOT NULL, `specialtype` varchar(20) NOT NULL default '', `defaultvalue` text, - PRIMARY KEY (`qid` , `specialtype`, `language`, `scale_id`, `sqid` ) + PRIMARY KEY (`qid`, `specialtype`, `language`, `scale_id`, `sqid`) ) ENGINE=MYISAM CHARACTER SET utf8 COLLATE utf8_unicode_ci; @@ -70,7 +70,7 @@ CREATE TABLE `prefix_expression_errors` ( `qid` int(11) DEFAULT NULL, `gseq` int(11) DEFAULT NULL, `qseq` int(11) DEFAULT NULL, - `type` varchar(50) , + `type` varchar(50), `eqn` text, `prettyprint` text, PRIMARY KEY (`id`) @@ -101,8 +101,8 @@ CREATE TABLE `prefix_groups` ( `language` varchar(20) default 'en', `randomization_group` varchar(20) NOT NULL default '', `grelevance` text DEFAULT NULL, - PRIMARY KEY (`gid`,`language`) -) ENGINE=MYISAM AUTO_INCREMENT=1 CHARACTER SET utf8 COLLATE utf8_unicode_ci; + PRIMARY KEY (`gid`,`language`) +) ENGINE=MYISAM CHARACTER SET utf8 COLLATE utf8_unicode_ci; -- @@ -115,7 +115,7 @@ CREATE TABLE `prefix_labels` ( `sortorder` int(11) NOT NULL, `language` varchar(20) default 'en', `assessment_value` int(11) NOT NULL default '0', - PRIMARY KEY (`lid`,`sortorder`,`language`), + PRIMARY KEY (`lid`,`sortorder`,`language`), KEY `labels_code_idx` (`code`) ) ENGINE=MYISAM CHARACTER SET utf8 COLLATE utf8_unicode_ci; @@ -127,8 +127,8 @@ CREATE TABLE `prefix_labelsets` ( `lid` int(11) NOT NULL auto_increment, `label_name` varchar(100) NOT NULL default '', `languages` varchar(200) default 'en', - PRIMARY KEY (`lid`) -) ENGINE=MYISAM AUTO_INCREMENT=1 CHARACTER SET utf8 COLLATE utf8_unicode_ci; + PRIMARY KEY (`lid`) +) ENGINE=MYISAM CHARACTER SET utf8 COLLATE utf8_unicode_ci; -- @@ -138,7 +138,7 @@ CREATE TABLE `prefix_participant_attribute` ( `participant_id` varchar(50) NOT NULL, `attribute_id` int(11) NOT NULL, `value` text NOT NULL, - PRIMARY KEY (`participant_id`,`attribute_id`) + PRIMARY KEY (`participant_id`,`attribute_id`) ) ENGINE=MYISAM CHARACTER SET utf8 COLLATE utf8_unicode_ci; @@ -149,7 +149,7 @@ CREATE TABLE `prefix_participant_attribute_names_lang` ( `attribute_id` int(11) NOT NULL, `attribute_name` varchar(30) NOT NULL, `lang` varchar(255) NOT NULL, - PRIMARY KEY (`attribute_id`,`lang`) + PRIMARY KEY (`attribute_id`,`lang`) ) ENGINE=MYISAM CHARACTER SET utf8 COLLATE utf8_unicode_ci; @@ -161,7 +161,7 @@ CREATE TABLE `prefix_participant_attribute_names` ( `attribute_type` varchar(4) NOT NULL, `defaultname` varchar(50) NOT NULL, `visible` varchar(5) NOT NULL, - PRIMARY KEY (`attribute_id`,`attribute_type`) + PRIMARY KEY (`attribute_id`,`attribute_type`) ) ENGINE=MYISAM CHARACTER SET utf8 COLLATE utf8_unicode_ci; @@ -172,7 +172,7 @@ CREATE TABLE `prefix_participant_attribute_values` ( `value_id` int(11) NOT NULL AUTO_INCREMENT, `attribute_id` int(11) NOT NULL, `value` text NOT NULL, - PRIMARY KEY ( `value_id`) + PRIMARY KEY (`value_id`) ) ENGINE=MYISAM CHARACTER SET utf8 COLLATE utf8_unicode_ci; @@ -184,7 +184,7 @@ CREATE TABLE `prefix_participant_shares` ( `share_uid` int(11) NOT NULL, `date_added` datetime NOT NULL, `can_edit` varchar(5) NOT NULL, - PRIMARY KEY (`participant_id`,`share_uid`) + PRIMARY KEY (`participant_id`,`share_uid`) ) ENGINE=MYISAM CHARACTER SET utf8 COLLATE utf8_unicode_ci; @@ -202,7 +202,7 @@ CREATE TABLE `prefix_participants` ( `created_by` int(11) NOT NULL, `created` datetime, `modified` datetime, - PRIMARY KEY (`participant_id`) + PRIMARY KEY (`participant_id`) ) ENGINE=MYISAM CHARACTER SET utf8 COLLATE utf8_unicode_ci; @@ -210,19 +210,19 @@ CREATE TABLE `prefix_participants` ( -- Table structure for table permissions -- CREATE TABLE `prefix_permissions` ( - `id` int(11) NOT NULL auto_increment, - `entity` varchar(50) NOT NULL, - `entity_id` int(11) NOT NULL, - `uid` int(11) NOT NULL, - `permission` varchar(100) NOT NULL, - `create_p` int(11) NOT NULL default '0', - `read_p` int(11) NOT NULL default '0', - `update_p` int(11) NOT NULL default '0', - `delete_p` int(11) NOT NULL default '0', - `import_p` int(11) NOT NULL default '0', - `export_p` int(11) NOT NULL default '0', - PRIMARY KEY (id), - UNIQUE KEY `idxPermissions` (`entity_id`,`entity`,`permission`,`uid`) + `id` int(11) NOT NULL auto_increment, + `entity` varchar(50) NOT NULL, + `entity_id` int(11) NOT NULL, + `uid` int(11) NOT NULL, + `permission` varchar(100) NOT NULL, + `create_p` int(11) NOT NULL default '0', + `read_p` int(11) NOT NULL default '0', + `update_p` int(11) NOT NULL default '0', + `delete_p` int(11) NOT NULL default '0', + `import_p` int(11) NOT NULL default '0', + `export_p` int(11) NOT NULL default '0', + PRIMARY KEY (`id`), + UNIQUE KEY `idxPermissions` (`entity_id`,`entity`,`permission`,`uid`) ) ENGINE=MYISAM CHARACTER SET utf8 COLLATE utf8_unicode_ci; @@ -233,7 +233,7 @@ CREATE TABLE `prefix_plugins` ( `id` int(11) NOT NULL auto_increment, `name` varchar(50) NOT NULL, `active` int(1) NOT NULL default '0', - PRIMARY KEY (`id`) + PRIMARY KEY (`id`) ) ENGINE=MYISAM CHARACTER SET utf8 COLLATE utf8_unicode_ci; @@ -247,8 +247,8 @@ CREATE TABLE `prefix_plugin_settings` ( `model_id` int(11) NULL, `key` varchar(50) NOT NULL, `value` text NULL, - PRIMARY KEY (`id`) -) ENGINE=MYISAM AUTO_INCREMENT=1 CHARACTER SET utf8 COLLATE utf8_unicode_ci; + PRIMARY KEY (`id`) +) ENGINE=MYISAM CHARACTER SET utf8 COLLATE utf8_unicode_ci; -- @@ -260,8 +260,8 @@ CREATE TABLE `prefix_question_attributes` ( `attribute` varchar(50) default NULL, `value` text default NULL, `language` varchar(20) default NULL, - PRIMARY KEY (`qaid`) -) ENGINE=MYISAM AUTO_INCREMENT=1 CHARACTER SET utf8 COLLATE utf8_unicode_ci; + PRIMARY KEY (`qaid`) +) ENGINE=MYISAM CHARACTER SET utf8 COLLATE utf8_unicode_ci; -- @@ -284,8 +284,8 @@ CREATE TABLE `prefix_questions` ( `scale_id` int(11) NOT NULL default '0', `same_default` int(11) NOT NULL default '0' COMMENT 'Saves if user set to use the same default value across languages in default options dialog', `relevance` text, - PRIMARY KEY (`qid`,`language`) -) ENGINE=MYISAM AUTO_INCREMENT=1 CHARACTER SET utf8 COLLATE utf8_unicode_ci; + PRIMARY KEY (`qid`,`language`) +) ENGINE=MYISAM CHARACTER SET utf8 COLLATE utf8_unicode_ci; -- @@ -299,8 +299,8 @@ CREATE TABLE `prefix_quota` ( `action` int(11) default NULL, `active` int(11) NOT NULL default '1', `autoload_url` int(11) NOT NULL default '0', - PRIMARY KEY (`id`) -) ENGINE=MYISAM CHARACTER SET utf8 COLLATE utf8_unicode_ci; + PRIMARY KEY (`id`) +) ENGINE=MYISAM CHARACTER SET utf8 COLLATE utf8_unicode_ci; -- @@ -315,7 +315,7 @@ CREATE TABLE `prefix_quota_languagesettings` ( `quotals_url` varchar(255), `quotals_urldescrip` varchar(255), PRIMARY KEY (`quotals_id`) -) ENGINE=MYISAM CHARACTER SET utf8 COLLATE utf8_unicode_ci; +) ENGINE=MYISAM CHARACTER SET utf8 COLLATE utf8_unicode_ci; -- @@ -327,9 +327,9 @@ CREATE TABLE `prefix_quota_members` ( `qid` int(11) default NULL, `quota_id` int(11) default NULL, `code` varchar(11) collate utf8_unicode_ci default NULL, - PRIMARY KEY (`id`), + PRIMARY KEY (`id`), UNIQUE KEY `sid` (`sid`,`qid`,`quota_id`,`code`) -) ENGINE=MYISAM CHARACTER SET utf8 COLLATE utf8_unicode_ci; +) ENGINE=MYISAM CHARACTER SET utf8 COLLATE utf8_unicode_ci; -- @@ -347,18 +347,18 @@ CREATE TABLE `prefix_saved_control` ( `status` varchar(1) NOT NULL default '', `saved_date` datetime NOT NULL, `refurl` text, - PRIMARY KEY (`scid`) -) ENGINE=MYISAM AUTO_INCREMENT=1 CHARACTER SET utf8 COLLATE utf8_unicode_ci; + PRIMARY KEY (`scid`) +) ENGINE=MYISAM CHARACTER SET utf8 COLLATE utf8_unicode_ci; -- -- Table structure for table sessions -- CREATE TABLE `prefix_sessions`( - `id` varchar(32) NOT NULL, - `expire` int(11) DEFAULT NULL, - `data` longblob, - PRIMARY KEY (`id`) + `id` varchar(32) NOT NULL, + `expire` int(11) DEFAULT NULL, + `data` longblob, + PRIMARY KEY (`id`) ) ENGINE=MYISAM CHARACTER SET utf8 COLLATE utf8_unicode_ci; @@ -368,7 +368,7 @@ CREATE TABLE `prefix_sessions`( CREATE TABLE `prefix_settings_global` ( `stg_name` varchar(50) NOT NULL default '', `stg_value` varchar(255) NOT NULL default '', - PRIMARY KEY (`stg_name`) + PRIMARY KEY (`stg_name`) ) ENGINE=MYISAM CHARACTER SET utf8 COLLATE utf8_unicode_ci; @@ -382,7 +382,7 @@ CREATE TABLE `prefix_survey_links` ( `date_created` datetime, `date_invited` datetime, `date_completed` datetime, - PRIMARY KEY (`participant_id`,`token_id`,`survey_id`) + PRIMARY KEY (`participant_id`,`token_id`,`survey_id`) ) ENGINE=MYISAM CHARACTER SET utf8 COLLATE utf8_unicode_ci; @@ -390,12 +390,12 @@ CREATE TABLE `prefix_survey_links` ( -- Table structure for table survey_url_parameters -- CREATE TABLE `prefix_survey_url_parameters` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `sid` int(11) NOT NULL, - `parameter` varchar(50) NOT NULL, - `targetqid` int(11) NULL, - `targetsqid` int(11) NULL, - PRIMARY KEY (`id`) + `id` int(11) NOT NULL AUTO_INCREMENT, + `sid` int(11) NOT NULL, + `parameter` varchar(50) NOT NULL, + `targetqid` int(11) NULL, + `targetsqid` int(11) NULL, + PRIMARY KEY (`id`) ) ENGINE=MYISAM CHARACTER SET utf8 COLLATE utf8_unicode_ci; @@ -461,7 +461,7 @@ CREATE TABLE `prefix_surveys` ( `alloweditaftercompletion` varchar(1) default 'N', `googleanalyticsstyle` varchar(1) DEFAULT NULL, `googleanalyticsapikey` VARCHAR(25) DEFAULT NULL, - PRIMARY KEY(`sid`) + PRIMARY KEY (`sid`) ) ENGINE=MYISAM CHARACTER SET utf8 COLLATE utf8_unicode_ci; @@ -470,7 +470,7 @@ CREATE TABLE `prefix_surveys` ( -- CREATE TABLE `prefix_surveys_languagesettings` ( `surveyls_survey_id` int(11) NOT NULL, - `surveyls_language` varchar(45) NULL DEFAULT 'en', + `surveyls_language` varchar(45) NOT NULL DEFAULT 'en', `surveyls_title` varchar(200) NOT NULL, `surveyls_description` TEXT NULL, `surveyls_welcometext` TEXT NULL, @@ -487,7 +487,7 @@ CREATE TABLE `prefix_surveys_languagesettings` ( `surveyls_email_confirm` TEXT NULL, `surveyls_dateformat` int(11) NOT NULL DEFAULT 1, `surveyls_attributecaptions` TEXT NULL, - `email_admin_notification_subj` varchar(255) NULL, + `email_admin_notification_subj` varchar(255) NULL, `email_admin_notification` TEXT NULL, `email_admin_responses_subj` varchar(255) NULL, `email_admin_responses` TEXT NULL, @@ -501,10 +501,12 @@ CREATE TABLE `prefix_surveys_languagesettings` ( -- Table structure for table user_groups -- CREATE TABLE `prefix_user_groups` ( - `ugid` int(11) NOT NULL auto_increment PRIMARY KEY, - `name` varchar(20) NOT NULL UNIQUE, - `description` TEXT NOT NULL, - `owner_id` int(11) NOT NULL + `ugid` int(11) NOT NULL auto_increment, + `name` varchar(20) NOT NULL, + `description` TEXT NOT NULL, + `owner_id` int(11) NOT NULL, + PRIMARY KEY (`ugid`), + UNIQUE KEY `lug_name` (`name`) ) ENGINE=MYISAM CHARACTER SET utf8 COLLATE utf8_unicode_ci; @@ -512,9 +514,9 @@ CREATE TABLE `prefix_user_groups` ( -- Table structure for table user_in_groups -- CREATE TABLE `prefix_user_in_groups` ( - `ugid` int(11) NOT NULL, - `uid` int(11) NOT NULL, - PRIMARY KEY (`ugid`,`uid`) + `ugid` int(11) NOT NULL, + `uid` int(11) NOT NULL, + PRIMARY KEY (`ugid`,`uid`) ) ENGINE=MYISAM CHARACTER SET utf8 COLLATE utf8_unicode_ci; @@ -522,8 +524,8 @@ CREATE TABLE `prefix_user_in_groups` ( -- Table structure for table users -- CREATE TABLE `prefix_users` ( - `uid` int(11) NOT NULL auto_increment PRIMARY KEY, - `users_name` varchar(64) NOT NULL UNIQUE default '', + `uid` int(11) NOT NULL auto_increment, + `users_name` varchar(64) NOT NULL default '', `password` BLOB NOT NULL, `full_name` varchar(50) NOT NULL, `parent_id` int(11) NOT NULL, @@ -533,9 +535,11 @@ CREATE TABLE `prefix_users` ( `templateeditormode` varchar(7) NOT NULL default 'default', `questionselectormode` varchar(7) NOT NULL default 'default', `one_time_pw` BLOB, - `dateformat` INT NOT NULL DEFAULT 1, + `dateformat` INT(11) NOT NULL DEFAULT 1, `created` datetime, - `modified` datetime + `modified` datetime, + PRIMARY KEY (`uid`), + UNIQUE KEY `users_name` (`users_name`) ) ENGINE=MYISAM CHARACTER SET utf8 COLLATE utf8_unicode_ci; @@ -545,30 +549,30 @@ CREATE TABLE `prefix_users` ( CREATE TABLE `prefix_templates` ( `folder` varchar(255) NOT NULL, `creator` int(11) NOT NULL, - PRIMARY KEY (`folder`) + PRIMARY KEY (`folder`) ) ENGINE=MYISAM CHARACTER SET utf8 COLLATE utf8_unicode_ci; -- -- Secondary indexes -- -create index `answers_idx2` on `prefix_answers` (`sortorder`); -create index `assessments_idx2` on `prefix_assessments` (`sid`); -create index `assessments_idx3` on `prefix_assessments` (`gid`); -create index `conditions_idx2` on `prefix_conditions` (`qid`); -create index `conditions_idx3` on `prefix_conditions` (`cqid`); -create index `groups_idx2` on `prefix_groups` (`sid`); -create index `question_attributes_idx2` on `prefix_question_attributes` (`qid`); -create index `question_attributes_idx3` on `prefix_question_attributes` (`attribute`); -create index `questions_idx2` on `prefix_questions` (`sid`); -create index `questions_idx3` on `prefix_questions` (`gid`); -create index `questions_idx4` on `prefix_questions` (`type`); -create index `quota_idx2` on `prefix_quota` (`sid`); -create index `saved_control_idx2` on `prefix_saved_control` (`sid`); -create index `parent_qid_idx` on `prefix_questions` (`parent_qid`); +CREATE INDEX `answers_idx2` ON `prefix_answers` (`sortorder`); +CREATE INDEX `assessments_idx2` ON `prefix_assessments` (`sid`); +CREATE INDEX `assessments_idx3` ON `prefix_assessments` (`gid`); +CREATE INDEX `conditions_idx2` ON `prefix_conditions` (`qid`); +CREATE INDEX `conditions_idx3` ON `prefix_conditions` (`cqid`); +CREATE INDEX `groups_idx2` ON `prefix_groups` (`sid`); +CREATE INDEX `question_attributes_idx2` ON `prefix_question_attributes` (`qid`); +CREATE INDEX `question_attributes_idx3` ON `prefix_question_attributes` (`attribute`); +CREATE INDEX `questions_idx2` ON `prefix_questions` (`sid`); +CREATE INDEX `questions_idx3` ON `prefix_questions` (`gid`); +CREATE INDEX `questions_idx4` ON `prefix_questions` (`type`); +CREATE INDEX `quota_idx2` ON `prefix_quota` (`sid`); +CREATE INDEX `saved_control_idx2` ON `prefix_saved_control` (`sid`); +CREATE INDEX `parent_qid_idx` ON `prefix_questions` (`parent_qid`); -- -- Version Info -- -INSERT INTO `prefix_settings_global` VALUES ('DBVersion', '177'); +INSERT INTO `prefix_settings_global` VALUES ('DBVersion', '178'); diff --git a/sources/installer/sql/create-pgsql.sql b/sources/installer/sql/create-pgsql.sql index bb40138..03ab8ca 100644 --- a/sources/installer/sql/create-pgsql.sql +++ b/sources/installer/sql/create-pgsql.sql @@ -576,4 +576,4 @@ create unique index permissions_idx2 ON prefix_permissions (entity_id, entity, u -- -- Version Info -- -INSERT INTO prefix_settings_global VALUES ('DBVersion', '177'); +INSERT INTO prefix_settings_global VALUES ('DBVersion', '178'); diff --git a/sources/locale/_template/limesurvey.pot b/sources/locale/_template/limesurvey.pot index 51f0a49..ec996a4 100644 --- a/sources/locale/_template/limesurvey.pot +++ b/sources/locale/_template/limesurvey.pot @@ -1,15 +1,15 @@ # LimeSurvey LANGUAGE FILE. -# Copyright (C) 2014 LimeSurvey +# Copyright (C) 2015 LimeSurvey # This file is distributed under the same license as the LimeSurvey package. msgid "" msgstr "" "Project-Id-Version: LimeSurvey language file\n" "Report-Msgid-Bugs-To: http://translate.limesurvey.org/\n" -"POT-Creation-Date: 2014-06-21 15:29:41+00:00\n" +"POT-Creation-Date: 2015-05-20 07:41:11+00:00\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"PO-Revision-Date: 2014-MO-DA HO:MI+ZONE\n" +"PO-Revision-Date: 2015-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LimeSurvey Team \n" "X-Poedit-KeywordsList: gT;ngT:1,2;eT;neT:1,2\n" @@ -35,27 +35,27 @@ msgid "Question group" msgstr "" #: application/controllers/admin/assessments.php:88 -#: application/helpers/admin/statistics_helper.php:1068 +#: application/helpers/admin/statistics_helper.php:1070 #: application/views/admin/assessments_view.php:92 msgid "Minimum" msgstr "" #: application/controllers/admin/assessments.php:88 -#: application/helpers/admin/statistics_helper.php:1093 +#: application/helpers/admin/statistics_helper.php:1095 #: application/views/admin/assessments_view.php:94 msgid "Maximum" msgstr "" #: application/controllers/admin/assessments.php:89 -#: application/views/admin/globalSettings_view.php:492 +#: application/views/admin/globalSettings_view.php:520 #: application/views/admin/labels/editlabel_view.php:34 -#: application/views/admin/labels/labelview_view.php:165 +#: application/views/admin/labels/labelview_view.php:160 #: application/views/admin/participants/displayParticipants_view.php:64 -#: application/views/admin/survey/Question/answerOptions_view.php:170 -#: application/views/admin/survey/Question/answerOptions_view.php:182 -#: application/views/admin/survey/Question/subQuestion_view.php:168 -#: application/views/admin/survey/Question/subQuestion_view.php:181 -#: application/views/admin/survey/subview/tabGeneralEditSurvey_view.php:33 +#: application/views/admin/survey/Question/answerOptions_view.php:171 +#: application/views/admin/survey/Question/answerOptions_view.php:183 +#: application/views/admin/survey/Question/subQuestion_view.php:169 +#: application/views/admin/survey/Question/subQuestion_view.php:182 +#: application/views/admin/survey/subview/tabGeneralEditSurvey_view.php:39 msgid "Add" msgstr "" @@ -68,89 +68,86 @@ msgid "Assessment mode for this survey is not activated. You can activate it in msgstr "" #: application/controllers/admin/assessments.php:135 -#: application/controllers/admin/surveyadmin.php:637 +#: application/controllers/admin/surveyadmin.php:638 #: application/views/admin/assessments_view.php:24 #: application/views/admin/quotas/viewquotasrow_view.php:28 msgid "Edit" msgstr "" -#: application/controllers/admin/authentication.php:95 +#: application/controllers/admin/authentication.php:103 msgid "Incorrect username and/or password!" msgstr "" -#: application/controllers/admin/authentication.php:116 +#: application/controllers/admin/authentication.php:121 msgid "Logout successful." msgstr "" -#: application/controllers/admin/authentication.php:146 -msgid "User name and/or email not found!" -msgstr "" - -#: application/controllers/admin/authentication.php:169 -msgid "User data" -msgstr "" - -#: application/controllers/admin/authentication.php:174 -msgid "Username: %s" +#: application/controllers/admin/authentication.php:154 +#: application/controllers/admin/authentication.php:193 +msgid "If username and email that you specified are valid, a new password has been sent to you" msgstr "" #: application/controllers/admin/authentication.php:175 +msgid "User data" +msgstr "" + +#: application/controllers/admin/authentication.php:180 +msgid "Username: %s" +msgstr "" + +#: application/controllers/admin/authentication.php:181 msgid "Email: %s" msgstr "" -#: application/controllers/admin/authentication.php:176 +#: application/controllers/admin/authentication.php:182 msgid "New password: %s" msgstr "" -#: application/controllers/admin/authentication.php:179 +#: application/controllers/admin/authentication.php:185 msgid "Your user data for accessing %s" msgstr "" -#: application/controllers/admin/authentication.php:187 -msgid "An email with your login data was sent to you." -msgstr "" - -#: application/controllers/admin/authentication.php:191 -#: application/controllers/admin/useraction.php:151 -msgid "Email to {NAME} ({EMAIL}) failed." -msgstr "" - -#: application/controllers/admin/authentication.php:215 -msgid "Please log in first." +#: application/controllers/admin/authentication.php:197 +msgid "Email failed." msgstr "" #: application/controllers/admin/authentication.php:220 -msgid "Welcome %s!" +msgid "Please log in first." msgstr "" #: application/controllers/admin/authentication.php:225 +msgid "Welcome %s!" +msgstr "" + +#: application/controllers/admin/authentication.php:230 msgid "Reloading screen. Please wait." msgstr "" #: application/controllers/admin/checkintegrity.php:31 #: application/controllers/admin/dataentry.php:105 -#: application/controllers/admin/export.php:622 +#: application/controllers/admin/export.php:616 #: application/controllers/admin/expressions.php:30 -#: application/controllers/admin/printablesurvey.php:38 +#: application/controllers/admin/printablesurvey.php:37 #: application/controllers/admin/responses.php:277 -#: application/controllers/admin/responses.php:610 +#: application/controllers/admin/responses.php:614 +#: application/controllers/admin/surveyadmin.php:72 #: application/controllers/admin/tokens.php:39 #: application/controllers/admin/tokens.php:266 -#: application/controllers/admin/tokens.php:624 -#: application/controllers/admin/tokens.php:746 -#: application/controllers/admin/tokens.php:851 -#: application/controllers/admin/tokens.php:882 -#: application/controllers/admin/tokens.php:1032 -#: application/controllers/admin/tokens.php:1083 -#: application/controllers/admin/tokens.php:1132 -#: application/controllers/admin/tokens.php:1187 -#: application/controllers/admin/tokens.php:1239 -#: application/controllers/admin/tokens.php:1590 -#: application/controllers/admin/tokens.php:1627 -#: application/controllers/admin/tokens.php:1896 -#: application/controllers/admin/tokens.php:2158 -#: application/controllers/admin/tokens.php:2215 -#: application/controllers/admin/tokens.php:2271 +#: application/controllers/admin/tokens.php:634 +#: application/controllers/admin/tokens.php:756 +#: application/controllers/admin/tokens.php:861 +#: application/controllers/admin/tokens.php:892 +#: application/controllers/admin/tokens.php:1041 +#: application/controllers/admin/tokens.php:1092 +#: application/controllers/admin/tokens.php:1141 +#: application/controllers/admin/tokens.php:1201 +#: application/controllers/admin/tokens.php:1253 +#: application/controllers/admin/tokens.php:1604 +#: application/controllers/admin/tokens.php:1641 +#: application/controllers/admin/tokens.php:1910 +#: application/controllers/admin/tokens.php:2189 +#: application/controllers/admin/tokens.php:2246 +#: application/controllers/admin/tokens.php:2302 #: application/controllers/admin/useraction.php:82 #: application/controllers/admin/useraction.php:177 #: application/controllers/admin/useraction.php:241 @@ -206,82 +203,81 @@ msgstr "" msgid "Deleting assessments: %u assessment entries deleted" msgstr "" -#: application/controllers/admin/checkintegrity.php:258 +#: application/controllers/admin/checkintegrity.php:250 msgid "Deleting orphaned quota members." msgstr "" -#: application/controllers/admin/checkintegrity.php:283 +#: application/controllers/admin/checkintegrity.php:275 msgid "Deleting orphaned quotas." msgstr "" -#: application/controllers/admin/checkintegrity.php:297 +#: application/controllers/admin/checkintegrity.php:290 msgid "Deleting orphaned default values." msgstr "" -#: application/controllers/admin/checkintegrity.php:310 +#: application/controllers/admin/checkintegrity.php:303 msgid "Deleting question attributes: %u attributes deleted" msgstr "" -#: application/controllers/admin/checkintegrity.php:321 +#: application/controllers/admin/checkintegrity.php:314 msgid "Deleting conditions: %u conditions deleted" msgstr "" -#: application/controllers/admin/checkintegrity.php:422 +#: application/controllers/admin/checkintegrity.php:415 msgid "No matching CQID" msgstr "" -#: application/controllers/admin/checkintegrity.php:434 +#: application/controllers/admin/checkintegrity.php:427 msgid "No matching CFIELDNAME group!" msgstr "" -#: application/controllers/admin/checkintegrity.php:439 +#: application/controllers/admin/checkintegrity.php:432 msgid "No CFIELDNAME field set!" msgstr "" -#: application/controllers/admin/checkintegrity.php:527 +#: application/controllers/admin/checkintegrity.php:506 msgid "No matching survey" msgstr "" -#: application/controllers/admin/checkintegrity.php:540 -#: application/controllers/admin/checkintegrity.php:626 +#: application/controllers/admin/checkintegrity.php:519 +#: application/controllers/admin/checkintegrity.php:595 msgid "No matching group" msgstr "" -#: application/controllers/admin/checkintegrity.php:555 +#: application/controllers/admin/checkintegrity.php:533 msgid "No matching question" msgstr "" -#: application/controllers/admin/checkintegrity.php:609 +#: application/controllers/admin/checkintegrity.php:582 msgid "The related survey is missing." msgstr "" -#: application/controllers/admin/checkintegrity.php:630 -#: application/controllers/admin/checkintegrity.php:646 +#: application/controllers/admin/checkintegrity.php:610 msgid "There is no matching survey." msgstr "" -#: application/controllers/admin/checkintegrity.php:694 +#: application/controllers/admin/checkintegrity.php:656 msgid "responses" msgstr "" -#: application/controllers/admin/checkintegrity.php:701 +#: application/controllers/admin/checkintegrity.php:663 msgid "timings" msgstr "" -#: application/controllers/admin/checkintegrity.php:714 +#: application/controllers/admin/checkintegrity.php:676 msgid "Survey ID %d saved at %s containing %d record(s) (%s)" msgstr "" -#: application/controllers/admin/checkintegrity.php:775 +#: application/controllers/admin/checkintegrity.php:735 msgid "Survey ID %d saved at %s containing %d record(s)" msgstr "" #: application/controllers/admin/conditionsaction.php:69 #: application/controllers/admin/conditionsaction.php:85 #: application/views/admin/participants/displayParticipants_view.php:85 -#: application/views/admin/participants/displayParticipants_view.php:212 -#: application/views/admin/token/browse.php:116 -#: application/views/admin/token/browse.php:176 +#: application/views/admin/participants/displayParticipants_view.php:208 +#: application/views/admin/token/browse.php:110 +#: application/views/admin/token/browse.php:177 msgid "Less than" msgstr "" @@ -308,15 +304,15 @@ msgstr "" #: application/controllers/admin/conditionsaction.php:74 #: application/controllers/admin/conditionsaction.php:90 #: application/views/admin/participants/displayParticipants_view.php:84 -#: application/views/admin/participants/displayParticipants_view.php:211 -#: application/views/admin/token/browse.php:116 -#: application/views/admin/token/browse.php:175 +#: application/views/admin/participants/displayParticipants_view.php:207 +#: application/views/admin/token/browse.php:110 +#: application/views/admin/token/browse.php:176 msgid "Greater than" msgstr "" #: application/controllers/admin/conditionsaction.php:75 #: application/controllers/admin/conditionsaction.php:91 -#: application/controllers/admin/conditionsaction.php:1909 +#: application/controllers/admin/conditionsaction.php:1919 msgid "Regular expression" msgstr "" @@ -352,76 +348,76 @@ msgid "Reset Survey Logic" msgstr "" #: application/controllers/admin/conditionsaction.php:146 -#: application/controllers/admin/conditionsaction.php:694 -#: application/controllers/admin/conditionsaction.php:938 +#: application/controllers/admin/conditionsaction.php:695 +#: application/controllers/admin/conditionsaction.php:941 #: application/controllers/admin/dataentry.php:653 #: application/controllers/admin/dataentry.php:1072 #: application/controllers/admin/dataentry.php:1132 -#: application/controllers/admin/printablesurvey.php:340 -#: application/controllers/admin/printablesurvey.php:361 -#: application/controllers/admin/printablesurvey.php:940 -#: application/controllers/admin/printablesurvey.php:1045 -#: application/controllers/admin/printablesurvey.php:1061 -#: application/controllers/admin/quotas.php:515 -#: application/controllers/admin/surveyadmin.php:656 -#: application/controllers/admin/tokens.php:2176 +#: application/controllers/admin/printablesurvey.php:341 +#: application/controllers/admin/printablesurvey.php:362 +#: application/controllers/admin/printablesurvey.php:941 +#: application/controllers/admin/printablesurvey.php:1046 +#: application/controllers/admin/printablesurvey.php:1062 +#: application/controllers/admin/quotas.php:519 +#: application/controllers/admin/surveyadmin.php:657 +#: application/controllers/admin/tokens.php:2207 #: application/core/plugins/ExportSTATAxml/STATAxmlWriter.php:220 #: application/core/plugins/ExportSTATAxml/STATAxmlWriter.php:231 #: application/core/plugins/ExportSTATAxml/STATAxmlWriter.php:253 #: application/core/plugins/ExportSTATAxml/STATAxmlWriter.php:264 #: application/core/Survey_Common_Action.php:835 -#: application/helpers/admin/statistics_helper.php:1331 -#: application/helpers/admin/statistics_helper.php:1464 -#: application/helpers/common_helper.php:1517 -#: application/helpers/common_helper.php:1523 -#: application/helpers/common_helper.php:1539 -#: application/helpers/common_helper.php:2665 -#: application/helpers/common_helper.php:2762 -#: application/helpers/common_helper.php:2793 -#: application/helpers/common_helper.php:2903 -#: application/helpers/common_helper.php:2917 -#: application/helpers/common_helper.php:2929 -#: application/helpers/common_helper.php:2941 -#: application/helpers/common_helper.php:2953 -#: application/helpers/common_helper.php:2963 -#: application/helpers/common_helper.php:2974 -#: application/helpers/common_helper.php:3025 -#: application/helpers/common_helper.php:3056 -#: application/helpers/common_helper.php:3067 -#: application/helpers/common_helper.php:3174 -#: application/helpers/common_helper.php:3185 -#: application/helpers/common_helper.php:3205 -#: application/helpers/common_helper.php:3217 -#: application/helpers/common_helper.php:3247 -#: application/helpers/common_helper.php:3260 -#: application/helpers/common_helper.php:3271 -#: application/helpers/common_helper.php:3282 -#: application/helpers/common_helper.php:3302 -#: application/helpers/common_helper.php:3332 -#: application/helpers/common_helper.php:3369 -#: application/helpers/common_helper.php:3379 -#: application/helpers/common_helper.php:3389 -#: application/helpers/common_helper.php:3408 -#: application/helpers/common_helper.php:3451 -#: application/helpers/common_helper.php:3477 -#: application/helpers/common_helper.php:3489 -#: application/helpers/common_helper.php:3525 -#: application/helpers/common_helper.php:3613 -#: application/helpers/common_helper.php:3623 -#: application/helpers/common_helper.php:3771 -#: application/helpers/common_helper.php:3782 -#: application/helpers/common_helper.php:3842 +#: application/helpers/admin/statistics_helper.php:1333 +#: application/helpers/admin/statistics_helper.php:1466 +#: application/helpers/common_helper.php:1497 +#: application/helpers/common_helper.php:1503 +#: application/helpers/common_helper.php:1519 +#: application/helpers/common_helper.php:2661 +#: application/helpers/common_helper.php:2758 +#: application/helpers/common_helper.php:2789 +#: application/helpers/common_helper.php:2899 +#: application/helpers/common_helper.php:2913 +#: application/helpers/common_helper.php:2925 +#: application/helpers/common_helper.php:2937 +#: application/helpers/common_helper.php:2949 +#: application/helpers/common_helper.php:2959 +#: application/helpers/common_helper.php:2970 +#: application/helpers/common_helper.php:3021 +#: application/helpers/common_helper.php:3052 +#: application/helpers/common_helper.php:3063 +#: application/helpers/common_helper.php:3170 +#: application/helpers/common_helper.php:3181 +#: application/helpers/common_helper.php:3201 +#: application/helpers/common_helper.php:3213 +#: application/helpers/common_helper.php:3243 +#: application/helpers/common_helper.php:3256 +#: application/helpers/common_helper.php:3267 +#: application/helpers/common_helper.php:3278 +#: application/helpers/common_helper.php:3298 +#: application/helpers/common_helper.php:3328 +#: application/helpers/common_helper.php:3365 +#: application/helpers/common_helper.php:3375 +#: application/helpers/common_helper.php:3385 +#: application/helpers/common_helper.php:3404 +#: application/helpers/common_helper.php:3447 +#: application/helpers/common_helper.php:3473 +#: application/helpers/common_helper.php:3485 +#: application/helpers/common_helper.php:3521 +#: application/helpers/common_helper.php:3609 +#: application/helpers/common_helper.php:3619 +#: application/helpers/common_helper.php:3767 +#: application/helpers/common_helper.php:3778 +#: application/helpers/common_helper.php:3838 #: application/helpers/export_helper.php:283 #: application/helpers/export_helper.php:287 #: application/helpers/export_helper.php:295 #: application/helpers/export_helper.php:299 -#: application/helpers/export_helper.php:1381 -#: application/helpers/export_helper.php:1400 -#: application/helpers/expressions/em_manager_helper.php:3521 -#: application/helpers/expressions/em_manager_helper.php:3525 -#: application/helpers/qanda_helper.php:3844 -#: application/helpers/qanda_helper.php:4284 -#: application/helpers/qanda_helper.php:4322 +#: application/helpers/export_helper.php:1382 +#: application/helpers/export_helper.php:1401 +#: application/helpers/expressions/em_manager_helper.php:3510 +#: application/helpers/expressions/em_manager_helper.php:3514 +#: application/helpers/qanda_helper.php:3827 +#: application/helpers/qanda_helper.php:4270 +#: application/helpers/qanda_helper.php:4307 #: application/views/admin/dataentry/content_view.php:496 #: application/views/admin/dataentry/content_view.php:549 #: application/views/admin/export/statistics_view.php:504 @@ -431,7 +427,8 @@ msgstr "" #: application/views/admin/globalSettings_view.php:356 #: application/views/admin/globalSettings_view.php:396 #: application/views/admin/globalSettings_view.php:417 -#: application/views/admin/globalSettings_view.php:527 +#: application/views/admin/globalSettings_view.php:467 +#: application/views/admin/globalSettings_view.php:555 #: application/views/admin/participants/blacklist_view.php:23 #: application/views/admin/participants/userControl_view.php:23 #: application/views/admin/survey/activateSurvey_view.php:66 @@ -444,12 +441,12 @@ msgstr "" #: application/views/admin/survey/Question/editQuestion_view.php:225 #: application/views/admin/survey/Question/questionbar_view.php:211 #: application/views/admin/survey/Question/questionbar_view.php:226 -#: application/views/admin/survey/subview/tabNotification_view.php:32 -#: application/views/admin/survey/subview/tabNotification_view.php:59 -#: application/views/admin/survey/subview/tabNotification_view.php:87 -#: application/views/admin/survey/subview/tabNotification_view.php:111 -#: application/views/admin/survey/subview/tabNotification_view.php:126 -#: application/views/admin/survey/subview/tabNotification_view.php:141 +#: application/views/admin/survey/subview/tabNotification_view.php:21 +#: application/views/admin/survey/subview/tabNotification_view.php:35 +#: application/views/admin/survey/subview/tabNotification_view.php:50 +#: application/views/admin/survey/subview/tabNotification_view.php:65 +#: application/views/admin/survey/subview/tabNotification_view.php:70 +#: application/views/admin/survey/subview/tabNotification_view.php:74 #: application/views/admin/survey/subview/tabPresentation_view.php:56 #: application/views/admin/survey/subview/tabPresentation_view.php:80 #: application/views/admin/survey/subview/tabPresentation_view.php:111 @@ -462,13 +459,13 @@ msgstr "" #: application/views/admin/survey/subview/tabPresentation_view.php:358 #: application/views/admin/survey/subview/tabPublication_view.php:10 #: application/views/admin/survey/subview/tabPublication_view.php:39 -#: application/views/admin/survey/subview/tabTokens_view.php:32 -#: application/views/admin/survey/subview/tabTokens_view.php:48 -#: application/views/admin/survey/subview/tabTokens_view.php:61 -#: application/views/admin/survey/subview/tabTokens_view.php:74 -#: application/views/admin/survey/subview/tabTokens_view.php:90 -#: application/views/admin/survey/subview/tabTokens_view.php:107 -#: application/views/admin/token/email.php:87 +#: application/views/admin/survey/subview/tabTokens_view.php:39 +#: application/views/admin/survey/subview/tabTokens_view.php:56 +#: application/views/admin/survey/subview/tabTokens_view.php:72 +#: application/views/admin/survey/subview/tabTokens_view.php:85 +#: application/views/admin/survey/subview/tabTokens_view.php:101 +#: application/views/admin/survey/subview/tabTokens_view.php:118 +#: application/views/admin/token/email.php:95 #: application/views/admin/token/managetokenattributes.php:55 #: application/views/admin/token/managetokenattributes.php:56 #: application/views/admin/token/remind.php:76 @@ -476,31 +473,31 @@ msgid "Yes" msgstr "" #: application/controllers/admin/conditionsaction.php:149 -#: application/controllers/admin/tokens.php:1158 -#: application/controllers/admin/tokens.php:2242 +#: application/controllers/admin/tokens.php:1167 +#: application/controllers/admin/tokens.php:2273 #: application/views/admin/assessments_view.php:131 #: application/views/admin/conditions/includes/conditions_scenario.php:13 #: application/views/admin/dataentry/import.php:16 -#: application/views/admin/labels/labelview_view.php:166 +#: application/views/admin/labels/labelview_view.php:161 #: application/views/admin/participants/attributeControl_view.php:6 #: application/views/admin/participants/attributeMapCSV_view.php:53 #: application/views/admin/participants/displayParticipants_view.php:67 #: application/views/admin/participants/displayParticipants_view.php:142 #: application/views/admin/participants/participantsPanel_view.php:8 #: application/views/admin/quotas/editquota_view.php:30 -#: application/views/admin/survey/deleteSurvey_view.php:36 -#: application/views/admin/survey/editSurvey_view.php:56 +#: application/views/admin/survey/deleteSurvey_view.php:37 +#: application/views/admin/survey/editSurvey_view.php:59 #: application/views/admin/survey/listSurveys_view.php:37 -#: application/views/admin/survey/Question/answerOptions_view.php:37 -#: application/views/admin/survey/Question/answerOptions_view.php:171 -#: application/views/admin/survey/Question/answerOptions_view.php:183 -#: application/views/admin/survey/Question/answerOptions_view.php:198 -#: application/views/admin/survey/Question/subQuestion_view.php:24 -#: application/views/admin/survey/Question/subQuestion_view.php:169 -#: application/views/admin/survey/Question/subQuestion_view.php:182 -#: application/views/admin/survey/Question/subQuestion_view.php:197 -#: application/views/admin/token/browse.php:68 -#: application/views/plugins/configure.php:12 +#: application/views/admin/survey/Question/answerOptions_view.php:38 +#: application/views/admin/survey/Question/answerOptions_view.php:172 +#: application/views/admin/survey/Question/answerOptions_view.php:184 +#: application/views/admin/survey/Question/answerOptions_view.php:199 +#: application/views/admin/survey/Question/subQuestion_view.php:25 +#: application/views/admin/survey/Question/subQuestion_view.php:170 +#: application/views/admin/survey/Question/subQuestion_view.php:183 +#: application/views/admin/survey/Question/subQuestion_view.php:198 +#: application/views/admin/token/browse.php:62 +#: application/views/plugins/configure.php:15 msgid "Cancel" msgstr "" @@ -513,16 +510,17 @@ msgid "We recommend that before you proceed, you export the entire survey from t msgstr "" #: application/controllers/admin/conditionsaction.php:155 +#: application/controllers/admin/questions.php:1060 msgid "Continue?" msgstr "" #: application/controllers/admin/conditionsaction.php:159 -#: application/controllers/admin/tokens.php:1569 +#: application/controllers/admin/tokens.php:1583 #: application/controllers/admin/useraction.php:154 -#: application/helpers/admin/import_helper.php:5041 -#: application/helpers/admin/import_helper.php:5059 -#: application/helpers/admin/import_helper.php:5085 -#: application/helpers/admin/import_helper.php:5145 +#: application/helpers/admin/import_helper.php:5055 +#: application/helpers/admin/import_helper.php:5073 +#: application/helpers/admin/import_helper.php:5100 +#: application/helpers/admin/import_helper.php:5161 #: application/views/admin/dataentry/import.php:23 #: application/views/admin/dataentry/vvimport_result.php:19 #: application/views/admin/participants/attributeControl_view.php:8 @@ -535,9 +533,10 @@ msgstr "" #: application/views/admin/survey/listSurveys_view.php:6 #: application/views/admin/survey/Question/questionbar_view.php:191 #: application/views/admin/survey/Question/questionbar_view.php:200 -#: application/views/admin/survey/Question/subQuestion_view.php:218 +#: application/views/admin/survey/Question/subQuestion_view.php:219 #: application/views/admin/survey/subview/tabTokens_view.php:14 -#: application/views/admin/token/browse.php:61 +#: application/views/admin/survey/subview/tabTokens_view.php:21 +#: application/views/admin/token/browse.php:55 #: application/views/admin/token/emailwarning.php:2 #: application/views/admin/token/tokenwarning.php:5 #: application/views/admin/update/step3.php:21 @@ -573,90 +572,90 @@ msgstr "" msgid "No conditions could be copied (due to duplicates)" msgstr "" -#: application/controllers/admin/conditionsaction.php:695 +#: application/controllers/admin/conditionsaction.php:696 #: application/controllers/admin/dataentry.php:1135 -#: application/controllers/admin/printablesurvey.php:362 -#: application/controllers/admin/printablesurvey.php:1046 -#: application/controllers/admin/printablesurvey.php:1062 +#: application/controllers/admin/printablesurvey.php:363 +#: application/controllers/admin/printablesurvey.php:1047 +#: application/controllers/admin/printablesurvey.php:1063 #: application/core/plugins/ExportSTATAxml/STATAxmlWriter.php:272 -#: application/helpers/admin/statistics_helper.php:1333 -#: application/helpers/common_helper.php:1541 +#: application/helpers/admin/statistics_helper.php:1335 +#: application/helpers/common_helper.php:1521 #: application/helpers/export_helper.php:301 -#: application/helpers/export_helper.php:1400 -#: application/helpers/expressions/em_manager_helper.php:3527 -#: application/helpers/qanda_helper.php:4285 -#: application/helpers/qanda_helper.php:4331 +#: application/helpers/export_helper.php:1401 +#: application/helpers/expressions/em_manager_helper.php:3516 +#: application/helpers/qanda_helper.php:4271 +#: application/helpers/qanda_helper.php:4316 #: application/views/admin/dataentry/content_view.php:550 #: application/views/admin/export/statistics_view.php:675 msgid "Uncertain" msgstr "" -#: application/controllers/admin/conditionsaction.php:696 -#: application/controllers/admin/conditionsaction.php:939 +#: application/controllers/admin/conditionsaction.php:697 +#: application/controllers/admin/conditionsaction.php:942 #: application/controllers/admin/dataentry.php:652 #: application/controllers/admin/dataentry.php:1075 #: application/controllers/admin/dataentry.php:1138 -#: application/controllers/admin/printablesurvey.php:341 -#: application/controllers/admin/printablesurvey.php:363 -#: application/controllers/admin/printablesurvey.php:941 -#: application/controllers/admin/printablesurvey.php:1047 -#: application/controllers/admin/printablesurvey.php:1063 -#: application/controllers/admin/quotas.php:516 -#: application/controllers/admin/surveyadmin.php:660 -#: application/controllers/admin/tokens.php:2178 +#: application/controllers/admin/printablesurvey.php:342 +#: application/controllers/admin/printablesurvey.php:364 +#: application/controllers/admin/printablesurvey.php:942 +#: application/controllers/admin/printablesurvey.php:1048 +#: application/controllers/admin/printablesurvey.php:1064 +#: application/controllers/admin/quotas.php:520 +#: application/controllers/admin/surveyadmin.php:661 +#: application/controllers/admin/tokens.php:2209 #: application/core/plugins/ExportSTATAxml/STATAxmlWriter.php:257 #: application/core/plugins/ExportSTATAxml/STATAxmlWriter.php:268 #: application/core/Survey_Common_Action.php:831 -#: application/helpers/admin/statistics_helper.php:1332 -#: application/helpers/admin/statistics_helper.php:1465 -#: application/helpers/common_helper.php:1524 -#: application/helpers/common_helper.php:1540 -#: application/helpers/common_helper.php:2664 -#: application/helpers/common_helper.php:2761 -#: application/helpers/common_helper.php:2792 -#: application/helpers/common_helper.php:2902 -#: application/helpers/common_helper.php:2918 -#: application/helpers/common_helper.php:2930 -#: application/helpers/common_helper.php:2942 -#: application/helpers/common_helper.php:2954 -#: application/helpers/common_helper.php:2963 -#: application/helpers/common_helper.php:2974 -#: application/helpers/common_helper.php:3026 -#: application/helpers/common_helper.php:3055 -#: application/helpers/common_helper.php:3066 -#: application/helpers/common_helper.php:3173 -#: application/helpers/common_helper.php:3184 -#: application/helpers/common_helper.php:3204 -#: application/helpers/common_helper.php:3216 -#: application/helpers/common_helper.php:3246 -#: application/helpers/common_helper.php:3259 -#: application/helpers/common_helper.php:3270 -#: application/helpers/common_helper.php:3281 -#: application/helpers/common_helper.php:3301 -#: application/helpers/common_helper.php:3331 -#: application/helpers/common_helper.php:3368 -#: application/helpers/common_helper.php:3378 -#: application/helpers/common_helper.php:3388 -#: application/helpers/common_helper.php:3407 -#: application/helpers/common_helper.php:3450 -#: application/helpers/common_helper.php:3462 -#: application/helpers/common_helper.php:3476 -#: application/helpers/common_helper.php:3488 -#: application/helpers/common_helper.php:3524 -#: application/helpers/common_helper.php:3612 -#: application/helpers/common_helper.php:3622 -#: application/helpers/common_helper.php:3770 -#: application/helpers/common_helper.php:3781 -#: application/helpers/common_helper.php:3841 +#: application/helpers/admin/statistics_helper.php:1334 +#: application/helpers/admin/statistics_helper.php:1467 +#: application/helpers/common_helper.php:1504 +#: application/helpers/common_helper.php:1520 +#: application/helpers/common_helper.php:2660 +#: application/helpers/common_helper.php:2757 +#: application/helpers/common_helper.php:2788 +#: application/helpers/common_helper.php:2898 +#: application/helpers/common_helper.php:2914 +#: application/helpers/common_helper.php:2926 +#: application/helpers/common_helper.php:2938 +#: application/helpers/common_helper.php:2950 +#: application/helpers/common_helper.php:2959 +#: application/helpers/common_helper.php:2970 +#: application/helpers/common_helper.php:3022 +#: application/helpers/common_helper.php:3051 +#: application/helpers/common_helper.php:3062 +#: application/helpers/common_helper.php:3169 +#: application/helpers/common_helper.php:3180 +#: application/helpers/common_helper.php:3200 +#: application/helpers/common_helper.php:3212 +#: application/helpers/common_helper.php:3242 +#: application/helpers/common_helper.php:3255 +#: application/helpers/common_helper.php:3266 +#: application/helpers/common_helper.php:3277 +#: application/helpers/common_helper.php:3297 +#: application/helpers/common_helper.php:3327 +#: application/helpers/common_helper.php:3364 +#: application/helpers/common_helper.php:3374 +#: application/helpers/common_helper.php:3384 +#: application/helpers/common_helper.php:3403 +#: application/helpers/common_helper.php:3446 +#: application/helpers/common_helper.php:3458 +#: application/helpers/common_helper.php:3472 +#: application/helpers/common_helper.php:3484 +#: application/helpers/common_helper.php:3520 +#: application/helpers/common_helper.php:3608 +#: application/helpers/common_helper.php:3618 +#: application/helpers/common_helper.php:3766 +#: application/helpers/common_helper.php:3777 +#: application/helpers/common_helper.php:3837 #: application/helpers/export_helper.php:296 #: application/helpers/export_helper.php:300 -#: application/helpers/export_helper.php:1381 -#: application/helpers/export_helper.php:1400 -#: application/helpers/expressions/em_manager_helper.php:3522 -#: application/helpers/expressions/em_manager_helper.php:3526 -#: application/helpers/qanda_helper.php:3853 -#: application/helpers/qanda_helper.php:4286 -#: application/helpers/qanda_helper.php:4342 +#: application/helpers/export_helper.php:1382 +#: application/helpers/export_helper.php:1401 +#: application/helpers/expressions/em_manager_helper.php:3511 +#: application/helpers/expressions/em_manager_helper.php:3515 +#: application/helpers/qanda_helper.php:3836 +#: application/helpers/qanda_helper.php:4272 +#: application/helpers/qanda_helper.php:4327 #: application/views/admin/dataentry/content_view.php:497 #: application/views/admin/dataentry/content_view.php:551 #: application/views/admin/export/statistics_view.php:510 @@ -666,7 +665,8 @@ msgstr "" #: application/views/admin/globalSettings_view.php:359 #: application/views/admin/globalSettings_view.php:397 #: application/views/admin/globalSettings_view.php:418 -#: application/views/admin/globalSettings_view.php:530 +#: application/views/admin/globalSettings_view.php:473 +#: application/views/admin/globalSettings_view.php:558 #: application/views/admin/participants/blacklist_view.php:23 #: application/views/admin/participants/userControl_view.php:23 #: application/views/admin/survey/activateSurvey_view.php:71 @@ -679,12 +679,13 @@ msgstr "" #: application/views/admin/survey/Question/editQuestion_view.php:230 #: application/views/admin/survey/Question/questionbar_view.php:214 #: application/views/admin/survey/Question/questionbar_view.php:229 -#: application/views/admin/survey/subview/tabNotification_view.php:37 -#: application/views/admin/survey/subview/tabNotification_view.php:64 -#: application/views/admin/survey/subview/tabNotification_view.php:92 -#: application/views/admin/survey/subview/tabNotification_view.php:114 -#: application/views/admin/survey/subview/tabNotification_view.php:131 -#: application/views/admin/survey/subview/tabNotification_view.php:146 +#: application/views/admin/survey/Question/yesNo_defaultvalue_widget.php:63 +#: application/views/admin/survey/subview/tabNotification_view.php:21 +#: application/views/admin/survey/subview/tabNotification_view.php:35 +#: application/views/admin/survey/subview/tabNotification_view.php:50 +#: application/views/admin/survey/subview/tabNotification_view.php:65 +#: application/views/admin/survey/subview/tabNotification_view.php:70 +#: application/views/admin/survey/subview/tabNotification_view.php:74 #: application/views/admin/survey/subview/tabPresentation_view.php:62 #: application/views/admin/survey/subview/tabPresentation_view.php:86 #: application/views/admin/survey/subview/tabPresentation_view.php:117 @@ -697,198 +698,198 @@ msgstr "" #: application/views/admin/survey/subview/tabPresentation_view.php:359 #: application/views/admin/survey/subview/tabPublication_view.php:15 #: application/views/admin/survey/subview/tabPublication_view.php:44 -#: application/views/admin/survey/subview/tabTokens_view.php:37 -#: application/views/admin/survey/subview/tabTokens_view.php:51 -#: application/views/admin/survey/subview/tabTokens_view.php:66 -#: application/views/admin/survey/subview/tabTokens_view.php:79 -#: application/views/admin/survey/subview/tabTokens_view.php:96 -#: application/views/admin/survey/subview/tabTokens_view.php:112 -#: application/views/admin/token/email.php:88 +#: application/views/admin/survey/subview/tabTokens_view.php:44 +#: application/views/admin/survey/subview/tabTokens_view.php:61 +#: application/views/admin/survey/subview/tabTokens_view.php:75 +#: application/views/admin/survey/subview/tabTokens_view.php:90 +#: application/views/admin/survey/subview/tabTokens_view.php:107 +#: application/views/admin/survey/subview/tabTokens_view.php:123 +#: application/views/admin/token/email.php:95 #: application/views/admin/token/managetokenattributes.php:55 #: application/views/admin/token/managetokenattributes.php:56 #: application/views/admin/token/remind.php:77 msgid "No" msgstr "" -#: application/controllers/admin/conditionsaction.php:699 -#: application/controllers/admin/printablesurvey.php:369 -#: application/controllers/admin/printablesurvey.php:1081 -#: application/controllers/admin/printablesurvey.php:1096 +#: application/controllers/admin/conditionsaction.php:700 +#: application/controllers/admin/printablesurvey.php:370 +#: application/controllers/admin/printablesurvey.php:1082 +#: application/controllers/admin/printablesurvey.php:1097 #: application/core/plugins/ExportSTATAxml/STATAxmlWriter.php:279 -#: application/helpers/admin/statistics_helper.php:1351 -#: application/helpers/common_helper.php:1547 +#: application/helpers/admin/statistics_helper.php:1353 +#: application/helpers/common_helper.php:1527 #: application/helpers/export_helper.php:304 -#: application/helpers/export_helper.php:1405 -#: application/helpers/expressions/em_manager_helper.php:3530 -#: application/helpers/qanda_helper.php:4447 -#: application/helpers/qanda_helper.php:4488 +#: application/helpers/export_helper.php:1406 +#: application/helpers/expressions/em_manager_helper.php:3519 +#: application/helpers/qanda_helper.php:4433 +#: application/helpers/qanda_helper.php:4472 #: application/views/admin/dataentry/content_view.php:567 #: application/views/admin/export/statistics_view.php:725 msgid "Increase" msgstr "" -#: application/controllers/admin/conditionsaction.php:700 -#: application/controllers/admin/printablesurvey.php:371 -#: application/controllers/admin/printablesurvey.php:1082 -#: application/controllers/admin/printablesurvey.php:1097 +#: application/controllers/admin/conditionsaction.php:701 +#: application/controllers/admin/printablesurvey.php:372 +#: application/controllers/admin/printablesurvey.php:1083 +#: application/controllers/admin/printablesurvey.php:1098 #: application/core/plugins/ExportSTATAxml/STATAxmlWriter.php:283 -#: application/helpers/admin/statistics_helper.php:1352 -#: application/helpers/common_helper.php:1549 +#: application/helpers/admin/statistics_helper.php:1354 +#: application/helpers/common_helper.php:1529 #: application/helpers/export_helper.php:305 -#: application/helpers/export_helper.php:1405 -#: application/helpers/expressions/em_manager_helper.php:3531 -#: application/helpers/qanda_helper.php:4448 -#: application/helpers/qanda_helper.php:4497 +#: application/helpers/export_helper.php:1406 +#: application/helpers/expressions/em_manager_helper.php:3520 +#: application/helpers/qanda_helper.php:4434 +#: application/helpers/qanda_helper.php:4481 #: application/views/admin/dataentry/content_view.php:568 #: application/views/admin/export/statistics_view.php:730 msgid "Same" msgstr "" -#: application/controllers/admin/conditionsaction.php:701 -#: application/controllers/admin/printablesurvey.php:370 -#: application/controllers/admin/printablesurvey.php:1083 -#: application/controllers/admin/printablesurvey.php:1098 +#: application/controllers/admin/conditionsaction.php:702 +#: application/controllers/admin/printablesurvey.php:371 +#: application/controllers/admin/printablesurvey.php:1084 +#: application/controllers/admin/printablesurvey.php:1099 #: application/core/plugins/ExportSTATAxml/STATAxmlWriter.php:287 -#: application/helpers/admin/statistics_helper.php:1353 -#: application/helpers/common_helper.php:1548 +#: application/helpers/admin/statistics_helper.php:1355 +#: application/helpers/common_helper.php:1528 #: application/helpers/export_helper.php:306 -#: application/helpers/export_helper.php:1405 -#: application/helpers/expressions/em_manager_helper.php:3532 -#: application/helpers/qanda_helper.php:4449 -#: application/helpers/qanda_helper.php:4508 +#: application/helpers/export_helper.php:1406 +#: application/helpers/expressions/em_manager_helper.php:3521 +#: application/helpers/qanda_helper.php:4435 +#: application/helpers/qanda_helper.php:4492 #: application/views/admin/dataentry/content_view.php:569 #: application/views/admin/export/statistics_view.php:735 msgid "Decrease" msgstr "" -#: application/controllers/admin/conditionsaction.php:721 -#: application/controllers/admin/conditionsaction.php:849 -#: application/controllers/admin/conditionsaction.php:850 -#: application/controllers/admin/conditionsaction.php:870 -#: application/controllers/admin/conditionsaction.php:899 -#: application/controllers/admin/conditionsaction.php:943 -#: application/controllers/admin/conditionsaction.php:952 -#: application/controllers/admin/conditionsaction.php:963 -#: application/controllers/admin/conditionsaction.php:972 -#: application/controllers/admin/conditionsaction.php:994 -#: application/controllers/admin/conditionsaction.php:1014 -#: application/controllers/admin/conditionsaction.php:1483 +#: application/controllers/admin/conditionsaction.php:722 +#: application/controllers/admin/conditionsaction.php:852 +#: application/controllers/admin/conditionsaction.php:853 +#: application/controllers/admin/conditionsaction.php:873 +#: application/controllers/admin/conditionsaction.php:902 +#: application/controllers/admin/conditionsaction.php:946 +#: application/controllers/admin/conditionsaction.php:955 +#: application/controllers/admin/conditionsaction.php:966 +#: application/controllers/admin/conditionsaction.php:975 +#: application/controllers/admin/conditionsaction.php:997 +#: application/controllers/admin/conditionsaction.php:1017 +#: application/controllers/admin/conditionsaction.php:1493 #: application/controllers/admin/dataentry.php:1200 -#: application/helpers/admin/statistics_helper.php:717 -#: application/helpers/admin/statistics_helper.php:756 -#: application/helpers/admin/statistics_helper.php:1588 -#: application/helpers/admin/statistics_helper.php:1811 -#: application/helpers/common_helper.php:1525 -#: application/helpers/common_helper.php:1533 -#: application/helpers/qanda_helper.php:937 -#: application/helpers/qanda_helper.php:1591 -#: application/helpers/qanda_helper.php:1898 -#: application/helpers/qanda_helper.php:2003 -#: application/helpers/qanda_helper.php:2066 -#: application/helpers/qanda_helper.php:3864 -#: application/helpers/qanda_helper.php:3908 -#: application/helpers/qanda_helper.php:4006 -#: application/helpers/qanda_helper.php:4069 -#: application/helpers/qanda_helper.php:4162 -#: application/helpers/qanda_helper.php:4208 -#: application/helpers/qanda_helper.php:4289 -#: application/helpers/qanda_helper.php:4363 -#: application/helpers/qanda_helper.php:4452 -#: application/helpers/qanda_helper.php:4525 -#: application/helpers/qanda_helper.php:4641 -#: application/helpers/qanda_helper.php:4723 -#: application/helpers/qanda_helper.php:4843 -#: application/helpers/qanda_helper.php:5678 -#: application/helpers/qanda_helper.php:5679 -#: application/helpers/qanda_helper.php:5964 -#: application/helpers/qanda_helper.php:6094 -#: application/helpers/qanda_helper.php:6128 -#: application/helpers/qanda_helper.php:6139 -#: application/helpers/qanda_helper.php:6294 -#: application/helpers/qanda_helper.php:6342 +#: application/helpers/admin/statistics_helper.php:719 +#: application/helpers/admin/statistics_helper.php:758 +#: application/helpers/admin/statistics_helper.php:1590 +#: application/helpers/admin/statistics_helper.php:1813 +#: application/helpers/common_helper.php:1505 +#: application/helpers/common_helper.php:1513 +#: application/helpers/qanda_helper.php:928 +#: application/helpers/qanda_helper.php:1584 +#: application/helpers/qanda_helper.php:1891 +#: application/helpers/qanda_helper.php:1996 +#: application/helpers/qanda_helper.php:2058 +#: application/helpers/qanda_helper.php:3846 +#: application/helpers/qanda_helper.php:3890 +#: application/helpers/qanda_helper.php:3990 +#: application/helpers/qanda_helper.php:4052 +#: application/helpers/qanda_helper.php:4147 +#: application/helpers/qanda_helper.php:4192 +#: application/helpers/qanda_helper.php:4275 +#: application/helpers/qanda_helper.php:4348 +#: application/helpers/qanda_helper.php:4438 +#: application/helpers/qanda_helper.php:4509 +#: application/helpers/qanda_helper.php:4626 +#: application/helpers/qanda_helper.php:4704 +#: application/helpers/qanda_helper.php:4821 +#: application/helpers/qanda_helper.php:5667 +#: application/helpers/qanda_helper.php:5668 +#: application/helpers/qanda_helper.php:5952 +#: application/helpers/qanda_helper.php:6080 +#: application/helpers/qanda_helper.php:6114 +#: application/helpers/qanda_helper.php:6125 +#: application/helpers/qanda_helper.php:6283 +#: application/helpers/qanda_helper.php:6319 #: application/views/admin/dataentry/content_view.php:29 msgid "No answer" msgstr "" -#: application/controllers/admin/conditionsaction.php:906 +#: application/controllers/admin/conditionsaction.php:909 msgid "Group of checkboxes" msgstr "" -#: application/controllers/admin/conditionsaction.php:921 +#: application/controllers/admin/conditionsaction.php:924 msgid "Single checkbox" msgstr "" -#: application/controllers/admin/conditionsaction.php:924 +#: application/controllers/admin/conditionsaction.php:927 msgid "checked" msgstr "" -#: application/controllers/admin/conditionsaction.php:925 +#: application/controllers/admin/conditionsaction.php:928 msgid "not checked" msgstr "" -#: application/controllers/admin/conditionsaction.php:947 +#: application/controllers/admin/conditionsaction.php:950 #: application/controllers/admin/dataentry.php:718 -#: application/controllers/admin/printablesurvey.php:348 -#: application/controllers/admin/printablesurvey.php:663 -#: application/controllers/admin/quotas.php:473 +#: application/controllers/admin/printablesurvey.php:349 +#: application/controllers/admin/printablesurvey.php:664 +#: application/controllers/admin/quotas.php:475 #: application/core/plugins/ExportSTATAxml/STATAxmlWriter.php:242 -#: application/helpers/admin/statistics_helper.php:1457 -#: application/helpers/common_helper.php:1532 +#: application/helpers/admin/statistics_helper.php:1459 +#: application/helpers/common_helper.php:1512 #: application/helpers/export_helper.php:291 -#: application/helpers/export_helper.php:1385 -#: application/helpers/expressions/em_manager_helper.php:3518 -#: application/helpers/qanda_helper.php:3890 +#: application/helpers/export_helper.php:1386 +#: application/helpers/expressions/em_manager_helper.php:3507 +#: application/helpers/qanda_helper.php:3872 #: application/views/admin/dataentry/content_view.php:54 #: application/views/admin/export/statistics_view.php:486 msgid "Female" msgstr "" -#: application/controllers/admin/conditionsaction.php:948 +#: application/controllers/admin/conditionsaction.php:951 #: application/controllers/admin/dataentry.php:719 -#: application/controllers/admin/printablesurvey.php:347 -#: application/controllers/admin/printablesurvey.php:664 -#: application/controllers/admin/quotas.php:472 +#: application/controllers/admin/printablesurvey.php:348 +#: application/controllers/admin/printablesurvey.php:665 +#: application/controllers/admin/quotas.php:474 #: application/core/plugins/ExportSTATAxml/STATAxmlWriter.php:246 -#: application/helpers/admin/statistics_helper.php:1458 -#: application/helpers/common_helper.php:1531 +#: application/helpers/admin/statistics_helper.php:1460 +#: application/helpers/common_helper.php:1511 #: application/helpers/export_helper.php:292 -#: application/helpers/export_helper.php:1385 -#: application/helpers/expressions/em_manager_helper.php:3517 -#: application/helpers/qanda_helper.php:3898 +#: application/helpers/export_helper.php:1386 +#: application/helpers/expressions/em_manager_helper.php:3506 +#: application/helpers/qanda_helper.php:3880 #: application/views/admin/dataentry/content_view.php:55 #: application/views/admin/export/statistics_view.php:492 msgid "Male" msgstr "" -#: application/controllers/admin/conditionsaction.php:1008 +#: application/controllers/admin/conditionsaction.php:1011 #: application/controllers/admin/dataentry.php:805 -#: application/controllers/admin/printablesurvey.php:411 -#: application/helpers/admin/statistics_helper.php:690 -#: application/helpers/admin/statistics_helper.php:1576 -#: application/helpers/admin/statistics_helper.php:1685 -#: application/helpers/admin/statistics_helper.php:1815 -#: application/helpers/common_helper.php:1509 -#: application/helpers/common_helper.php:1571 -#: application/helpers/common_helper.php:2037 -#: application/helpers/common_helper.php:2297 -#: application/helpers/common_helper.php:3212 -#: application/helpers/common_helper.php:3226 -#: application/helpers/common_helper.php:3242 -#: application/helpers/common_helper.php:3298 -#: application/helpers/common_helper.php:3554 -#: application/helpers/common_helper.php:3567 -#: application/helpers/common_helper.php:3577 -#: application/helpers/common_helper.php:3790 -#: application/helpers/common_helper.php:3799 -#: application/helpers/common_helper.php:3808 -#: application/helpers/common_helper.php:3817 -#: application/helpers/export_helper.php:948 -#: application/helpers/export_helper.php:957 -#: application/helpers/export_helper.php:1056 -#: application/helpers/export_helper.php:1071 -#: application/helpers/qanda_helper.php:1864 -#: application/helpers/qanda_helper.php:2421 -#: application/helpers/qanda_helper.php:2718 +#: application/controllers/admin/printablesurvey.php:412 +#: application/helpers/admin/statistics_helper.php:692 +#: application/helpers/admin/statistics_helper.php:1578 +#: application/helpers/admin/statistics_helper.php:1687 +#: application/helpers/admin/statistics_helper.php:1817 +#: application/helpers/common_helper.php:1489 +#: application/helpers/common_helper.php:1551 +#: application/helpers/common_helper.php:2033 +#: application/helpers/common_helper.php:2293 +#: application/helpers/common_helper.php:3208 +#: application/helpers/common_helper.php:3222 +#: application/helpers/common_helper.php:3238 +#: application/helpers/common_helper.php:3294 +#: application/helpers/common_helper.php:3550 +#: application/helpers/common_helper.php:3563 +#: application/helpers/common_helper.php:3573 +#: application/helpers/common_helper.php:3786 +#: application/helpers/common_helper.php:3795 +#: application/helpers/common_helper.php:3804 +#: application/helpers/common_helper.php:3813 +#: application/helpers/export_helper.php:949 +#: application/helpers/export_helper.php:958 +#: application/helpers/export_helper.php:1057 +#: application/helpers/export_helper.php:1072 +#: application/helpers/qanda_helper.php:1857 +#: application/helpers/qanda_helper.php:2420 +#: application/helpers/qanda_helper.php:2717 #: application/views/admin/dataentry/content_view.php:103 #: application/views/admin/dataentry/content_view.php:108 #: application/views/admin/dataentry/content_view.php:123 @@ -899,135 +900,135 @@ msgstr "" msgid "Other" msgstr "" -#: application/controllers/admin/conditionsaction.php:1025 +#: application/controllers/admin/conditionsaction.php:1028 msgid "Before" msgstr "" -#: application/controllers/admin/conditionsaction.php:1046 +#: application/controllers/admin/conditionsaction.php:1049 #: application/views/installer/precheck_view.php:52 #: application/views/installer/precheck_view.php:115 msgid "Current" msgstr "" -#: application/controllers/admin/conditionsaction.php:1063 +#: application/controllers/admin/conditionsaction.php:1066 #: application/views/admin/survey/Question/editQuestion_view.php:263 msgid "After" msgstr "" -#: application/controllers/admin/conditionsaction.php:1175 +#: application/controllers/admin/conditionsaction.php:1178 msgid "Only show question %s IF" msgstr "" -#: application/controllers/admin/conditionsaction.php:1201 -#: application/views/admin/participants/attributeControl_view.php:22 +#: application/controllers/admin/conditionsaction.php:1204 +#: application/views/admin/participants/attributeControl_view.php:23 #: application/views/admin/participants/displayParticipants_view.php:88 #: application/views/admin/participants/sharePanel_view.php:29 -#: application/views/admin/token/browse.php:115 +#: application/views/admin/token/browse.php:109 msgid "OR" msgstr "" -#: application/controllers/admin/conditionsaction.php:1220 +#: application/controllers/admin/conditionsaction.php:1223 msgid "Delete this scenario" msgstr "" -#: application/controllers/admin/conditionsaction.php:1224 +#: application/controllers/admin/conditionsaction.php:1227 msgid "Are you sure you want to delete all conditions set in this scenario?" msgstr "" -#: application/controllers/admin/conditionsaction.php:1227 +#: application/controllers/admin/conditionsaction.php:1230 msgid "Edit scenario" msgstr "" -#: application/controllers/admin/conditionsaction.php:1349 -#: application/controllers/admin/printablesurvey.php:247 +#: application/controllers/admin/conditionsaction.php:1351 +#: application/controllers/admin/printablesurvey.php:248 #: application/views/admin/survey/copySurvey_view.php:47 #: application/views/admin/survey/importSurvey_view.php:61 msgid "and" msgstr "" -#: application/controllers/admin/conditionsaction.php:1356 -#: application/controllers/admin/printablesurvey.php:231 -#: application/controllers/admin/printablesurvey.php:522 +#: application/controllers/admin/conditionsaction.php:1357 +#: application/controllers/admin/printablesurvey.php:232 +#: application/controllers/admin/printablesurvey.php:523 #: application/controllers/AdminController.php:408 -#: application/helpers/SurveyRuntimeHelper.php:651 +#: application/helpers/SurveyRuntimeHelper.php:632 msgid "or" msgstr "" -#: application/controllers/admin/conditionsaction.php:1383 -#: application/controllers/admin/conditionsaction.php:1456 +#: application/controllers/admin/conditionsaction.php:1392 +#: application/controllers/admin/conditionsaction.php:1466 msgid "From token table" msgstr "" -#: application/controllers/admin/conditionsaction.php:1387 -#: application/controllers/admin/conditionsaction.php:1460 +#: application/controllers/admin/conditionsaction.php:1396 +#: application/controllers/admin/conditionsaction.php:1470 msgid "Inexistant token table" msgstr "" -#: application/controllers/admin/conditionsaction.php:1445 +#: application/controllers/admin/conditionsaction.php:1455 #: application/views/installer/precheck_view.php:14 msgid "Not found" msgstr "" -#: application/controllers/admin/conditionsaction.php:1579 +#: application/controllers/admin/conditionsaction.php:1589 msgid "This question is always shown." msgstr "" -#: application/controllers/admin/conditionsaction.php:1592 -#: application/controllers/admin/conditionsaction.php:1637 +#: application/controllers/admin/conditionsaction.php:1602 +#: application/controllers/admin/conditionsaction.php:1647 #: application/views/admin/conditions/conditionshead_view.php:17 msgid "Copy conditions" msgstr "" -#: application/controllers/admin/conditionsaction.php:1609 +#: application/controllers/admin/conditionsaction.php:1619 msgid "No questions selected" msgstr "" -#: application/controllers/admin/conditionsaction.php:1609 +#: application/controllers/admin/conditionsaction.php:1619 msgid "Check all" msgstr "" -#: application/controllers/admin/conditionsaction.php:1609 +#: application/controllers/admin/conditionsaction.php:1619 msgid "Uncheck all" msgstr "" -#: application/controllers/admin/conditionsaction.php:1609 +#: application/controllers/admin/conditionsaction.php:1619 #: application/views/admin/participants/participantsPanel_view.php:11 msgid "selected" msgstr "" -#: application/controllers/admin/conditionsaction.php:1612 +#: application/controllers/admin/conditionsaction.php:1622 msgid "Copy the selected conditions to" msgstr "" -#: application/controllers/admin/conditionsaction.php:1661 +#: application/controllers/admin/conditionsaction.php:1671 msgid "There are no existing conditions in this survey." msgstr "" -#: application/controllers/admin/conditionsaction.php:1696 +#: application/controllers/admin/conditionsaction.php:1706 msgid "Edit condition" msgstr "" -#: application/controllers/admin/conditionsaction.php:1700 -#: application/controllers/admin/conditionsaction.php:1926 +#: application/controllers/admin/conditionsaction.php:1710 +#: application/controllers/admin/conditionsaction.php:1936 msgid "Add condition" msgstr "" -#: application/controllers/admin/conditionsaction.php:1711 +#: application/controllers/admin/conditionsaction.php:1721 msgid "Add scenario" msgstr "" -#: application/controllers/admin/conditionsaction.php:1712 +#: application/controllers/admin/conditionsaction.php:1722 msgid "Default scenario" msgstr "" -#: application/controllers/admin/conditionsaction.php:1723 +#: application/controllers/admin/conditionsaction.php:1733 msgid "Scenario" msgstr "" -#: application/controllers/admin/conditionsaction.php:1731 -#: application/controllers/admin/conditionsaction.php:2091 -#: application/controllers/admin/conditionsaction.php:2094 -#: application/controllers/admin/responses.php:660 +#: application/controllers/admin/conditionsaction.php:1741 +#: application/controllers/admin/conditionsaction.php:2101 +#: application/controllers/admin/conditionsaction.php:2104 +#: application/controllers/admin/responses.php:664 #: application/views/admin/export/statistics_view.php:1286 #: application/views/admin/export/statistics_view.php:1289 #: application/views/admin/survey/Question/questionbar_view.php:5 @@ -1035,53 +1036,53 @@ msgstr "" msgid "Question" msgstr "" -#: application/controllers/admin/conditionsaction.php:1735 +#: application/controllers/admin/conditionsaction.php:1745 msgid "Previous questions" msgstr "" -#: application/controllers/admin/conditionsaction.php:1736 -#: application/controllers/admin/conditionsaction.php:1859 +#: application/controllers/admin/conditionsaction.php:1746 +#: application/controllers/admin/conditionsaction.php:1869 msgid "Token fields" msgstr "" -#: application/controllers/admin/conditionsaction.php:1793 +#: application/controllers/admin/conditionsaction.php:1803 msgid "Comparison operator" msgstr "" -#: application/controllers/admin/conditionsaction.php:1808 -#: application/helpers/admin/statistics_helper.php:716 -#: application/helpers/admin/statistics_helper.php:755 -#: application/helpers/admin/statistics_helper.php:1867 -#: application/helpers/admin/statistics_helper.php:1913 -#: application/helpers/admin/statistics_helper.php:1922 -#: application/helpers/admin/statistics_helper.php:1927 -#: application/helpers/admin/statistics_helper.php:1950 -#: application/helpers/admin/statistics_helper.php:1958 -#: application/helpers/admin/statistics_helper.php:1963 -#: application/helpers/admin/statistics_helper.php:1994 -#: application/helpers/admin/statistics_helper.php:2002 -#: application/helpers/admin/statistics_helper.php:2007 -#: application/helpers/qanda_helper.php:1257 -#: application/helpers/qanda_helper.php:3445 -#: application/helpers/qanda_helper.php:3545 -#: application/helpers/qanda_helper.php:3638 -#: application/helpers/qanda_helper.php:3737 -#: application/helpers/qanda_helper.php:3738 -#: application/helpers/qanda_helper.php:3812 +#: application/controllers/admin/conditionsaction.php:1818 +#: application/helpers/admin/statistics_helper.php:718 +#: application/helpers/admin/statistics_helper.php:757 +#: application/helpers/admin/statistics_helper.php:1869 +#: application/helpers/admin/statistics_helper.php:1915 +#: application/helpers/admin/statistics_helper.php:1924 +#: application/helpers/admin/statistics_helper.php:1929 +#: application/helpers/admin/statistics_helper.php:1952 +#: application/helpers/admin/statistics_helper.php:1960 +#: application/helpers/admin/statistics_helper.php:1965 +#: application/helpers/admin/statistics_helper.php:1996 +#: application/helpers/admin/statistics_helper.php:2004 +#: application/helpers/admin/statistics_helper.php:2009 +#: application/helpers/qanda_helper.php:1249 +#: application/helpers/qanda_helper.php:3424 +#: application/helpers/qanda_helper.php:3528 +#: application/helpers/qanda_helper.php:3621 +#: application/helpers/qanda_helper.php:3720 +#: application/helpers/qanda_helper.php:3721 +#: application/helpers/qanda_helper.php:3795 #: application/views/admin/templates/templateeditor_question_answer_view.php:5 #: application/views/admin/templates/templateeditor_question_answer_view.php:6 msgid "Answer" msgstr "" -#: application/controllers/admin/conditionsaction.php:1856 +#: application/controllers/admin/conditionsaction.php:1866 msgid "Predefined" msgstr "" -#: application/controllers/admin/conditionsaction.php:1857 +#: application/controllers/admin/conditionsaction.php:1867 msgid "Constant" msgstr "" -#: application/controllers/admin/conditionsaction.php:1858 +#: application/controllers/admin/conditionsaction.php:1868 #: application/controllers/admin/translate.php:538 #: application/extensions/Menu/MenuWidget.php:385 #: application/views/admin/conditions/conditionshead_view.php:21 @@ -1093,141 +1094,141 @@ msgstr "" msgid "Questions" msgstr "" -#: application/controllers/admin/conditionsaction.php:1860 +#: application/controllers/admin/conditionsaction.php:1870 msgid "RegExp" msgstr "" -#: application/controllers/admin/conditionsaction.php:1867 +#: application/controllers/admin/conditionsaction.php:1877 msgid "Predefined answer options for this question" msgstr "" -#: application/controllers/admin/conditionsaction.php:1873 +#: application/controllers/admin/conditionsaction.php:1883 msgid "Constant value" msgstr "" -#: application/controllers/admin/conditionsaction.php:1891 +#: application/controllers/admin/conditionsaction.php:1901 msgid "Answer from previous questions" msgstr "" -#: application/controllers/admin/conditionsaction.php:1903 +#: application/controllers/admin/conditionsaction.php:1913 msgid "Attributes values from the participant's token" msgstr "" -#: application/controllers/admin/conditionsaction.php:1920 +#: application/controllers/admin/conditionsaction.php:1930 msgid "Update condition" msgstr "" -#: application/controllers/admin/conditionsaction.php:1936 +#: application/controllers/admin/conditionsaction.php:1946 #: application/views/admin/export/statistics_view.php:140 #: application/views/admin/export/statistics_view.php:1240 msgid "Clear" msgstr "" -#: application/controllers/admin/database.php:104 +#: application/controllers/admin/database.php:123 msgid "Default value settings were successfully saved." msgstr "" -#: application/controllers/admin/database.php:162 +#: application/controllers/admin/database.php:175 #: application/views/admin/database/database_view.php:10 msgid "Failed to update answers" msgstr "" -#: application/controllers/admin/database.php:174 +#: application/controllers/admin/database.php:190 msgid "Not all answer options were saved. This usually happens due to server limitations ( PHP setting max_input_vars) - please contact your system administrator." msgstr "" -#: application/controllers/admin/database.php:178 +#: application/controllers/admin/database.php:194 msgid "Answer options were successfully saved." msgstr "" -#: application/controllers/admin/database.php:215 +#: application/controllers/admin/database.php:231 #: application/views/admin/database/database_view.php:28 msgid "Failed to delete answer" msgstr "" -#: application/controllers/admin/database.php:307 +#: application/controllers/admin/database.php:330 msgid "Error on %s for subquestion %s: %s" msgstr "" -#: application/controllers/admin/database.php:312 +#: application/controllers/admin/database.php:335 msgid "Subquestions %s could not be updated." msgstr "" -#: application/controllers/admin/database.php:326 +#: application/controllers/admin/database.php:349 msgid "Not all subquestions were saved. This usually happens due to server limitations ( PHP setting max_input_vars) - please contact your system administrator." msgstr "" -#: application/controllers/admin/database.php:330 +#: application/controllers/admin/database.php:353 msgid "Subquestions were successfully saved." msgstr "" -#: application/controllers/admin/database.php:350 +#: application/controllers/admin/database.php:373 msgid "The question could not be added. You must enter at least a question code." msgstr "" -#: application/controllers/admin/database.php:395 +#: application/controllers/admin/database.php:418 msgid "Question could not be created with error on %s: %s" msgstr "" -#: application/controllers/admin/database.php:434 +#: application/controllers/admin/database.php:457 msgid "Question in language %s could not be created with error on %s: %s" msgstr "" -#: application/controllers/admin/database.php:448 +#: application/controllers/admin/database.php:471 #: application/views/admin/database/database_view.php:46 msgid "Question could not be created." msgstr "" -#: application/controllers/admin/database.php:573 +#: application/controllers/admin/database.php:596 msgid "Question was successfully added." msgstr "" -#: application/controllers/admin/database.php:720 +#: application/controllers/admin/database.php:743 msgid "Question could not be updated. There are conditions for other questions that rely on the answers to this question and changing the type will cause problems. You must delete these conditions before you can change the type of this question." msgstr "" -#: application/controllers/admin/database.php:793 +#: application/controllers/admin/database.php:816 msgid "Question could not be updated with error on %s: %s" msgstr "" -#: application/controllers/admin/database.php:798 +#: application/controllers/admin/database.php:821 msgid "Question could not be updated." msgstr "" -#: application/controllers/admin/database.php:826 +#: application/controllers/admin/database.php:849 msgid "Question was successfully saved." msgstr "" -#: application/controllers/admin/database.php:863 +#: application/controllers/admin/database.php:886 #: application/views/admin/database/database_view.php:4 #: application/views/admin/database/database_view.php:58 #: application/views/admin/database/database_view.php:71 msgid "Question could not be updated" msgstr "" -#: application/controllers/admin/database.php:931 +#: application/controllers/admin/database.php:950 msgid "Survey text elements successfully saved." msgstr "" -#: application/controllers/admin/database.php:1081 -#: application/controllers/admin/surveyadmin.php:1563 +#: application/controllers/admin/database.php:1100 +#: application/controllers/admin/surveyadmin.php:1562 msgid "Warning! Notification email was not updated because it was not valid." msgstr "" -#: application/controllers/admin/database.php:1088 -#: application/controllers/admin/surveyadmin.php:1570 +#: application/controllers/admin/database.php:1107 +#: application/controllers/admin/surveyadmin.php:1569 msgid "Warning! Bounce email was not updated because it was not valid." msgstr "" -#: application/controllers/admin/database.php:1138 +#: application/controllers/admin/database.php:1157 msgid "Survey settings were successfully saved." msgstr "" -#: application/controllers/admin/database.php:1142 +#: application/controllers/admin/database.php:1161 msgid "Error:" msgstr "" -#: application/controllers/admin/database.php:1142 +#: application/controllers/admin/database.php:1161 msgid "Survey could not be updated." msgstr "" @@ -1271,43 +1272,43 @@ msgstr "" #: application/helpers/admin/import_helper.php:556 #: application/helpers/admin/import_helper.php:572 #: application/helpers/admin/import_helper.php:1559 -#: application/helpers/admin/import_helper.php:2609 -#: application/helpers/admin/import_helper.php:2854 -#: application/helpers/admin/import_helper.php:2959 -#: application/helpers/admin/import_helper.php:3004 -#: application/helpers/admin/import_helper.php:3019 -#: application/helpers/admin/import_helper.php:3037 -#: application/helpers/admin/import_helper.php:3151 -#: application/helpers/admin/import_helper.php:3617 -#: application/helpers/admin/import_helper.php:3661 -#: application/helpers/admin/import_helper.php:3694 -#: application/helpers/admin/import_helper.php:3785 -#: application/helpers/admin/import_helper.php:3893 -#: application/helpers/admin/import_helper.php:3994 -#: application/helpers/admin/import_helper.php:3999 -#: application/helpers/admin/import_helper.php:4023 -#: application/helpers/admin/import_helper.php:4100 -#: application/helpers/admin/import_helper.php:4126 -#: application/helpers/admin/import_helper.php:4147 -#: application/helpers/admin/import_helper.php:4169 -#: application/helpers/admin/import_helper.php:4187 -#: application/helpers/admin/import_helper.php:4213 -#: application/helpers/admin/import_helper.php:4383 -#: application/helpers/admin/import_helper.php:4696 -#: application/helpers/admin/import_helper.php:4888 -#: application/helpers/admin/import_helper.php:4944 -#: application/helpers/admin/import_helper.php:4992 -#: application/helpers/admin/import_helper.php:5123 -#: application/helpers/admin/import_helper.php:5163 +#: application/helpers/admin/import_helper.php:2608 +#: application/helpers/admin/import_helper.php:2852 +#: application/helpers/admin/import_helper.php:2957 +#: application/helpers/admin/import_helper.php:3002 +#: application/helpers/admin/import_helper.php:3017 +#: application/helpers/admin/import_helper.php:3035 +#: application/helpers/admin/import_helper.php:3149 +#: application/helpers/admin/import_helper.php:3601 +#: application/helpers/admin/import_helper.php:3645 +#: application/helpers/admin/import_helper.php:3678 +#: application/helpers/admin/import_helper.php:3769 +#: application/helpers/admin/import_helper.php:3877 +#: application/helpers/admin/import_helper.php:3978 +#: application/helpers/admin/import_helper.php:3983 +#: application/helpers/admin/import_helper.php:4007 +#: application/helpers/admin/import_helper.php:4084 +#: application/helpers/admin/import_helper.php:4110 +#: application/helpers/admin/import_helper.php:4131 +#: application/helpers/admin/import_helper.php:4153 +#: application/helpers/admin/import_helper.php:4171 +#: application/helpers/admin/import_helper.php:4197 +#: application/helpers/admin/import_helper.php:4370 +#: application/helpers/admin/import_helper.php:4710 +#: application/helpers/admin/import_helper.php:4902 +#: application/helpers/admin/import_helper.php:4958 +#: application/helpers/admin/import_helper.php:5006 +#: application/helpers/admin/import_helper.php:5139 +#: application/helpers/admin/import_helper.php:5179 #: application/views/admin/dataentry/active_html_view.php:93 #: application/views/admin/dataentry/vvimport_result.php:13 #: application/views/admin/error_view.php:3 #: application/views/admin/labels/importlabelresources_view.php:29 #: application/views/admin/labels/import_view.php:6 #: application/views/admin/participants/displayParticipants_view.php:134 -#: application/views/admin/participants/displayParticipants_view.php:239 -#: application/views/admin/participants/displayParticipants_view.php:244 -#: application/views/admin/participants/displayParticipants_view.php:249 +#: application/views/admin/participants/displayParticipants_view.php:235 +#: application/views/admin/participants/displayParticipants_view.php:240 +#: application/views/admin/participants/displayParticipants_view.php:245 #: application/views/admin/participants/participantsPanel_view.php:6 #: application/views/admin/participants/uploadSummary_view.php:83 #: application/views/admin/survey/activateSurvey_view.php:6 @@ -1318,10 +1319,10 @@ msgstr "" #: application/views/admin/survey/importSurvey_view.php:15 #: application/views/admin/templates/importuploaded_view.php:25 #: application/views/admin/templates/importuploaded_view.php:82 -#: application/views/admin/token/browse.php:66 -#: application/views/admin/token/browse.php:211 -#: application/views/admin/token/browse.php:216 -#: application/views/admin/token/browse.php:221 +#: application/views/admin/token/browse.php:60 +#: application/views/admin/token/browse.php:212 +#: application/views/admin/token/browse.php:217 +#: application/views/admin/token/browse.php:222 #: application/views/admin/token/ldapform.php:2 msgid "Error" msgstr "" @@ -1329,11 +1330,11 @@ msgstr "" #: application/controllers/admin/dataentry.php:207 #: application/controllers/admin/labels.php:100 #: application/controllers/admin/labels.php:133 -#: application/controllers/admin/participantsaction.php:1087 +#: application/controllers/admin/participantsaction.php:1088 #: application/controllers/admin/questiongroups.php:53 #: application/controllers/admin/questions.php:52 -#: application/controllers/admin/surveyadmin.php:255 -#: application/controllers/admin/surveyadmin.php:862 +#: application/controllers/admin/surveyadmin.php:252 +#: application/controllers/admin/surveyadmin.php:863 #: application/controllers/admin/templates.php:156 #: application/controllers/admin/templates.php:276 msgid "An error occurred uploading your file. This may be caused by incorrect permissions in your %s folder." @@ -1369,11 +1370,11 @@ msgstr "" #: application/controllers/admin/dataentry.php:294 #: application/controllers/admin/statistics.php:121 -#: application/helpers/admin/statistics_helper.php:2957 +#: application/helpers/admin/statistics_helper.php:2959 msgid "Quick statistics" msgstr "" -#: application/controllers/admin/dataentry.php:350 +#: application/controllers/admin/dataentry.php:352 msgid "%s old response(s) were successfully imported." msgstr "" @@ -1400,8 +1401,8 @@ msgstr "" #: application/controllers/admin/quotas.php:167 #: application/controllers/admin/responses.php:115 #: application/controllers/admin/responses.php:116 -#: application/controllers/admin/responses.php:452 -#: application/controllers/Statistics_userController.php:451 +#: application/controllers/admin/responses.php:456 +#: application/controllers/Statistics_userController.php:434 #: application/models/Token.php:48 #: application/views/admin/quotas/viewquotas_view.php:17 #: application/views/admin/token/exportdialog.php:5 @@ -1413,7 +1414,7 @@ msgstr "" #: application/controllers/admin/dataentry.php:816 #: application/controllers/admin/dataentry.php:952 #: application/controllers/admin/dataentry.php:1069 -#: application/helpers/qanda_helper.php:1605 +#: application/helpers/qanda_helper.php:1598 #: application/views/admin/dataentry/content_view.php:53 #: application/views/admin/dataentry/content_view.php:118 #: application/views/admin/dataentry/content_view.php:136 @@ -1428,7 +1429,7 @@ msgid "Please choose" msgstr "" #: application/controllers/admin/dataentry.php:857 -#: application/helpers/qanda_helper.php:2148 +#: application/helpers/qanda_helper.php:2143 #: application/views/admin/dataentry/content_view.php:150 #: application/views/admin/templates/templateeditor_printablesurvey_quesanswer_view.php:3 msgid "First choice" @@ -1441,29 +1442,29 @@ msgstr "" #: application/controllers/admin/dataentry.php:865 #: application/core/Survey_Common_Action.php:642 -#: application/helpers/common_helper.php:248 -#: application/helpers/common_helper.php:366 -#: application/helpers/common_helper.php:970 -#: application/helpers/common_helper.php:1040 -#: application/helpers/common_helper.php:3545 -#: application/helpers/common_helper.php:7195 -#: application/helpers/common_helper.php:7235 +#: application/helpers/common_helper.php:228 +#: application/helpers/common_helper.php:346 +#: application/helpers/common_helper.php:950 +#: application/helpers/common_helper.php:1020 +#: application/helpers/common_helper.php:3541 +#: application/helpers/common_helper.php:7227 +#: application/helpers/common_helper.php:7267 #: application/views/admin/dataentry/content_view.php:156 -#: application/views/admin/token/bounce.php:14 -#: application/views/admin/token/bounce.php:56 +#: application/views/admin/token/bounce.php:17 +#: application/views/admin/token/bounce.php:59 msgid "None" msgstr "" #: application/controllers/admin/dataentry.php:891 -#: application/helpers/common_helper.php:3572 -#: application/helpers/qanda_helper.php:2197 +#: application/helpers/common_helper.php:3568 +#: application/helpers/qanda_helper.php:2192 #: application/views/admin/dataentry/content_view.php:182 msgid "Your Choices" msgstr "" #: application/controllers/admin/dataentry.php:892 -#: application/helpers/common_helper.php:3582 -#: application/helpers/qanda_helper.php:2205 +#: application/helpers/common_helper.php:3578 +#: application/helpers/qanda_helper.php:2200 #: application/views/admin/dataentry/content_view.php:183 msgid "Your Ranking" msgstr "" @@ -1480,17 +1481,17 @@ msgstr "" #: application/views/admin/participants/userControl_view.php:35 #: application/views/admin/participants/viewAttribute_view.php:171 #: application/views/admin/survey/editLocalSettings_main_view.php:18 -#: application/views/admin/survey/editSurvey_view.php:34 -#: application/views/admin/survey/editSurvey_view.php:56 +#: application/views/admin/survey/editSurvey_view.php:25 +#: application/views/admin/survey/editSurvey_view.php:59 #: application/views/admin/survey/listSurveys_view.php:35 #: application/views/admin/survey/listSurveys_view.php:40 #: application/views/admin/survey/newSurvey_view.php:29 #: application/views/admin/survey/organizeGroupsAndQuestions_view.php:35 -#: application/views/admin/survey/Question/answerOptions_view.php:197 -#: application/views/admin/survey/Question/editdefaultvalues_view.php:183 +#: application/views/admin/survey/Question/answerOptions_view.php:198 +#: application/views/admin/survey/Question/editdefaultvalues_view.php:198 #: application/views/admin/survey/Question/editQuestion_view.php:47 #: application/views/admin/survey/Question/editQuestion_view.php:314 -#: application/views/admin/survey/Question/subQuestion_view.php:196 +#: application/views/admin/survey/Question/subQuestion_view.php:197 #: application/views/admin/survey/QuestionGroups/editGroup_view.php:43 #: application/views/admin/token/managetokenattributes.php:87 #: application/views/admin/translate/translatefooter_view.php:1 @@ -1500,8 +1501,8 @@ msgid "Save" msgstr "" #: application/controllers/admin/dataentry.php:1469 -#: application/controllers/admin/tokens.php:820 -#: application/controllers/admin/tokens.php:990 +#: application/controllers/admin/tokens.php:830 +#: application/controllers/admin/tokens.php:999 #: application/controllers/admin/useraction.php:146 #: application/views/admin/dataentry/insert.php:73 #: application/views/admin/dataentry/iteratesurvey.php:5 @@ -1537,7 +1538,7 @@ msgid "View This Record" msgstr "" #: application/controllers/admin/dataentry.php:1472 -#: application/controllers/admin/responses.php:860 +#: application/controllers/admin/responses.php:866 #: application/views/admin/dataentry/delete.php:5 #: application/views/admin/dataentry/vvimport_result.php:31 #: application/views/admin/responses/browseallfiltered_view.php:3 @@ -1594,18 +1595,18 @@ msgid "A token entry for the saved survey has been created too." msgstr "" #: application/controllers/admin/dataentry.php:1823 -#: application/libraries/Save.php:197 +#: application/libraries/Save.php:204 msgid "Saved Survey Details" msgstr "" #: application/controllers/admin/dataentry.php:1824 -#: application/libraries/Save.php:198 +#: application/libraries/Save.php:205 msgid "Thank you for saving your survey in progress. The following details can be used to return to this survey and continue where you left off. Please keep this e-mail for your reference - we cannot retrieve the password for you." msgstr "" #: application/controllers/admin/dataentry.php:1826 -#: application/helpers/replacements_helper.php:476 -#: application/libraries/Save.php:200 +#: application/helpers/replacements_helper.php:505 +#: application/libraries/Save.php:207 msgid "Name" msgstr "" @@ -1614,18 +1615,18 @@ msgstr "" #: application/controllers/admin/useraction.php:130 #: application/controllers/admin/useraction.php:380 #: application/controllers/admin/useraction.php:398 -#: application/core/plugins/Authdb/Authdb.php:76 +#: application/core/plugins/Authdb/Authdb.php:75 #: application/core/plugins/AuthLDAP/AuthLDAP.php:108 -#: application/helpers/replacements_helper.php:482 -#: application/helpers/replacements_helper.php:515 -#: application/libraries/Save.php:201 +#: application/helpers/replacements_helper.php:511 +#: application/helpers/replacements_helper.php:544 +#: application/libraries/Save.php:208 #: application/views/admin/user/modifyuser.php:8 #: application/views/installer/success_view.php:10 msgid "Password" msgstr "" #: application/controllers/admin/dataentry.php:1828 -#: application/libraries/Save.php:202 +#: application/libraries/Save.php:209 msgid "Reload your survey by clicking on the following link (or pasting it into your browser):" msgstr "" @@ -1646,12 +1647,12 @@ msgid "The answer(s) must meet these array_filter criteria:" msgstr "" #: application/controllers/admin/dataentry.php:2368 -#: application/controllers/admin/printablesurvey.php:1751 +#: application/controllers/admin/printablesurvey.php:1758 msgid "Only answer this question for the items you selected in question %s ('%s')" msgstr "" #: application/controllers/admin/dataentry.php:2376 -#: application/controllers/admin/printablesurvey.php:1766 +#: application/controllers/admin/printablesurvey.php:1774 msgid "Only answer this question for the items you did not select in question %s ('%s')" msgstr "" @@ -1663,42 +1664,42 @@ msgstr "" msgid "Email templates successfully saved." msgstr "" -#: application/controllers/admin/export.php:209 -#: application/controllers/admin/export.php:389 +#: application/controllers/admin/export.php:210 +#: application/controllers/admin/export.php:390 #: application/views/admin/export/exportresults_view.php:6 #: application/views/admin/export/vv_view.php:30 msgid "Export results" msgstr "" -#: application/controllers/admin/export.php:630 +#: application/controllers/admin/export.php:624 msgid "Export VV file" msgstr "" -#: application/controllers/admin/export.php:808 +#: application/controllers/admin/export.php:802 msgid "This archive contains a PDF file of the survey, the queXML file of the survey and a queXF banding XML file which can be used with queXF: http://quexf.sourceforge.net/ for processing scanned surveys." msgstr "" #: application/controllers/admin/expressions.php:29 -#: application/controllers/admin/printablesurvey.php:37 +#: application/controllers/admin/printablesurvey.php:36 #: application/controllers/admin/quotas.php:66 #: application/controllers/admin/quotas.php:80 #: application/controllers/admin/responses.php:276 #: application/controllers/admin/responses.php:338 #: application/controllers/admin/responses.php:368 -#: application/controllers/admin/responses.php:609 -#: application/helpers/common_helper.php:6013 +#: application/controllers/admin/responses.php:613 +#: application/helpers/common_helper.php:6045 msgid "Access denied!" msgstr "" -#: application/controllers/admin/globalsettings.php:177 +#: application/controllers/admin/globalsettings.php:192 msgid "Warning! Admin bounce email was not saved because it was not valid." msgstr "" -#: application/controllers/admin/globalsettings.php:183 +#: application/controllers/admin/globalsettings.php:198 msgid "Warning! Admin email was not saved because it was not valid." msgstr "" -#: application/controllers/admin/globalsettings.php:213 +#: application/controllers/admin/globalsettings.php:233 msgid "Global settings were saved." msgstr "" @@ -1707,18 +1708,18 @@ msgid "Logged in" msgstr "" #: application/controllers/admin/labels.php:54 -#: application/controllers/admin/surveyadmin.php:209 +#: application/controllers/admin/surveyadmin.php:206 msgid "Demo mode only: Uploading files is disabled in this system." msgstr "" #: application/controllers/admin/labels.php:68 -#: application/controllers/admin/surveyadmin.php:223 +#: application/controllers/admin/surveyadmin.php:220 #: application/controllers/admin/templates.php:120 msgid "Incorrect permissions in your %s folder." msgstr "" #: application/controllers/admin/labels.php:97 -#: application/controllers/admin/surveyadmin.php:252 +#: application/controllers/admin/surveyadmin.php:249 msgid "This ZIP archive contains no valid Resources files. Import failed." msgstr "" @@ -1732,15 +1733,15 @@ msgstr "" #: application/controllers/admin/labels.php:195 #: application/views/admin/labels/editlabel_view.php:5 -#: application/views/admin/labels/labelbar_view.php:10 +#: application/views/admin/labels/labelbar_view.php:11 msgid "Edit label set" msgstr "" -#: application/controllers/admin/labels.php:334 +#: application/controllers/admin/labels.php:329 msgid "Label set properties sucessfully updated." msgstr "" -#: application/controllers/admin/labels.php:343 +#: application/controllers/admin/labels.php:339 msgid "Label set sucessfully deleted." msgstr "" @@ -1887,20 +1888,20 @@ msgstr[0] "" msgstr[1] "" #: application/controllers/admin/participantsaction.php:393 -#: application/views/admin/participants/attributeControl_view.php:26 #: application/views/admin/participants/attributeControl_view.php:27 +#: application/views/admin/participants/attributeControl_view.php:28 msgid "Drop-down list" msgstr "" #: application/controllers/admin/participantsaction.php:394 -#: application/views/admin/participants/attributeControl_view.php:26 #: application/views/admin/participants/attributeControl_view.php:27 +#: application/views/admin/participants/attributeControl_view.php:28 msgid "Date" msgstr "" #: application/controllers/admin/participantsaction.php:395 -#: application/views/admin/participants/attributeControl_view.php:26 #: application/views/admin/participants/attributeControl_view.php:27 +#: application/views/admin/participants/attributeControl_view.php:28 msgid "Text box" msgstr "" @@ -1913,10 +1914,10 @@ msgstr "" msgid "%s participant(s) are to be copied " msgstr "" -#: application/controllers/admin/participantsaction.php:1060 -#: application/controllers/admin/surveyadmin.php:1329 -#: application/views/admin/labels/labelview_view.php:141 -#: application/views/admin/labels/labelview_view.php:150 +#: application/controllers/admin/participantsaction.php:1061 +#: application/controllers/admin/surveyadmin.php:1328 +#: application/views/admin/labels/labelview_view.php:136 +#: application/views/admin/labels/labelview_view.php:145 #: application/views/admin/survey/Question/editQuestion_view.php:329 #: application/views/admin/survey/QuestionGroups/addGroup_view.php:52 #: application/views/admin/survey/subview/tabImport_view.php:2 @@ -1926,271 +1927,268 @@ msgstr "" msgid "Please select a file to import!" msgstr "" -#: application/controllers/admin/participantsaction.php:1075 +#: application/controllers/admin/participantsaction.php:1076 msgid "This is not a .csv file." msgstr "" -#: application/controllers/admin/participantsaction.php:1132 +#: application/controllers/admin/participantsaction.php:1143 #: application/controllers/admin/templates.php:146 #: application/core/Survey_Common_Action.php:984 #: application/views/admin/participants/displayParticipants_view.php:143 #: application/views/admin/participants/participantsPanel_view.php:5 -#: application/views/admin/token/browse.php:70 -#: application/views/admin/token/browse.php:82 +#: application/views/admin/token/browse.php:64 +#: application/views/admin/token/browse.php:76 msgid "OK" msgstr "" -#: application/controllers/admin/participantsaction.php:1133 -#: application/views/admin/token/browse.php:99 +#: application/controllers/admin/participantsaction.php:1144 +#: application/views/admin/token/browse.php:93 msgid "Summary" msgstr "" -#: application/controllers/admin/participantsaction.php:1134 +#: application/controllers/admin/participantsaction.php:1145 msgid "Upload summary" msgstr "" -#: application/controllers/admin/participantsaction.php:1135 +#: application/controllers/admin/participantsaction.php:1146 msgid "You have to pair this field with an existing attribute." msgstr "" -#: application/controllers/admin/participantsaction.php:1136 +#: application/controllers/admin/participantsaction.php:1147 msgid "Only one CSV attribute is mapped with central attribute." msgstr "" -#: application/controllers/admin/participantsaction.php:1137 +#: application/controllers/admin/participantsaction.php:1148 #: application/views/admin/participants/attributeMapToken_view.php:9 #: application/views/admin/participants/attributeMap_view.php:17 msgid "This list cannot accept token attributes." msgstr "" -#: application/controllers/admin/participantsaction.php:1484 +#: application/controllers/admin/participantsaction.php:1495 msgid "%s participants have been shared" msgstr "" -#: application/controllers/admin/participantsaction.php:1504 +#: application/controllers/admin/participantsaction.php:1515 msgid "%s participants have been copied to the central participants table" msgstr "" -#: application/controllers/admin/participantsaction.php:1507 -#: application/controllers/admin/participantsaction.php:1531 -#: application/controllers/admin/participantsaction.php:1561 +#: application/controllers/admin/participantsaction.php:1518 +#: application/controllers/admin/participantsaction.php:1548 msgid "%s entries were not copied because they already existed" msgstr "" -#: application/controllers/admin/participantsaction.php:1511 +#: application/controllers/admin/participantsaction.php:1522 msgid "Attribute values for existing participants have been updated from the token records" msgstr "" -#: application/controllers/admin/participantsaction.php:1528 -#: application/controllers/admin/participantsaction.php:1558 +#: application/controllers/admin/participantsaction.php:1545 msgid "%s participants have been copied to the survey token table" msgstr "" -#: application/controllers/admin/participantsaction.php:1535 -#: application/controllers/admin/participantsaction.php:1569 -msgid "Attribute values for existing participants have been updated from the participants records" -msgstr "" - -#: application/controllers/admin/participantsaction.php:1565 +#: application/controllers/admin/participantsaction.php:1552 msgid "%s entries were skipped because they are blacklisted" msgstr "" -#: application/controllers/admin/printablesurvey.php:80 +#: application/controllers/admin/participantsaction.php:1556 +msgid "Attribute values for existing participants have been updated from the participants records" +msgstr "" + +#: application/controllers/admin/printablesurvey.php:81 #: application/controllers/admin/templates.php:1188 msgid "Please submit by %s" msgstr "" -#: application/controllers/admin/printablesurvey.php:122 +#: application/controllers/admin/printablesurvey.php:123 msgid "Database" msgstr "" -#: application/controllers/admin/printablesurvey.php:122 +#: application/controllers/admin/printablesurvey.php:123 msgid "table" msgstr "" -#: application/controllers/admin/printablesurvey.php:136 +#: application/controllers/admin/printablesurvey.php:137 msgid "Submit Your Survey." msgstr "" -#: application/controllers/admin/printablesurvey.php:138 +#: application/controllers/admin/printablesurvey.php:139 #: application/controllers/admin/templates.php:1189 msgid "Thank you for completing this survey." msgstr "" -#: application/controllers/admin/printablesurvey.php:149 +#: application/controllers/admin/printablesurvey.php:150 #: application/controllers/admin/templates.php:1185 msgid "Please fax your completed survey to:" msgstr "" -#: application/controllers/admin/printablesurvey.php:257 -#: application/controllers/admin/printablesurvey.php:285 +#: application/controllers/admin/printablesurvey.php:258 +#: application/controllers/admin/printablesurvey.php:286 msgid "Answer was" msgstr "" -#: application/controllers/admin/printablesurvey.php:261 +#: application/controllers/admin/printablesurvey.php:262 msgid "Answer was NOT" msgstr "" -#: application/controllers/admin/printablesurvey.php:265 +#: application/controllers/admin/printablesurvey.php:266 msgid "Answer was less than" msgstr "" -#: application/controllers/admin/printablesurvey.php:269 +#: application/controllers/admin/printablesurvey.php:270 msgid "Answer was less than or equal to" msgstr "" -#: application/controllers/admin/printablesurvey.php:273 +#: application/controllers/admin/printablesurvey.php:274 msgid "Answer was greater than or equal to" msgstr "" -#: application/controllers/admin/printablesurvey.php:277 +#: application/controllers/admin/printablesurvey.php:278 msgid "Answer was greater than" msgstr "" -#: application/controllers/admin/printablesurvey.php:281 +#: application/controllers/admin/printablesurvey.php:282 msgid "Answer matched (regexp)" msgstr "" -#: application/controllers/admin/printablesurvey.php:294 -#: application/controllers/admin/printablesurvey.php:322 +#: application/controllers/admin/printablesurvey.php:295 +#: application/controllers/admin/printablesurvey.php:323 msgid "is" msgstr "" -#: application/controllers/admin/printablesurvey.php:298 +#: application/controllers/admin/printablesurvey.php:299 msgid "is NOT" msgstr "" -#: application/controllers/admin/printablesurvey.php:302 +#: application/controllers/admin/printablesurvey.php:303 msgid "is less than" msgstr "" -#: application/controllers/admin/printablesurvey.php:306 +#: application/controllers/admin/printablesurvey.php:307 msgid "is less than or equal to" msgstr "" -#: application/controllers/admin/printablesurvey.php:310 +#: application/controllers/admin/printablesurvey.php:311 msgid "is greater than or equal to" msgstr "" -#: application/controllers/admin/printablesurvey.php:314 +#: application/controllers/admin/printablesurvey.php:315 msgid "is greater than" msgstr "" -#: application/controllers/admin/printablesurvey.php:318 +#: application/controllers/admin/printablesurvey.php:319 msgid "is matched (regexp)" msgstr "" -#: application/controllers/admin/printablesurvey.php:490 -#: application/helpers/admin/statistics_helper.php:1517 -#: application/helpers/admin/statistics_helper.php:1539 +#: application/controllers/admin/printablesurvey.php:491 +#: application/helpers/admin/statistics_helper.php:1519 +#: application/helpers/admin/statistics_helper.php:1541 #: application/views/admin/dataentry/content_view.php:75 msgid "Label %s" msgstr "" -#: application/controllers/admin/printablesurvey.php:513 +#: application/controllers/admin/printablesurvey.php:514 msgid "RANK" msgstr "" -#: application/controllers/admin/printablesurvey.php:532 +#: application/controllers/admin/printablesurvey.php:533 msgid "at question" msgstr "" -#: application/controllers/admin/printablesurvey.php:558 +#: application/controllers/admin/printablesurvey.php:559 msgid "Only answer this question if the following conditions are met:" msgstr "" -#: application/controllers/admin/printablesurvey.php:580 +#: application/controllers/admin/printablesurvey.php:581 msgid "ID:" msgstr "" -#: application/controllers/admin/printablesurvey.php:581 +#: application/controllers/admin/printablesurvey.php:582 #: application/libraries/PluginManager/Question/QuestionBase.php:107 msgid "Question code:" msgstr "" -#: application/controllers/admin/printablesurvey.php:616 +#: application/controllers/admin/printablesurvey.php:617 #: application/controllers/admin/templates.php:1041 #: application/controllers/admin/templates.php:1161 -#: application/helpers/qanda_helper.php:297 -#: application/helpers/qanda_helper.php:298 +#: application/helpers/qanda_helper.php:289 +#: application/helpers/qanda_helper.php:290 msgid "*" msgstr "" -#: application/controllers/admin/printablesurvey.php:642 -#: application/controllers/admin/printablesurvey.php:660 -#: application/controllers/admin/printablesurvey.php:689 -#: application/controllers/admin/printablesurvey.php:751 -#: application/controllers/admin/printablesurvey.php:939 +#: application/controllers/admin/printablesurvey.php:643 +#: application/controllers/admin/printablesurvey.php:661 +#: application/controllers/admin/printablesurvey.php:690 +#: application/controllers/admin/printablesurvey.php:752 +#: application/controllers/admin/printablesurvey.php:940 #: application/controllers/admin/templates.php:1165 msgid "Please choose *only one* of the following:" msgstr "" -#: application/controllers/admin/printablesurvey.php:654 +#: application/controllers/admin/printablesurvey.php:655 msgid "Please enter a date:" msgstr "" -#: application/controllers/admin/printablesurvey.php:761 #: application/controllers/admin/printablesurvey.php:762 -#: application/helpers/qanda_helper.php:2702 -#: application/helpers/qanda_helper.php:2732 -#: application/helpers/qanda_helper.php:2735 +#: application/controllers/admin/printablesurvey.php:763 +#: application/helpers/qanda_helper.php:2701 +#: application/helpers/qanda_helper.php:2731 +#: application/helpers/qanda_helper.php:2734 msgid "Make a comment on your choice here:" msgstr "" -#: application/controllers/admin/printablesurvey.php:770 +#: application/controllers/admin/printablesurvey.php:771 msgid "Please number each box in order of preference from 1 to" msgstr "" -#: application/controllers/admin/printablesurvey.php:791 +#: application/controllers/admin/printablesurvey.php:792 msgid "Please choose *all* that apply:" msgstr "" -#: application/controllers/admin/printablesurvey.php:838 +#: application/controllers/admin/printablesurvey.php:839 msgid "Please choose all that apply and provide a comment:" msgstr "" -#: application/controllers/admin/printablesurvey.php:853 -#: application/helpers/expressions/em_manager_helper.php:3253 -#: application/helpers/expressions/em_manager_helper.php:3265 -#: application/helpers/expressions/em_manager_helper.php:3651 -#: application/helpers/expressions/em_manager_helper.php:6248 -#: application/helpers/qanda_helper.php:1425 -#: application/helpers/qanda_helper.php:1750 -#: application/helpers/qanda_helper.php:2265 -#: application/helpers/qanda_helper.php:2633 +#: application/controllers/admin/printablesurvey.php:854 +#: application/helpers/expressions/em_manager_helper.php:3242 +#: application/helpers/expressions/em_manager_helper.php:3254 +#: application/helpers/expressions/em_manager_helper.php:3640 +#: application/helpers/expressions/em_manager_helper.php:6244 +#: application/helpers/qanda_helper.php:1418 +#: application/helpers/qanda_helper.php:1743 +#: application/helpers/qanda_helper.php:2264 +#: application/helpers/qanda_helper.php:2632 msgid "Other:" msgstr "" -#: application/controllers/admin/printablesurvey.php:883 +#: application/controllers/admin/printablesurvey.php:884 msgid "Please write your answer(s) here:" msgstr "" -#: application/controllers/admin/printablesurvey.php:904 -#: application/controllers/admin/printablesurvey.php:911 -#: application/controllers/admin/printablesurvey.php:918 -#: application/controllers/admin/printablesurvey.php:933 +#: application/controllers/admin/printablesurvey.php:905 +#: application/controllers/admin/printablesurvey.php:912 +#: application/controllers/admin/printablesurvey.php:919 +#: application/controllers/admin/printablesurvey.php:934 msgid "Please write your answer here:" msgstr "" -#: application/controllers/admin/printablesurvey.php:948 -#: application/controllers/admin/printablesurvey.php:1006 -#: application/controllers/admin/printablesurvey.php:1037 -#: application/controllers/admin/printablesurvey.php:1073 -#: application/controllers/admin/printablesurvey.php:1257 -#: application/controllers/admin/printablesurvey.php:1352 -#: application/controllers/admin/printablesurvey.php:1461 +#: application/controllers/admin/printablesurvey.php:949 +#: application/controllers/admin/printablesurvey.php:1007 +#: application/controllers/admin/printablesurvey.php:1038 +#: application/controllers/admin/printablesurvey.php:1074 +#: application/controllers/admin/printablesurvey.php:1258 +#: application/controllers/admin/printablesurvey.php:1353 +#: application/controllers/admin/printablesurvey.php:1462 msgid "Please choose the appropriate response for each item:" msgstr "" -#: application/controllers/admin/printablesurvey.php:1511 +#: application/controllers/admin/printablesurvey.php:1512 msgid "There are {NUMBEROFQUESTIONS} questions in this survey" msgstr "" -#: application/controllers/admin/printablesurvey.php:1660 +#: application/controllers/admin/printablesurvey.php:1661 msgid "Please choose at least %s items." msgstr "" -#: application/controllers/admin/printablesurvey.php:1663 +#: application/controllers/admin/printablesurvey.php:1664 msgid "Please choose no more than %s items." msgstr "" @@ -2213,13 +2211,13 @@ msgstr "" #: application/controllers/admin/questiongroups.php:324 #: application/controllers/admin/quotas.php:357 -#: application/controllers/admin/surveyadmin.php:791 +#: application/controllers/admin/surveyadmin.php:792 #: application/views/admin/assessments_view.php:103 #: application/views/admin/emailtemplates/emailtemplates_view.php:38 #: application/views/admin/quotas/newquota_view.php:27 -#: application/views/admin/survey/Question/answerOptions_view.php:44 +#: application/views/admin/survey/Question/answerOptions_view.php:45 #: application/views/admin/survey/Question/editQuestion_view.php:34 -#: application/views/admin/survey/Question/subQuestion_view.php:43 +#: application/views/admin/survey/Question/subQuestion_view.php:44 #: application/views/admin/survey/QuestionGroups/addGroup_view.php:10 #: application/views/admin/token/email.php:18 #: application/views/admin/token/managetokenattributes.php:10 @@ -2241,6 +2239,7 @@ msgstr "" #: application/controllers/admin/questions.php:192 #: application/views/admin/survey/Question/editdefaultvalues_view.php:36 +#: application/views/admin/survey/Question/yesNo_defaultvalue_widget.php:69 msgid "" msgstr "" @@ -2264,6 +2263,30 @@ msgstr "" msgid "You are not authorized to delete questions." msgstr "" +#: application/controllers/admin/questions.php:1043 +msgid "The existing label set has some assessment values assigned." +msgstr "" + +#: application/controllers/admin/questions.php:1043 +msgid "If you replace the label set the existing asssessment values will be lost." +msgstr "" + +#: application/controllers/admin/questions.php:1047 +msgid "The existing label has different/more languages." +msgstr "" + +#: application/controllers/admin/questions.php:1047 +msgid "If you replace the label set these translations will be lost." +msgstr "" + +#: application/controllers/admin/questions.php:1054 +msgid "Do you really want to continue?" +msgstr "" + +#: application/controllers/admin/questions.php:1058 +msgid "You are about to replace a given label set with the current answer options" +msgstr "" + #: application/controllers/admin/quotas.php:167 #: application/views/admin/quotas/newquota_view.php:5 #: application/views/admin/quotas/viewquotas_view.php:14 @@ -2280,7 +2303,7 @@ msgid "Remaining" msgstr "" #: application/controllers/admin/responses.php:57 -#: application/controllers/admin/surveyadmin.php:905 +#: application/controllers/admin/surveyadmin.php:906 #: application/core/Survey_Common_Action.php:386 #: application/core/Survey_Common_Action.php:528 msgid "Invalid survey ID" @@ -2291,51 +2314,51 @@ msgid "This survey has not been activated. There are no results to browse." msgstr "" #: application/controllers/admin/responses.php:110 -#: application/controllers/admin/responses.php:445 +#: application/controllers/admin/responses.php:449 #: application/models/Token.php:36 #: application/views/admin/participants/displayParticipants_view.php:95 msgid "Token ID" msgstr "" #: application/controllers/admin/responses.php:111 -#: application/controllers/admin/responses.php:446 -#: application/helpers/common_helper.php:5006 -#: application/helpers/replacements_helper.php:551 +#: application/controllers/admin/responses.php:450 +#: application/helpers/common_helper.php:4987 +#: application/helpers/replacements_helper.php:580 #: application/models/Token.php:38 #: application/views/admin/export/exportresults_view.php:132 #: application/views/admin/participants/displayParticipants_view.php:72 -#: application/views/admin/participants/displayParticipants_view.php:177 -#: application/views/admin/participants/displayParticipants_view.php:196 +#: application/views/admin/participants/displayParticipants_view.php:173 +#: application/views/admin/participants/displayParticipants_view.php:192 #: application/views/admin/participants/sharePanel_view.php:7 -#: application/views/admin/token/browse.php:117 +#: application/views/admin/token/browse.php:111 #: application/views/admin/token/dummytokenform.php:13 #: application/views/admin/token/tokenform.php:30 msgid "First name" msgstr "" #: application/controllers/admin/responses.php:112 -#: application/controllers/admin/responses.php:447 -#: application/helpers/common_helper.php:5011 -#: application/helpers/replacements_helper.php:558 +#: application/controllers/admin/responses.php:451 +#: application/helpers/common_helper.php:4992 +#: application/helpers/replacements_helper.php:587 #: application/models/Token.php:39 #: application/views/admin/export/exportresults_view.php:133 #: application/views/admin/participants/displayParticipants_view.php:73 -#: application/views/admin/participants/displayParticipants_view.php:177 -#: application/views/admin/participants/displayParticipants_view.php:197 +#: application/views/admin/participants/displayParticipants_view.php:173 +#: application/views/admin/participants/displayParticipants_view.php:193 #: application/views/admin/participants/sharePanel_view.php:8 -#: application/views/admin/token/browse.php:117 +#: application/views/admin/token/browse.php:111 #: application/views/admin/token/dummytokenform.php:15 #: application/views/admin/token/tokenform.php:35 msgid "Last name" msgstr "" #: application/controllers/admin/responses.php:113 -#: application/controllers/admin/responses.php:448 +#: application/controllers/admin/responses.php:452 #: application/controllers/admin/useraction.php:143 #: application/views/admin/authentication/forgotpassword.php:9 #: application/views/admin/participants/displayParticipants_view.php:71 -#: application/views/admin/participants/displayParticipants_view.php:177 -#: application/views/admin/participants/displayParticipants_view.php:198 +#: application/views/admin/participants/displayParticipants_view.php:173 +#: application/views/admin/participants/displayParticipants_view.php:194 #: application/views/admin/participants/sharePanel_view.php:9 #: application/views/admin/token/dummytokenform.php:17 #: application/views/admin/token/tokenform.php:40 @@ -2352,16 +2375,16 @@ msgid "Submission date" msgstr "" #: application/controllers/admin/responses.php:142 -#: application/controllers/admin/responses.php:480 +#: application/controllers/admin/responses.php:484 msgid "File %s" msgstr "" #: application/controllers/admin/responses.php:144 -#: application/controllers/admin/responses.php:482 +#: application/controllers/admin/responses.php:486 #: application/controllers/UploaderController.php:298 -#: application/helpers/qanda_helper.php:2811 +#: application/helpers/qanda_helper.php:2810 #: application/views/admin/assessments_view.php:13 -#: application/views/admin/labels/labelview_view.php:41 +#: application/views/admin/labels/labelview_view.php:36 #: application/views/admin/survey/QuestionGroups/editGroup_view.php:16 #: application/views/admin/survey/QuestionGroups/questiongroupbar_view.php:139 #: application/views/admin/survey/subview/tabGeneralNewSurvey_view.php:18 @@ -2370,29 +2393,29 @@ msgid "Title" msgstr "" #: application/controllers/admin/responses.php:147 -#: application/controllers/admin/responses.php:484 +#: application/controllers/admin/responses.php:488 #: application/controllers/UploaderController.php:299 -#: application/helpers/common_helper.php:2065 -#: application/helpers/common_helper.php:2278 -#: application/helpers/qanda_helper.php:2812 +#: application/helpers/common_helper.php:2061 +#: application/helpers/common_helper.php:2274 +#: application/helpers/qanda_helper.php:2811 #: application/views/admin/dataentry/content_view.php:139 msgid "Comment" msgstr "" #: application/controllers/admin/responses.php:149 -#: application/controllers/admin/responses.php:486 -#: application/helpers/qanda_helper.php:2813 -#: application/views/admin/emailtemplates/email_language_template_tab.php:38 +#: application/controllers/admin/responses.php:490 +#: application/helpers/qanda_helper.php:2812 +#: application/views/admin/emailtemplates/email_language_template_tab.php:25 msgid "File name" msgstr "" #: application/controllers/admin/responses.php:150 -#: application/controllers/admin/responses.php:487 +#: application/controllers/admin/responses.php:491 msgid "File size" msgstr "" #: application/controllers/admin/responses.php:157 -#: application/controllers/admin/responses.php:494 +#: application/controllers/admin/responses.php:498 msgid "File count" msgstr "" @@ -2410,13 +2433,18 @@ msgid_plural "%s responses were successfully deleted." msgstr[0] "" msgstr[1] "" -#: application/controllers/admin/responses.php:656 -#: application/helpers/common_helper.php:2409 +#: application/controllers/admin/responses.php:425 +#: application/controllers/admin/responses.php:851 +msgid "The requested file does not exist on the server." +msgstr "" + +#: application/controllers/admin/responses.php:660 +#: application/helpers/common_helper.php:2405 msgid "Total time" msgstr "" -#: application/controllers/admin/responses.php:658 -#: application/helpers/admin/export/HtmlWriter.php:89 +#: application/controllers/admin/responses.php:662 +#: application/helpers/admin/export/HtmlWriter.php:78 #: application/views/admin/assessments_view.php:74 msgid "Group" msgstr "" @@ -2443,37 +2471,41 @@ msgstr "" msgid "You do not have the Freetype Library installed. Showing charts requires the Freetype library to function properly." msgstr "" -#: application/controllers/admin/surveyadmin.php:103 +#: application/controllers/admin/surveyadmin.php:78 +msgid "You can't update question code for an active survey." +msgstr "" + +#: application/controllers/admin/surveyadmin.php:101 msgid "Question codes were successfully regenerated." msgstr "" -#: application/controllers/admin/surveyadmin.php:312 +#: application/controllers/admin/surveyadmin.php:313 msgid "Error: Response table does not exist. Survey cannot be deactivated." msgstr "" -#: application/controllers/admin/surveyadmin.php:456 -#: application/controllers/admin/surveyadmin.php:473 +#: application/controllers/admin/surveyadmin.php:458 +#: application/controllers/admin/surveyadmin.php:475 #: application/views/admin/survey/activateSurvey_view.php:5 #: application/views/admin/survey/activateSurvey_view.php:35 msgid "Activate Survey" msgstr "" -#: application/controllers/admin/surveyadmin.php:459 +#: application/controllers/admin/surveyadmin.php:461 msgid "Survey table could not be created." msgstr "" -#: application/controllers/admin/surveyadmin.php:463 +#: application/controllers/admin/surveyadmin.php:465 msgid "Timings table could not be created." msgstr "" -#: application/controllers/admin/surveyadmin.php:466 +#: application/controllers/admin/surveyadmin.php:468 msgid "Database error!!" msgstr "" -#: application/controllers/admin/surveyadmin.php:468 -#: application/controllers/admin/tokens.php:2258 +#: application/controllers/admin/surveyadmin.php:470 +#: application/controllers/admin/tokens.php:2289 #: application/controllers/AdminController.php:86 -#: application/helpers/admin/import_helper.php:2612 +#: application/helpers/admin/import_helper.php:2611 #: application/views/admin/authentication/forgotpassword.php:15 #: application/views/admin/dataentry/active_html_view.php:95 #: application/views/admin/error_view.php:5 @@ -2484,153 +2516,153 @@ msgstr "" msgid "Main Admin Screen" msgstr "" -#: application/controllers/admin/surveyadmin.php:474 +#: application/controllers/admin/surveyadmin.php:476 msgid "Survey has been activated. Results table has been successfully created." msgstr "" -#: application/controllers/admin/surveyadmin.php:479 +#: application/controllers/admin/surveyadmin.php:481 msgid "The required directory for saving the uploaded files couldn't be created. Please check file premissions on the /upload/surveys directory." msgstr "" -#: application/controllers/admin/surveyadmin.php:485 +#: application/controllers/admin/surveyadmin.php:487 msgid "This survey allows public registration. A token table must also be created." msgstr "" -#: application/controllers/admin/surveyadmin.php:486 +#: application/controllers/admin/surveyadmin.php:488 #: application/views/admin/token/tokenwarning.php:23 msgid "Initialise tokens" msgstr "" -#: application/controllers/admin/surveyadmin.php:490 +#: application/controllers/admin/surveyadmin.php:492 msgid "This survey is now active, and responses can be recorded." msgstr "" -#: application/controllers/admin/surveyadmin.php:491 +#: application/controllers/admin/surveyadmin.php:493 msgid "Open-access mode" msgstr "" -#: application/controllers/admin/surveyadmin.php:491 +#: application/controllers/admin/surveyadmin.php:493 msgid "No invitation code is needed to complete the survey." msgstr "" -#: application/controllers/admin/surveyadmin.php:491 +#: application/controllers/admin/surveyadmin.php:493 msgid "You can switch to the closed-access mode by initialising a token table with the button below." msgstr "" -#: application/controllers/admin/surveyadmin.php:492 +#: application/controllers/admin/surveyadmin.php:494 msgid "Switch to closed-access mode" msgstr "" -#: application/controllers/admin/surveyadmin.php:493 +#: application/controllers/admin/surveyadmin.php:495 #: application/views/admin/token/tokenwarning.php:24 msgid "No, thanks." msgstr "" -#: application/controllers/admin/surveyadmin.php:584 +#: application/controllers/admin/surveyadmin.php:585 msgid "(None)" msgstr "" -#: application/controllers/admin/surveyadmin.php:590 +#: application/controllers/admin/surveyadmin.php:591 #: application/views/admin/survey/surveybar_view.php:19 msgid "This survey is active but expired." msgstr "" -#: application/controllers/admin/surveyadmin.php:594 +#: application/controllers/admin/surveyadmin.php:595 #: application/views/admin/survey/surveybar_view.php:21 msgid "This survey is active but has a start date." msgstr "" -#: application/controllers/admin/surveyadmin.php:600 +#: application/controllers/admin/surveyadmin.php:601 msgid "This survey is active - click here to stop this survey." msgstr "" -#: application/controllers/admin/surveyadmin.php:604 +#: application/controllers/admin/surveyadmin.php:605 #: application/views/admin/survey/QuestionGroups/questiongroupbar_view.php:113 #: application/views/admin/survey/surveybar_view.php:23 -#: application/views/admin/survey/surveybar_view.php:252 -#: application/views/admin/survey/surveybar_view.php:313 +#: application/views/admin/survey/surveybar_view.php:257 +#: application/views/admin/survey/surveybar_view.php:318 msgid "This survey is currently active." msgstr "" -#: application/controllers/admin/surveyadmin.php:614 +#: application/controllers/admin/surveyadmin.php:615 msgid "This survey is currently not active - click here to activate this survey." msgstr "" -#: application/controllers/admin/surveyadmin.php:618 +#: application/controllers/admin/surveyadmin.php:619 msgid "This survey is currently not active." msgstr "" -#: application/controllers/admin/surveyadmin.php:646 +#: application/controllers/admin/surveyadmin.php:647 #: application/views/admin/survey/listSurveys_view.php:74 msgid "Closed" msgstr "" -#: application/controllers/admin/surveyadmin.php:650 +#: application/controllers/admin/surveyadmin.php:651 #: application/views/admin/survey/listSurveys_view.php:73 msgid "Open" msgstr "" -#: application/controllers/admin/surveyadmin.php:720 +#: application/controllers/admin/surveyadmin.php:721 msgid "Survey deleted." msgstr "" -#: application/controllers/admin/surveyadmin.php:834 +#: application/controllers/admin/surveyadmin.php:835 msgid "Import survey data" msgstr "" -#: application/controllers/admin/surveyadmin.php:835 +#: application/controllers/admin/surveyadmin.php:836 msgid "Survey structure import summary" msgstr "" -#: application/controllers/admin/surveyadmin.php:850 +#: application/controllers/admin/surveyadmin.php:851 #: application/views/admin/survey/copySurvey_view.php:1 #: application/views/admin/survey/subview/tabCopy_view.php:27 msgid "Copy survey" msgstr "" -#: application/controllers/admin/surveyadmin.php:851 +#: application/controllers/admin/surveyadmin.php:852 msgid "Survey copy summary" msgstr "" -#: application/controllers/admin/surveyadmin.php:867 +#: application/controllers/admin/surveyadmin.php:868 msgid "Import failed. You specified an invalid file type '%s'." msgstr "" -#: application/controllers/admin/surveyadmin.php:900 +#: application/controllers/admin/surveyadmin.php:901 msgid "No survey ID has been provided. Cannot copy survey" msgstr "" -#: application/controllers/admin/surveyadmin.php:910 +#: application/controllers/admin/surveyadmin.php:911 #: application/views/admin/participants/blacklist_view.php:73 #: application/views/admin/participants/userControl_view.php:43 msgid "You don't have sufficient permissions." msgstr "" -#: application/controllers/admin/surveyadmin.php:1053 +#: application/controllers/admin/surveyadmin.php:1052 msgid "The new question group/question order was successfully saved." msgstr "" -#: application/controllers/admin/surveyadmin.php:1332 -#: application/views/admin/labels/labelview_view.php:150 +#: application/controllers/admin/surveyadmin.php:1331 +#: application/views/admin/labels/labelview_view.php:145 #: application/views/admin/templates/importform_view.php:14 #: application/views/admin/templates/templateeditorbar_view.php:77 msgid "zip library not supported by PHP, Import ZIP Disabled" msgstr "" -#: application/controllers/admin/surveyadmin.php:1357 +#: application/controllers/admin/surveyadmin.php:1356 msgid "The survey was successfully expired by setting an expiration date in the survey settings." msgstr "" -#: application/controllers/admin/surveyadmin.php:1383 -#: application/views/admin/survey/editSurvey_view.php:43 +#: application/controllers/admin/surveyadmin.php:1382 +#: application/views/admin/survey/editSurvey_view.php:46 msgid "(No target question)" msgstr "" -#: application/controllers/admin/surveyadmin.php:1466 +#: application/controllers/admin/surveyadmin.php:1465 msgid "Survey could not be created because it did not have a title" msgstr "" -#: application/controllers/admin/surveyadmin.php:1623 +#: application/controllers/admin/surveyadmin.php:1622 msgid "Survey was successfully added." msgstr "" @@ -2641,12 +2673,12 @@ msgid "Survey permissions" msgstr "" #: application/controllers/admin/surveypermission.php:48 -#: application/views/admin/emailtemplates/email_language_template_tab.php:37 -#: application/views/admin/labels/labelview_view.php:42 +#: application/views/admin/emailtemplates/email_language_template_tab.php:24 +#: application/views/admin/labels/labelview_view.php:37 #: application/views/admin/quotas/viewquotas_view.php:19 -#: application/views/admin/survey/Question/subQuestion_view.php:82 +#: application/views/admin/survey/Question/subQuestion_view.php:83 #: application/views/admin/survey/subview/tabPanelIntegration_view.php:8 -#: application/views/admin/token/browse.php:117 +#: application/views/admin/token/browse.php:111 #: application/views/admin/user/editusers.php:5 #: application/views/admin/usergroup/viewUserGroup_view.php:33 #: application/views/plugins/index.php:19 @@ -2654,12 +2686,12 @@ msgid "Action" msgstr "" #: application/controllers/admin/surveypermission.php:49 -#: application/controllers/admin/surveypermission.php:528 +#: application/controllers/admin/surveypermission.php:538 #: application/controllers/admin/useraction.php:122 #: application/controllers/admin/useraction.php:143 #: application/controllers/admin/useraction.php:380 #: application/controllers/admin/useraction.php:398 -#: application/core/plugins/Authdb/Authdb.php:75 +#: application/core/plugins/Authdb/Authdb.php:74 #: application/core/plugins/AuthLDAP/AuthLDAP.php:107 #: application/views/admin/user/editusers.php:8 #: application/views/admin/user/modifyuser.php:5 @@ -2696,7 +2728,7 @@ msgid "Delete" msgstr "" #: application/controllers/admin/surveypermission.php:115 -#: application/controllers/admin/tokens.php:456 +#: application/controllers/admin/tokens.php:466 #: application/views/admin/assessments_view.php:32 #: application/views/admin/responses/browseidheader_view.php:21 #: application/views/admin/saved/savedlist_view.php:29 @@ -2751,38 +2783,38 @@ msgstr "" #: application/controllers/admin/surveypermission.php:275 #: application/controllers/admin/surveypermission.php:339 #: application/controllers/admin/surveypermission.php:346 -#: application/controllers/admin/surveypermission.php:535 -#: application/controllers/admin/surveypermission.php:638 -#: application/controllers/admin/tokens.php:2398 -#: application/controllers/admin/tokens.php:2442 +#: application/controllers/admin/surveypermission.php:545 +#: application/controllers/admin/surveypermission.php:648 +#: application/controllers/admin/tokens.php:2428 +#: application/controllers/admin/tokens.php:2472 #: application/controllers/admin/useraction.php:741 -#: application/helpers/common_helper.php:6019 -#: application/helpers/common_helper.php:6024 -#: application/helpers/common_helper.php:6029 -#: application/helpers/common_helper.php:6034 -#: application/helpers/common_helper.php:6039 -#: application/helpers/common_helper.php:6044 -#: application/helpers/common_helper.php:6049 -#: application/helpers/common_helper.php:6054 -#: application/helpers/common_helper.php:6059 -#: application/helpers/common_helper.php:6065 +#: application/helpers/common_helper.php:6051 +#: application/helpers/common_helper.php:6056 +#: application/helpers/common_helper.php:6061 +#: application/helpers/common_helper.php:6066 #: application/helpers/common_helper.php:6071 #: application/helpers/common_helper.php:6076 #: application/helpers/common_helper.php:6081 #: application/helpers/common_helper.php:6086 #: application/helpers/common_helper.php:6091 -#: application/helpers/common_helper.php:6096 -#: application/helpers/common_helper.php:6102 -#: application/helpers/common_helper.php:6107 -#: application/helpers/common_helper.php:6116 -#: application/helpers/common_helper.php:6121 +#: application/helpers/common_helper.php:6097 +#: application/helpers/common_helper.php:6103 +#: application/helpers/common_helper.php:6108 +#: application/helpers/common_helper.php:6113 +#: application/helpers/common_helper.php:6118 +#: application/helpers/common_helper.php:6123 #: application/helpers/common_helper.php:6128 -#: application/helpers/common_helper.php:6132 -#: application/helpers/common_helper.php:6136 -#: application/helpers/frontend_helper.php:906 -#: application/helpers/frontend_helper.php:986 -#: application/helpers/frontend_helper.php:1150 -#: application/helpers/replacements_helper.php:587 +#: application/helpers/common_helper.php:6134 +#: application/helpers/common_helper.php:6139 +#: application/helpers/common_helper.php:6148 +#: application/helpers/common_helper.php:6153 +#: application/helpers/common_helper.php:6160 +#: application/helpers/common_helper.php:6164 +#: application/helpers/common_helper.php:6168 +#: application/helpers/frontend_helper.php:918 +#: application/helpers/frontend_helper.php:998 +#: application/helpers/frontend_helper.php:1162 +#: application/helpers/replacements_helper.php:616 #: application/views/admin/authentication/message.php:3 #: application/views/admin/participants/attributeMapCSV_view.php:55 #: application/views/admin/participants/attributeMapToken_view.php:92 @@ -2797,7 +2829,7 @@ msgstr "" #: application/controllers/admin/surveypermission.php:273 #: application/controllers/admin/surveypermission.php:337 #: application/controllers/admin/surveypermission.php:344 -#: application/controllers/admin/usergroups.php:366 +#: application/controllers/admin/usergroups.php:373 msgid "Failed to add user." msgstr "" @@ -2807,7 +2839,7 @@ msgid "No Username selected." msgstr "" #: application/controllers/admin/surveypermission.php:326 -#: application/controllers/admin/usergroups.php:362 +#: application/controllers/admin/usergroups.php:369 msgid "User added." msgstr "" @@ -2858,47 +2890,47 @@ msgstr "" #: application/controllers/admin/surveypermission.php:430 #: application/views/admin/export/vv_view.php:10 #: application/views/admin/participants/participantsPanel_view.php:7 -#: application/views/admin/token/browse.php:69 +#: application/views/admin/token/browse.php:63 #: application/views/admin/user/setuserpermissions.php:14 msgid "Export" msgstr "" -#: application/controllers/admin/surveypermission.php:466 -#: application/helpers/replacements_helper.php:505 +#: application/controllers/admin/surveypermission.php:475 +#: application/helpers/replacements_helper.php:534 msgid "Save Now" msgstr "" -#: application/controllers/admin/surveypermission.php:520 +#: application/controllers/admin/surveypermission.php:530 msgid "Deleting User" msgstr "" -#: application/controllers/admin/surveypermission.php:529 +#: application/controllers/admin/surveypermission.php:539 #: application/controllers/admin/useraction.php:300 #: application/controllers/admin/useraction.php:381 #: application/controllers/admin/useraction.php:399 #: application/controllers/admin/usergroups.php:139 -#: application/controllers/InstallerController.php:665 +#: application/controllers/InstallerController.php:684 msgid "Success!" msgstr "" -#: application/controllers/admin/surveypermission.php:533 +#: application/controllers/admin/surveypermission.php:543 #: application/controllers/admin/useraction.php:247 msgid "Could not delete user. User was not supplied." msgstr "" -#: application/controllers/admin/surveypermission.php:577 +#: application/controllers/admin/surveypermission.php:587 msgid "Edit survey permissions" msgstr "" -#: application/controllers/admin/surveypermission.php:623 +#: application/controllers/admin/surveypermission.php:633 msgid "Survey permissions for all users in this group were successfully updated." msgstr "" -#: application/controllers/admin/surveypermission.php:630 +#: application/controllers/admin/surveypermission.php:640 msgid "Survey permissions were successfully updated." msgstr "" -#: application/controllers/admin/surveypermission.php:634 +#: application/controllers/admin/surveypermission.php:644 msgid "Failed to update survey permissions!" msgstr "" @@ -3118,15 +3150,15 @@ msgid "This is the survey end message." msgstr "" #: application/controllers/admin/tokens.php:78 -#: application/controllers/admin/tokens.php:351 -#: application/controllers/admin/tokens.php:1127 +#: application/controllers/admin/tokens.php:357 +#: application/controllers/admin/tokens.php:1136 msgid "No token table." msgstr "" #: application/controllers/admin/tokens.php:85 -#: application/controllers/admin/tokens.php:357 -#: application/controllers/admin/tokens.php:510 -#: application/controllers/admin/tokens.php:609 +#: application/controllers/admin/tokens.php:363 +#: application/controllers/admin/tokens.php:520 +#: application/controllers/admin/tokens.php:619 #: application/controllers/survey/index.php:125 #: application/controllers/survey/index.php:144 msgid "We are sorry but you don't have permissions to do this." @@ -3152,270 +3184,274 @@ msgstr "" msgid "Bounce processing is deactivated either application-wide or for this survey in particular." msgstr "" -#: application/controllers/admin/tokens.php:444 +#: application/controllers/admin/tokens.php:454 #: application/views/admin/responses/browseallrow_view.php:4 #: application/views/admin/responses/browsetimerow_view.php:4 msgid "View response details" msgstr "" -#: application/controllers/admin/tokens.php:451 +#: application/controllers/admin/tokens.php:461 msgid "Do survey" msgstr "" -#: application/controllers/admin/tokens.php:457 +#: application/controllers/admin/tokens.php:467 msgid "Delete token entry" msgstr "" -#: application/controllers/admin/tokens.php:462 +#: application/controllers/admin/tokens.php:472 msgid "Send invitation email to this person (if they have not yet been sent an invitation email)" msgstr "" -#: application/controllers/admin/tokens.php:464 +#: application/controllers/admin/tokens.php:474 msgid "Send reminder email to this person (if they have already received the invitation email)" msgstr "" -#: application/controllers/admin/tokens.php:473 +#: application/controllers/admin/tokens.php:483 #: application/views/admin/token/tokenform.php:5 msgid "Edit token entry" msgstr "" -#: application/controllers/admin/tokens.php:475 +#: application/controllers/admin/tokens.php:485 msgid "View this person in the central participants database" msgstr "" -#: application/controllers/admin/tokens.php:564 -#: application/controllers/admin/tokens.php:595 -#: application/controllers/admin/tokens.php:707 -#: application/controllers/admin/tokens.php:810 -#: application/controllers/admin/tokens.php:939 +#: application/controllers/admin/tokens.php:574 +#: application/controllers/admin/tokens.php:605 +#: application/controllers/admin/tokens.php:717 +#: application/controllers/admin/tokens.php:820 +#: application/controllers/admin/tokens.php:948 #: application/controllers/RegisterController.php:102 msgid "%s cannot be left empty" msgstr "" -#: application/controllers/admin/tokens.php:821 +#: application/controllers/admin/tokens.php:831 msgid "The token entry was successfully updated." msgstr "" -#: application/controllers/admin/tokens.php:822 -#: application/controllers/admin/tokens.php:992 -#: application/controllers/admin/tokens.php:1003 +#: application/controllers/admin/tokens.php:832 +#: application/controllers/admin/tokens.php:1001 +#: application/controllers/admin/tokens.php:1012 #: application/views/admin/token/addtokenpost.php:7 #: application/views/admin/token/addtokenpost.php:14 #: application/views/admin/token/tokenbar.php:15 msgid "Display tokens" msgstr "" -#: application/controllers/admin/tokens.php:828 -#: application/controllers/admin/tokens.php:999 +#: application/controllers/admin/tokens.php:838 +#: application/controllers/admin/tokens.php:1008 #: application/views/admin/token/addtokenpost.php:12 #: application/views/admin/token/ldappost.php:5 #: application/views/admin/update/step3.php:23 msgid "Failed" msgstr "" -#: application/controllers/admin/tokens.php:829 +#: application/controllers/admin/tokens.php:839 #: application/views/admin/token/addtokenpost.php:13 msgid "There is already an entry with that exact token in the table. The same token cannot be used in multiple entries." msgstr "" -#: application/controllers/admin/tokens.php:830 +#: application/controllers/admin/tokens.php:840 msgid "Show this token entry" msgstr "" -#: application/controllers/admin/tokens.php:991 +#: application/controllers/admin/tokens.php:1000 msgid "New dummy tokens were added." msgstr "" -#: application/controllers/admin/tokens.php:1000 +#: application/controllers/admin/tokens.php:1009 msgid "Only %s new dummy tokens were added after %s trials." msgstr "" -#: application/controllers/admin/tokens.php:1001 +#: application/controllers/admin/tokens.php:1010 msgid "Try with a bigger token length." msgstr "" -#: application/controllers/admin/tokens.php:1054 +#: application/controllers/admin/tokens.php:1063 msgid "Attribute %s (%s)" msgstr "" -#: application/controllers/admin/tokens.php:1066 +#: application/controllers/admin/tokens.php:1075 msgid "(none)" msgstr "" -#: application/controllers/admin/tokens.php:1111 +#: application/controllers/admin/tokens.php:1120 msgid "%s field(s) were successfully added." msgstr "" -#: application/controllers/admin/tokens.php:1152 +#: application/controllers/admin/tokens.php:1161 msgid "Delete token attribute %s" msgstr "" -#: application/controllers/admin/tokens.php:1153 +#: application/controllers/admin/tokens.php:1162 msgid "If you remove this attribute, you will lose all information." msgstr "" -#: application/controllers/admin/tokens.php:1157 +#: application/controllers/admin/tokens.php:1166 #: application/views/admin/participants/attributeControl_view.php:9 #: application/views/admin/token/managetokenattributes.php:116 msgid "Delete attribute" msgstr "" -#: application/controllers/admin/tokens.php:1168 +#: application/controllers/admin/tokens.php:1182 msgid "Attribute %s was deleted." msgstr "" -#: application/controllers/admin/tokens.php:1173 +#: application/controllers/admin/tokens.php:1187 msgid "The selected attribute was invalid." msgstr "" -#: application/controllers/admin/tokens.php:1224 +#: application/controllers/admin/tokens.php:1238 msgid "Token attribute descriptions were successfully updated." msgstr "" -#: application/controllers/admin/tokens.php:1225 +#: application/controllers/admin/tokens.php:1239 msgid "Back to attribute field management." msgstr "" -#: application/controllers/admin/tokens.php:1426 +#: application/controllers/admin/tokens.php:1440 msgid "Email to {FIRSTNAME} {LASTNAME} ({EMAIL}) delayed: Token is not yet valid." msgstr "" -#: application/controllers/admin/tokens.php:1430 +#: application/controllers/admin/tokens.php:1444 msgid "Email to {FIRSTNAME} {LASTNAME} ({EMAIL}) skipped: Token is not valid anymore." msgstr "" -#: application/controllers/admin/tokens.php:1507 +#: application/controllers/admin/tokens.php:1521 msgid "Invitation sent to:" msgstr "" -#: application/controllers/admin/tokens.php:1512 +#: application/controllers/admin/tokens.php:1526 msgid "Reminder sent to:" msgstr "" -#: application/controllers/admin/tokens.php:1534 +#: application/controllers/admin/tokens.php:1548 msgid "Email to {FIRSTNAME} {LASTNAME} ({EMAIL}) failed. Error Message:" msgstr "" -#: application/controllers/admin/tokens.php:1570 +#: application/controllers/admin/tokens.php:1575 +msgid "All emails were sent." +msgstr "" + +#: application/controllers/admin/tokens.php:1584 msgid "There were no eligible emails to send. This will be because none satisfied the criteria of:" msgstr "" -#: application/controllers/admin/tokens.php:1571 +#: application/controllers/admin/tokens.php:1585 msgid "having a valid email address" msgstr "" -#: application/controllers/admin/tokens.php:1572 +#: application/controllers/admin/tokens.php:1586 msgid "not having been sent an invitation already" msgstr "" -#: application/controllers/admin/tokens.php:1573 -msgid "having already completed the survey" +#: application/controllers/admin/tokens.php:1587 +msgid "not having already completed the survey" msgstr "" -#: application/controllers/admin/tokens.php:1574 +#: application/controllers/admin/tokens.php:1588 msgid "having a token" msgstr "" -#: application/controllers/admin/tokens.php:1661 +#: application/controllers/admin/tokens.php:1675 msgid "Uploading LDAP Query" msgstr "" -#: application/controllers/admin/tokens.php:1874 +#: application/controllers/admin/tokens.php:1888 msgid "Can't bind to the LDAP directory" msgstr "" -#: application/controllers/admin/tokens.php:1881 +#: application/controllers/admin/tokens.php:1895 msgid "Can't connect to the LDAP directory" msgstr "" -#: application/controllers/admin/tokens.php:2173 -#: application/controllers/admin/tokens.php:2200 +#: application/controllers/admin/tokens.php:2204 +#: application/controllers/admin/tokens.php:2231 msgid "Create tokens" msgstr "" -#: application/controllers/admin/tokens.php:2174 +#: application/controllers/admin/tokens.php:2205 msgid "Clicking 'Yes' will generate tokens for all those in this token list that have not been issued one. Continue?" msgstr "" -#: application/controllers/admin/tokens.php:2191 +#: application/controllers/admin/tokens.php:2222 msgid "Only %s token has been created." msgid_plural "Only %s tokens have been created." msgstr[0] "" msgstr[1] "" -#: application/controllers/admin/tokens.php:2192 +#: application/controllers/admin/tokens.php:2223 msgid "Need %s token." msgid_plural "Need %s tokens." msgstr[0] "" msgstr[1] "" -#: application/controllers/admin/tokens.php:2197 +#: application/controllers/admin/tokens.php:2228 msgid "%s token has been created." msgid_plural "%s tokens have been created." msgstr[0] "" msgstr[1] "" -#: application/controllers/admin/tokens.php:2236 -#: application/controllers/admin/tokens.php:2254 +#: application/controllers/admin/tokens.php:2267 +#: application/controllers/admin/tokens.php:2285 msgid "Delete Tokens Table" msgstr "" -#: application/controllers/admin/tokens.php:2237 +#: application/controllers/admin/tokens.php:2268 msgid "If you delete this table tokens will no longer be required to access this survey." msgstr "" -#: application/controllers/admin/tokens.php:2237 +#: application/controllers/admin/tokens.php:2268 msgid "A backup of this table will be made if you proceed. Your system administrator will be able to access this table." msgstr "" -#: application/controllers/admin/tokens.php:2240 +#: application/controllers/admin/tokens.php:2271 msgid "Delete Tokens" msgstr "" -#: application/controllers/admin/tokens.php:2255 +#: application/controllers/admin/tokens.php:2286 msgid "The tokens table has now been removed and tokens are no longer required to access this survey." msgstr "" -#: application/controllers/admin/tokens.php:2255 +#: application/controllers/admin/tokens.php:2286 msgid "A backup of this table has been made and can be accessed by your system administrator." msgstr "" -#: application/controllers/admin/tokens.php:2305 +#: application/controllers/admin/tokens.php:2336 #: application/views/admin/globalSettings_view.php:14 -#: application/views/admin/token/bounce.php:1 +#: application/views/admin/token/bounce.php:4 #: application/views/admin/token/tokenbar.php:65 msgid "Bounce settings" msgstr "" -#: application/controllers/admin/tokens.php:2306 +#: application/controllers/admin/tokens.php:2337 msgid "Bounce settings have been saved." msgstr "" -#: application/controllers/admin/tokens.php:2379 +#: application/controllers/admin/tokens.php:2409 #: application/views/admin/token/tokenwarning.php:6 msgid "Tokens have not been initialised for this survey." msgstr "" -#: application/controllers/admin/tokens.php:2385 +#: application/controllers/admin/tokens.php:2415 msgid "Tokens already exist for this survey." msgstr "" -#: application/controllers/admin/tokens.php:2395 +#: application/controllers/admin/tokens.php:2425 #: application/views/admin/export/exportresults_view.php:128 #: application/views/admin/token/tokenbar.php:5 #: application/views/admin/token/tokenwarning.php:3 msgid "Token control" msgstr "" -#: application/controllers/admin/tokens.php:2396 +#: application/controllers/admin/tokens.php:2426 msgid "A token table has been created for this survey." msgstr "" -#: application/controllers/admin/tokens.php:2439 +#: application/controllers/admin/tokens.php:2469 msgid "Import old tokens" msgstr "" -#: application/controllers/admin/tokens.php:2440 +#: application/controllers/admin/tokens.php:2470 msgid "A token table has been created for this survey and the old tokens were imported." msgstr "" @@ -3458,22 +3494,23 @@ msgstr "" #: application/controllers/admin/translate.php:395 #: application/extensions/Menu/MenuWidget.php:493 -#: application/helpers/common_helper.php:245 -#: application/helpers/common_helper.php:361 -#: application/helpers/common_helper.php:969 -#: application/helpers/common_helper.php:1039 -#: application/helpers/common_helper.php:6769 -#: application/helpers/common_helper.php:6806 -#: application/helpers/common_helper.php:7194 -#: application/helpers/common_helper.php:7234 -#: application/helpers/qanda_helper.php:1567 -#: application/helpers/qanda_helper.php:2156 -#: application/helpers/qanda_helper.php:4847 -#: application/helpers/qanda_helper.php:6298 -#: application/helpers/qanda_helper.php:6346 +#: application/helpers/common_helper.php:225 +#: application/helpers/common_helper.php:341 +#: application/helpers/common_helper.php:949 +#: application/helpers/common_helper.php:1019 +#: application/helpers/common_helper.php:6801 +#: application/helpers/common_helper.php:6838 +#: application/helpers/common_helper.php:7226 +#: application/helpers/common_helper.php:7266 +#: application/helpers/qanda_helper.php:1560 +#: application/helpers/qanda_helper.php:2035 +#: application/helpers/qanda_helper.php:2151 +#: application/helpers/qanda_helper.php:4825 +#: application/helpers/qanda_helper.php:6270 +#: application/helpers/qanda_helper.php:6306 #: application/views/admin/dataentry/content_view.php:84 #: application/views/admin/dataentry/content_view.php:94 -#: application/views/admin/labels/labelsetsbar_view.php:22 +#: application/views/admin/labels/labelsetsbar_view.php:24 msgid "Please choose..." msgstr "" @@ -3482,7 +3519,7 @@ msgid "Survey title and description" msgstr "" #: application/controllers/admin/translate.php:463 -#: application/helpers/expressions/em_manager_helper.php:8964 +#: application/helpers/expressions/em_manager_helper.php:8950 #: application/views/admin/survey/editLocalSettings_view.php:5 #: application/views/admin/survey/editLocalSettings_view.php:9 #: application/views/admin/survey/QuestionGroups/addGroup_view.php:29 @@ -3503,7 +3540,7 @@ msgid "Welcome and end text" msgstr "" #: application/controllers/admin/translate.php:493 -#: application/helpers/expressions/em_manager_helper.php:8978 +#: application/helpers/expressions/em_manager_helper.php:8964 #: application/views/admin/survey/editLocalSettings_view.php:17 #: application/views/admin/survey/editLocalSettings_view.php:21 #: application/views/admin/survey/subview/tabGeneralNewSurvey_view.php:33 @@ -3577,24 +3614,24 @@ msgstr "" msgid "Question code / ID" msgstr "" -#: application/controllers/admin/update.php:280 +#: application/controllers/admin/update.php:285 msgid "Error on file backup: %s" msgstr "" -#: application/controllers/admin/update.php:283 +#: application/controllers/admin/update.php:288 msgid "File backup created: %s" msgstr "" -#: application/controllers/admin/update.php:305 -#: application/controllers/admin/update.php:314 +#: application/controllers/admin/update.php:310 +#: application/controllers/admin/update.php:319 msgid "Unable to backup your database for unknow reason. Before proceeding please backup your database using a backup tool!" msgstr "" -#: application/controllers/admin/update.php:309 +#: application/controllers/admin/update.php:314 msgid "DB backup created: %s" msgstr "" -#: application/controllers/admin/update.php:320 +#: application/controllers/admin/update.php:325 msgid "Database backup functionality is currently not available for your database type. Before proceeding please backup your database using a backup tool!" msgstr "" @@ -3649,6 +3686,10 @@ msgstr "" msgid "An email with a generated password was sent to the user." msgstr "" +#: application/controllers/admin/useraction.php:151 +msgid "Email to {NAME} ({EMAIL}) failed." +msgstr "" + #: application/controllers/admin/useraction.php:158 msgid "Set user permissions" msgstr "" @@ -3770,37 +3811,37 @@ msgstr "" msgid "Failed to edit user group!" msgstr "" -#: application/controllers/admin/usergroups.php:344 -#: application/controllers/admin/usergroups.php:352 -#: application/controllers/admin/usergroups.php:385 +#: application/controllers/admin/usergroups.php:351 +#: application/controllers/admin/usergroups.php:359 +#: application/controllers/admin/usergroups.php:393 msgid "Failed." msgstr "" -#: application/controllers/admin/usergroups.php:344 -msgid "Group not found." +#: application/controllers/admin/usergroups.php:351 +msgid "You are " msgstr "" -#: application/controllers/admin/usergroups.php:352 +#: application/controllers/admin/usergroups.php:359 msgid "You can not add or remove the group owner from the group." msgstr "" -#: application/controllers/admin/usergroups.php:366 +#: application/controllers/admin/usergroups.php:373 msgid "User already exists in the group." msgstr "" -#: application/controllers/admin/usergroups.php:373 +#: application/controllers/admin/usergroups.php:380 msgid "User removed." msgstr "" -#: application/controllers/admin/usergroups.php:377 +#: application/controllers/admin/usergroups.php:384 msgid "Failed to remove user." msgstr "" -#: application/controllers/admin/usergroups.php:377 +#: application/controllers/admin/usergroups.php:384 msgid "User does not exist in the group." msgstr "" -#: application/controllers/admin/usergroups.php:385 +#: application/controllers/admin/usergroups.php:393 msgid "User not found." msgstr "" @@ -3809,7 +3850,7 @@ msgstr "" #: application/extensions/Menu/MenuWidget.php:142 #: application/views/admin/conditions/conditionshead_view.php:25 #: application/views/admin/index.php:4 -#: application/views/admin/super/adminmenu.php:122 +#: application/views/admin/super/adminmenu.php:118 #: plugins/Demo/Example/Example.php:53 msgid "LimeSurvey online manual" msgstr "" @@ -3824,152 +3865,152 @@ msgstr "" msgid "Warning: You are still using the default password ('password'). Please change your password and re-login again." msgstr "" -#: application/controllers/InstallerController.php:140 +#: application/controllers/InstallerController.php:141 #: application/views/installer/sidebar_view.php:19 msgid "Welcome" msgstr "" -#: application/controllers/InstallerController.php:141 +#: application/controllers/InstallerController.php:142 msgid "Welcome to the LimeSurvey installation wizard. This wizard will guide you through the installation, database setup and initial configuration of LimeSurvey." msgstr "" -#: application/controllers/InstallerController.php:167 +#: application/controllers/InstallerController.php:168 #: application/views/installer/sidebar_view.php:22 msgid "License" msgstr "" -#: application/controllers/InstallerController.php:168 +#: application/controllers/InstallerController.php:169 msgid "GNU General Public License:" msgstr "" -#: application/controllers/InstallerController.php:200 +#: application/controllers/InstallerController.php:201 #: application/views/installer/sidebar_view.php:25 msgid "Pre-installation check" msgstr "" -#: application/controllers/InstallerController.php:201 +#: application/controllers/InstallerController.php:202 msgid "Pre-installation check for LimeSurvey " msgstr "" -#: application/controllers/InstallerController.php:235 -#: application/controllers/InstallerController.php:425 -#: application/controllers/InstallerController.php:533 -#: application/controllers/InstallerController.php:622 +#: application/controllers/InstallerController.php:236 +#: application/controllers/InstallerController.php:433 +#: application/controllers/InstallerController.php:541 +#: application/controllers/InstallerController.php:633 #: application/views/installer/dbconfig_view.php:14 msgid "Database configuration" msgstr "" -#: application/controllers/InstallerController.php:236 -#: application/controllers/InstallerController.php:426 -#: application/controllers/InstallerController.php:534 -#: application/controllers/InstallerController.php:623 +#: application/controllers/InstallerController.php:237 +#: application/controllers/InstallerController.php:434 +#: application/controllers/InstallerController.php:542 +#: application/controllers/InstallerController.php:634 msgid "Please enter the database settings you want to use for LimeSurvey:" msgstr "" -#: application/controllers/InstallerController.php:275 +#: application/controllers/InstallerController.php:283 msgid "Connection with database failed. Please check database location, user name and password and try again." msgstr "" -#: application/controllers/InstallerController.php:313 +#: application/controllers/InstallerController.php:321 msgid "The database you specified does already exist." msgstr "" -#: application/controllers/InstallerController.php:321 +#: application/controllers/InstallerController.php:329 msgid "The database does exists and contains LimeSurvey tables. You'll be redirected to the database update or (if your database is already up to date) to the administration login in 5 seconds. If not, please click here." msgstr "" -#: application/controllers/InstallerController.php:346 -#: application/controllers/InstallerController.php:347 -#: application/controllers/InstallerController.php:512 -#: application/controllers/InstallerController.php:513 +#: application/controllers/InstallerController.php:354 +#: application/controllers/InstallerController.php:355 +#: application/controllers/InstallerController.php:520 +#: application/controllers/InstallerController.php:521 #: application/views/installer/sidebar_view.php:31 msgid "Database settings" msgstr "" -#: application/controllers/InstallerController.php:362 +#: application/controllers/InstallerController.php:370 msgid "Database doesn't exist!" msgstr "" -#: application/controllers/InstallerController.php:363 +#: application/controllers/InstallerController.php:371 msgid "The database you specified does not exist:" msgstr "" -#: application/controllers/InstallerController.php:364 +#: application/controllers/InstallerController.php:372 msgid "LimeSurvey can attempt to create this database for you." msgstr "" -#: application/controllers/InstallerController.php:368 +#: application/controllers/InstallerController.php:376 msgid "Create database" msgstr "" -#: application/controllers/InstallerController.php:378 +#: application/controllers/InstallerController.php:386 msgid "A database named \"%s\" already exists." msgstr "" -#: application/controllers/InstallerController.php:379 +#: application/controllers/InstallerController.php:387 msgid "Do you want to populate that database now by creating the necessary tables?" msgstr "" -#: application/controllers/InstallerController.php:383 -#: application/controllers/InstallerController.php:502 +#: application/controllers/InstallerController.php:391 +#: application/controllers/InstallerController.php:510 msgid "Populate database" msgstr "" -#: application/controllers/InstallerController.php:394 +#: application/controllers/InstallerController.php:402 msgid "LimeSurvey database is up to date. No action needed" msgstr "" -#: application/controllers/InstallerController.php:396 +#: application/controllers/InstallerController.php:404 msgid "Please log in." msgstr "" -#: application/controllers/InstallerController.php:498 +#: application/controllers/InstallerController.php:506 msgid "Database has been created." msgstr "" -#: application/controllers/InstallerController.php:499 +#: application/controllers/InstallerController.php:507 msgid "Please continue with populating the database." msgstr "" -#: application/controllers/InstallerController.php:508 +#: application/controllers/InstallerController.php:516 msgid "Try again! Connection with database failed." msgstr "" -#: application/controllers/InstallerController.php:566 -#: application/controllers/InstallerController.php:1241 +#: application/controllers/InstallerController.php:574 +#: application/controllers/InstallerController.php:1259 msgid "Try again! Connection with database failed. Reason: " msgstr "" -#: application/controllers/InstallerController.php:574 +#: application/controllers/InstallerController.php:582 msgid "Database %s has been successfully populated." msgstr "" -#: application/controllers/InstallerController.php:578 -msgid "Database was populated but there were errors:" +#: application/controllers/InstallerController.php:586 +msgid "There were errors when trying to populate the database:" msgstr "" -#: application/controllers/InstallerController.php:601 +#: application/controllers/InstallerController.php:612 #: application/views/installer/sidebar_view.php:34 msgid "Optional settings" msgstr "" -#: application/controllers/InstallerController.php:602 +#: application/controllers/InstallerController.php:613 msgid "Optional settings to give you a head start" msgstr "" -#: application/controllers/InstallerController.php:666 +#: application/controllers/InstallerController.php:685 msgid "LimeSurvey has been installed successfully." msgstr "" -#: application/controllers/InstallerController.php:677 +#: application/controllers/InstallerController.php:696 msgid "Passwords don't match." msgstr "" -#: application/controllers/InstallerController.php:1101 +#: application/controllers/InstallerController.php:1119 msgid "Configuration directory is not writable" msgstr "" -#: application/controllers/InstallerController.php:1102 +#: application/controllers/InstallerController.php:1120 msgid "You will be redirected in about 5 secs. If not, click here." msgstr "" @@ -4008,7 +4049,7 @@ msgstr "" msgid "You have already been removed from the central participants list for this site" msgstr "" -#: application/controllers/OptoutController.php:174 +#: application/controllers/OptoutController.php:175 msgid "You have been removed from the central participants list for this site" msgstr "" @@ -4016,11 +4057,11 @@ msgstr "" msgid "Failed to activate the plugin." msgstr "" -#: application/controllers/PluginsController.php:123 +#: application/controllers/PluginsController.php:127 msgid "Failed to deactivate the plugin." msgstr "" -#: application/controllers/PluginsController.php:200 +#: application/controllers/PluginsController.php:204 msgid "Plugin '%s' was missing and is removed from the database." msgstr "" @@ -4034,25 +4075,31 @@ msgstr "" msgid "Either you have been inactive for too long, you have cookies disabled for your browser, or there were problems with your connection." msgstr "" -#: application/controllers/PrintanswersController.php:104 +#: application/controllers/PrintanswersController.php:109 msgid "PDF export" msgstr "" -#: application/controllers/PrintanswersController.php:112 -#: application/controllers/PrintanswersController.php:120 -#: application/helpers/admin/export/HtmlWriter.php:67 -#: application/views/admin/templates/templateeditor_printoutput_view.php:1 -msgid "Survey name (ID)" +#: application/controllers/PrintanswersController.php:110 +msgid "Survey name (ID):" msgstr "" -#: application/controllers/PrintanswersController.php:122 -msgid "Survey name (ID):" +#: application/controllers/PrintanswersController.php:175 +#: application/helpers/admin/statistics_helper.php:1831 +#: application/helpers/admin/statistics_helper.php:1844 +#: application/helpers/admin/statistics_helper.php:1892 +#: application/views/admin/assessments_view.php:9 +#: application/views/admin/saved/savedlist_view.php:5 +#: application/views/admin/survey/Question/questionbar_view.php:5 +#: application/views/admin/survey/QuestionGroups/questiongroupbar_view.php:2 +#: application/views/admin/survey/surveybar_view.php:4 +#: application/views/admin/survey/surveySummary_view.php:7 +msgid "ID" msgstr "" #: application/controllers/RegisterController.php:83 #: application/controllers/survey/index.php:312 -#: application/helpers/frontend_helper.php:874 -#: application/helpers/frontend_helper.php:1098 +#: application/helpers/frontend_helper.php:886 +#: application/helpers/frontend_helper.php:1110 #: application/libraries/Save.php:130 msgid "The answer to the security question is incorrect." msgstr "" @@ -4077,19 +4124,19 @@ msgstr "" msgid "Survey administrator" msgstr "" -#: application/controllers/Statistics_userController.php:392 +#: application/controllers/Statistics_userController.php:375 msgid "Please wait ..." msgstr "" -#: application/controllers/Statistics_userController.php:394 +#: application/controllers/Statistics_userController.php:377 msgid "Go back" msgstr "" -#: application/controllers/Statistics_userController.php:403 +#: application/controllers/Statistics_userController.php:386 msgid "Getting questions and answers ..." msgstr "" -#: application/controllers/Statistics_userController.php:426 +#: application/controllers/Statistics_userController.php:409 msgid "Generating summaries ..." msgstr "" @@ -4138,44 +4185,46 @@ msgstr "" msgid "You did not answer to the security question." msgstr "" -#: application/controllers/survey/index.php:326 +#: application/controllers/survey/index.php:323 msgid "There is no matching saved survey" msgstr "" -#: application/controllers/survey/index.php:364 -#: application/helpers/frontend_helper.php:951 -#: application/helpers/frontend_helper.php:1020 -#: application/helpers/frontend_helper.php:1062 -#: application/helpers/frontend_helper.php:1101 +#: application/controllers/survey/index.php:361 +#: application/controllers/survey/index.php:396 +#: application/controllers/survey/index.php:401 +#: application/helpers/frontend_helper.php:963 +#: application/helpers/frontend_helper.php:1032 +#: application/helpers/frontend_helper.php:1074 +#: application/helpers/frontend_helper.php:1113 #: application/views/entertoken_view.php:8 msgid "This is a controlled survey. You need a valid token to participate." msgstr "" -#: application/controllers/survey/index.php:365 -#: application/controllers/survey/index.php:402 -#: application/helpers/frontend_helper.php:1022 -#: application/helpers/frontend_helper.php:1064 -#: application/helpers/frontend_helper.php:1254 +#: application/controllers/survey/index.php:362 +#: application/controllers/survey/index.php:407 +#: application/helpers/frontend_helper.php:1034 +#: application/helpers/frontend_helper.php:1076 +#: application/helpers/frontend_helper.php:1256 msgid "For further information please contact %s" msgstr "" -#: application/controllers/survey/index.php:387 -msgid "This invitation is not valid yet." -msgstr "" - -#: application/controllers/survey/index.php:391 -msgid "This invitation is not valid anymore." -msgstr "" - -#: application/controllers/survey/index.php:396 +#: application/controllers/survey/index.php:384 msgid "This invitation has already been used." msgstr "" -#: application/controllers/survey/index.php:400 +#: application/controllers/survey/index.php:388 +msgid "This invitation is not valid yet." +msgstr "" + +#: application/controllers/survey/index.php:392 +msgid "This invitation is not valid anymore." +msgstr "" + +#: application/controllers/survey/index.php:405 msgid "We are sorry but you are not allowed to enter this survey." msgstr "" -#: application/controllers/survey/index.php:551 +#: application/controllers/survey/index.php:583 msgid "Your responses were successfully saved." msgstr "" @@ -4261,6 +4310,14 @@ msgstr "" msgid "You have exceeded the number of maximum login attempts. Please wait %d minutes before trying again." msgstr "" +#: application/core/LSYii_CaseValidator.php:29 +msgid "Text needs to be uppercase." +msgstr "" + +#: application/core/LSYii_CaseValidator.php:40 +msgid "Text needs to be lowercase." +msgstr "" + #: application/core/LSYii_EmailIDNAValidator.php:41 msgid "Invalid email address." msgstr "" @@ -4269,31 +4326,31 @@ msgstr "" msgid "Core plugin can not be disabled." msgstr "" -#: application/core/plugins/Authdb/Authdb.php:154 +#: application/core/plugins/Authdb/Authdb.php:149 msgid "CSV" msgstr "" -#: application/core/plugins/Authdb/Authdb.php:159 +#: application/core/plugins/Authdb/Authdb.php:154 msgid "Microsoft Excel" msgstr "" -#: application/core/plugins/Authdb/Authdb.php:161 +#: application/core/plugins/Authdb/Authdb.php:156 msgid "(Iconv Library not installed)" msgstr "" -#: application/core/plugins/Authdb/Authdb.php:167 +#: application/core/plugins/Authdb/Authdb.php:162 msgid "Microsoft Word" msgstr "" -#: application/core/plugins/Authdb/Authdb.php:172 +#: application/core/plugins/Authdb/Authdb.php:167 msgid "PDF" msgstr "" -#: application/core/plugins/Authdb/Authdb.php:176 +#: application/core/plugins/Authdb/Authdb.php:171 msgid "HTML" msgstr "" -#: application/core/plugins/AuthLDAP/AuthLDAP.php:214 +#: application/core/plugins/AuthLDAP/AuthLDAP.php:211 msgid "Could not connect to LDAP server." msgstr "" @@ -4333,12 +4390,12 @@ msgid "Not Selected" msgstr "" #: application/core/Survey_Common_Action.php:685 -#: application/views/admin/survey/subview/tabTokens_view.php:22 +#: application/views/admin/survey/subview/tabTokens_view.php:29 msgid "Responses to this survey are anonymized." msgstr "" #: application/core/Survey_Common_Action.php:689 -#: application/views/admin/survey/subview/tabTokens_view.php:20 +#: application/views/admin/survey/subview/tabTokens_view.php:27 msgid "Responses to this survey are NOT anonymized." msgstr "" @@ -4367,7 +4424,7 @@ msgid "A full question index will be shown; participants will be able to jump be msgstr "" #: application/core/Survey_Common_Action.php:720 -#: application/views/admin/survey/subview/tabNotification_view.php:22 +#: application/views/admin/survey/subview/tabNotification_view.php:16 msgid "Responses will be date stamped." msgstr "" @@ -4461,25 +4518,25 @@ msgid "Default administration page" msgstr "" #: application/extensions/Menu/MenuWidget.php:62 -#: application/views/admin/super/adminmenu.php:32 +#: application/views/admin/super/adminmenu.php:29 msgid "Manage survey administrators" msgstr "" #: application/extensions/Menu/MenuWidget.php:87 -#: application/helpers/common_helper.php:240 +#: application/helpers/common_helper.php:220 #: application/views/admin/survey/listSurveys_view.php:68 #: application/views/plugins/index.php:13 msgid "Inactive" msgstr "" #: application/extensions/Menu/MenuWidget.php:91 -#: application/helpers/common_helper.php:235 +#: application/helpers/common_helper.php:215 #: application/views/admin/survey/listSurveys_view.php:67 msgid "Expired" msgstr "" #: application/extensions/Menu/MenuWidget.php:115 -#: application/views/admin/super/adminmenu.php:100 +#: application/views/admin/super/adminmenu.php:96 msgid "Surveys:" msgstr "" @@ -4488,13 +4545,13 @@ msgid "No surveys available." msgstr "" #: application/extensions/Menu/MenuWidget.php:126 -#: application/views/admin/super/adminmenu.php:105 +#: application/views/admin/super/adminmenu.php:101 msgid "Detailed list of surveys" msgstr "" #: application/extensions/Menu/MenuWidget.php:136 -#: application/views/admin/labels/labelsetsbar_view.php:41 -#: application/views/admin/super/adminmenu.php:119 +#: application/views/admin/labels/labelsetsbar_view.php:43 +#: application/views/admin/super/adminmenu.php:115 #: application/views/admin/templates/templateeditorbar_view.php:154 msgid "Logout" msgstr "" @@ -4515,7 +4572,7 @@ msgid "General settings" msgstr "" #: application/extensions/Menu/MenuWidget.php:267 -#: application/models/Permission.php:64 +#: application/models/Permission.php:80 #: application/views/admin/survey/copySurvey_view.php:47 #: application/views/admin/survey/importSurvey_view.php:61 #: application/views/admin/survey/surveybar_view.php:71 @@ -4523,7 +4580,7 @@ msgid "Quotas" msgstr "" #: application/extensions/Menu/MenuWidget.php:273 -#: application/models/Permission.php:63 +#: application/models/Permission.php:73 #: application/views/admin/survey/copySurvey_view.php:46 #: application/views/admin/survey/importSurvey_view.php:60 #: application/views/admin/survey/surveybar_view.php:75 @@ -4543,7 +4600,7 @@ msgstr "" #: application/extensions/Menu/MenuWidget.php:299 #: application/views/admin/survey/deleteSurvey_view.php:3 -#: application/views/admin/survey/deleteSurvey_view.php:35 +#: application/views/admin/survey/deleteSurvey_view.php:36 #: application/views/admin/survey/surveybar_view.php:105 msgid "Delete survey" msgstr "" @@ -4565,12 +4622,12 @@ msgid "Reset conditions" msgstr "" #: application/extensions/Menu/MenuWidget.php:322 -#: application/views/admin/survey/surveybar_view.php:131 +#: application/views/admin/survey/surveybar_view.php:133 msgid "Regenerate question codes" msgstr "" #: application/extensions/Menu/MenuWidget.php:326 -#: application/views/admin/survey/surveybar_view.php:135 +#: application/views/admin/survey/surveybar_view.php:137 msgid "Straight" msgstr "" @@ -4579,7 +4636,7 @@ msgid "By group" msgstr "" #: application/extensions/Menu/MenuWidget.php:348 -#: application/views/admin/survey/surveybar_view.php:320 +#: application/views/admin/survey/surveybar_view.php:325 msgid "Add new group to survey" msgstr "" @@ -4599,90 +4656,95 @@ msgstr "" #: application/extensions/Menu/MenuWidget.php:539 #: application/views/admin/globalSettings_view.php:8 -#: application/views/admin/super/adminmenu.php:44 +#: application/views/admin/super/adminmenu.php:40 msgid "Global settings" msgstr "" #: application/extensions/Menu/MenuWidget.php:551 -#: application/views/admin/super/adminmenu.php:50 +#: application/views/admin/super/adminmenu.php:46 msgid "Check Data Integrity" msgstr "" #: application/extensions/Menu/MenuWidget.php:564 -#: application/views/admin/super/adminmenu.php:113 +#: application/views/admin/super/adminmenu.php:109 msgid "Create, import, or copy a survey" msgstr "" #: application/extensions/Menu/MenuWidget.php:577 -#: application/views/admin/super/adminmenu.php:62 +#: application/views/admin/super/adminmenu.php:58 msgid "Backup Entire Database" msgstr "" #: application/extensions/Menu/MenuWidget.php:584 -#: application/views/admin/super/adminmenu.php:66 +#: application/views/admin/super/adminmenu.php:62 msgid "The database export is only available for MySQL databases. For other database types please use the according backup mechanism to create a database dump." msgstr "" #: application/extensions/Menu/MenuWidget.php:598 -#: application/views/admin/super/adminmenu.php:78 +#: application/views/admin/super/adminmenu.php:74 msgid "Edit label sets" msgstr "" #: application/extensions/Menu/MenuWidget.php:609 -#: application/views/admin/super/adminmenu.php:84 +#: application/views/admin/super/adminmenu.php:80 msgid "Template Editor" msgstr "" #: application/extensions/Menu/MenuWidget.php:621 -#: application/views/admin/super/adminmenu.php:38 +#: application/views/admin/super/adminmenu.php:34 msgid "Create/edit user groups" msgstr "" #: application/extensions/Menu/MenuWidget.php:632 -#: application/views/admin/super/adminmenu.php:91 +#: application/views/admin/super/adminmenu.php:87 #: application/views/admin/token/tokenbar.php:71 msgid "Central participant database/panel" msgstr "" #: application/extensions/Menu/MenuWidget.php:645 -#: application/views/admin/super/adminmenu.php:96 +#: application/views/admin/super/adminmenu.php:92 msgid "Plugin manager" msgstr "" -#: application/helpers/admin/activate_helper.php:84 +#: application/helpers/admin/activate_helper.php:95 msgid "This group does not contain any question(s)." msgstr "" -#: application/helpers/admin/activate_helper.php:128 +#: application/helpers/admin/activate_helper.php:139 msgid "This question has no subquestions." msgstr "" -#: application/helpers/admin/activate_helper.php:138 +#: application/helpers/admin/activate_helper.php:149 msgid "This question has no answers." msgstr "" -#: application/helpers/admin/activate_helper.php:148 +#: application/helpers/admin/activate_helper.php:159 msgid "This question does not have a question 'type' set." msgstr "" -#: application/helpers/admin/activate_helper.php:158 +#: application/helpers/admin/activate_helper.php:169 msgid "This question requires answers, but none are set." msgstr "" -#: application/helpers/admin/activate_helper.php:165 +#: application/helpers/admin/activate_helper.php:176 msgid "This question requires a second answer set but none is set." msgstr "" -#: application/helpers/admin/activate_helper.php:210 +#: application/helpers/admin/activate_helper.php:221 msgid "This question has a condition set, however the condition is based on a question that appears after it." msgstr "" #: application/helpers/admin/export/DocWriter.php:75 -#: application/helpers/admin/export/PdfWriter.php:47 +#: application/helpers/admin/export/HtmlWriter.php:68 msgid "Survey response" msgstr "" -#: application/helpers/admin/export/PdfWriter.php:60 +#: application/helpers/admin/export/HtmlWriter.php:55 +#: application/views/admin/templates/templateeditor_printoutput_view.php:1 +msgid "Survey name (ID)" +msgstr "" + +#: application/helpers/admin/export/PdfWriter.php:62 msgid "Survey response %d" msgstr "" @@ -4701,7 +4763,7 @@ msgstr "" #: application/helpers/admin/import_helper.php:48 #: application/helpers/admin/import_helper.php:1140 -#: application/helpers/admin/import_helper.php:2287 +#: application/helpers/admin/import_helper.php:2286 msgid "This file is too old. Only files from LimeSurvey version 1.50 (DBVersion 112) and newer are supported." msgstr "" @@ -4726,7 +4788,7 @@ msgstr "" #: application/helpers/admin/import_helper.php:589 #: application/helpers/admin/import_helper.php:1574 -#: application/helpers/admin/import_helper.php:3062 +#: application/helpers/admin/import_helper.php:3060 msgid "Faulty line in import - fields and data don't match" msgstr "" @@ -4756,147 +4818,147 @@ msgstr "" msgid "Existing LID: %s" msgstr "" -#: application/helpers/admin/import_helper.php:2281 +#: application/helpers/admin/import_helper.php:2280 msgid "This file is not a LimeSurvey survey file. Import failed." msgstr "" -#: application/helpers/admin/import_helper.php:2610 -#: application/helpers/admin/import_helper.php:2619 -#: application/helpers/admin/import_helper.php:2662 -#: application/helpers/admin/import_helper.php:2690 +#: application/helpers/admin/import_helper.php:2609 +#: application/helpers/admin/import_helper.php:2618 +#: application/helpers/admin/import_helper.php:2661 +#: application/helpers/admin/import_helper.php:2689 msgid "Import of this survey file failed" msgstr "" -#: application/helpers/admin/import_helper.php:2611 -#: application/helpers/admin/import_helper.php:2619 +#: application/helpers/admin/import_helper.php:2610 +#: application/helpers/admin/import_helper.php:2618 msgid "File does not contain LimeSurvey data in the correct format." msgstr "" -#: application/helpers/admin/import_helper.php:2643 +#: application/helpers/admin/import_helper.php:2642 msgid "Template %s not found, please review when activating." msgstr "" -#: application/helpers/admin/import_helper.php:2828 +#: application/helpers/admin/import_helper.php:2826 msgid "A group in the CSV/SQL file is not part of the same survey. The import of the survey was stopped." msgstr "" -#: application/helpers/admin/import_helper.php:2975 -#: application/helpers/admin/import_helper.php:3801 +#: application/helpers/admin/import_helper.php:2973 +#: application/helpers/admin/import_helper.php:3785 msgid "Question code %s was updated to %s." msgstr "" -#: application/helpers/admin/import_helper.php:3167 -#: application/helpers/admin/import_helper.php:3909 +#: application/helpers/admin/import_helper.php:3165 +#: application/helpers/admin/import_helper.php:3893 msgid "Title of subquestion %s was updated to %s." msgstr "" -#: application/helpers/admin/import_helper.php:3345 +#: application/helpers/admin/import_helper.php:3329 #: application/views/admin/quotas/newquota_view.php:37 msgid "Sorry your responses have exceeded a quota on this survey." msgstr "" -#: application/helpers/admin/import_helper.php:3518 +#: application/helpers/admin/import_helper.php:3502 msgid "This is not a valid LimeSurvey survey structure XML file." msgstr "" -#: application/helpers/admin/import_helper.php:3614 +#: application/helpers/admin/import_helper.php:3598 msgid "This survey setting has not been imported: %s => %s" msgstr "" -#: application/helpers/admin/import_helper.php:4226 +#: application/helpers/admin/import_helper.php:4210 msgid "Attention: Several question codes were updated. Please check these carefully as the update may not be perfect with customized expressions." msgstr "" -#: application/helpers/admin/import_helper.php:4276 +#: application/helpers/admin/import_helper.php:4260 msgid "This is not a valid token data XML file." msgstr "" -#: application/helpers/admin/import_helper.php:4326 +#: application/helpers/admin/import_helper.php:4310 msgid "Skipped tokens entry:" msgstr "" -#: application/helpers/admin/import_helper.php:4352 +#: application/helpers/admin/import_helper.php:4339 msgid "This is not a valid response data XML file." msgstr "" -#: application/helpers/admin/import_helper.php:4440 +#: application/helpers/admin/import_helper.php:4430 msgid "File seems empty or has only one line" msgstr "" -#: application/helpers/admin/import_helper.php:4488 +#: application/helpers/admin/import_helper.php:4478 msgid "Import failed: Forced import was requested but the input file doesn't contain enough columns to fill the survey." msgstr "" -#: application/helpers/admin/import_helper.php:4500 +#: application/helpers/admin/import_helper.php:4490 msgid "Import failed: No answers could be mapped." msgstr "" -#: application/helpers/admin/import_helper.php:4633 +#: application/helpers/admin/import_helper.php:4647 msgid "%s response lines in your file." msgstr "" -#: application/helpers/admin/import_helper.php:4635 +#: application/helpers/admin/import_helper.php:4649 msgid "No response lines in your file." msgstr "" -#: application/helpers/admin/import_helper.php:4638 +#: application/helpers/admin/import_helper.php:4652 msgid "%s responses were inserted." msgstr "" -#: application/helpers/admin/import_helper.php:4642 +#: application/helpers/admin/import_helper.php:4656 msgid "%s responses were updated." msgstr "" -#: application/helpers/admin/import_helper.php:4645 +#: application/helpers/admin/import_helper.php:4659 msgid "%s responses cannot be inserted or updated." msgstr "" -#: application/helpers/admin/import_helper.php:4649 +#: application/helpers/admin/import_helper.php:4663 msgid "%s responses already exist." msgstr "" -#: application/helpers/admin/import_helper.php:4664 +#: application/helpers/admin/import_helper.php:4678 msgid "This is not a valid timings data XML file." msgstr "" -#: application/helpers/admin/import_helper.php:4888 +#: application/helpers/admin/import_helper.php:4902 msgid "Failed to insert survey language" msgstr "" -#: application/helpers/admin/import_helper.php:4944 +#: application/helpers/admin/import_helper.php:4958 msgid "Failed to insert group" msgstr "" -#: application/helpers/admin/import_helper.php:4944 -#: application/helpers/admin/import_helper.php:4992 -#: application/helpers/admin/import_helper.php:5041 -#: application/helpers/admin/import_helper.php:5059 -#: application/helpers/admin/import_helper.php:5085 -#: application/helpers/admin/import_helper.php:5123 -#: application/helpers/admin/import_helper.php:5145 -#: application/helpers/admin/import_helper.php:5163 +#: application/helpers/admin/import_helper.php:4958 +#: application/helpers/admin/import_helper.php:5006 +#: application/helpers/admin/import_helper.php:5055 +#: application/helpers/admin/import_helper.php:5073 +#: application/helpers/admin/import_helper.php:5100 +#: application/helpers/admin/import_helper.php:5139 +#: application/helpers/admin/import_helper.php:5161 +#: application/helpers/admin/import_helper.php:5179 msgid "Text file row number " msgstr "" -#: application/helpers/admin/import_helper.php:4992 +#: application/helpers/admin/import_helper.php:5006 msgid "Could not insert question" msgstr "" -#: application/helpers/admin/import_helper.php:5041 +#: application/helpers/admin/import_helper.php:5055 msgid "Failed to insert question attribute" msgstr "" -#: application/helpers/admin/import_helper.php:5059 -#: application/helpers/admin/import_helper.php:5085 -#: application/helpers/admin/import_helper.php:5145 +#: application/helpers/admin/import_helper.php:5073 +#: application/helpers/admin/import_helper.php:5100 +#: application/helpers/admin/import_helper.php:5161 msgid "Failed to insert default value" msgstr "" -#: application/helpers/admin/import_helper.php:5123 +#: application/helpers/admin/import_helper.php:5139 msgid "Could not insert subquestion" msgstr "" -#: application/helpers/admin/import_helper.php:5163 +#: application/helpers/admin/import_helper.php:5179 msgid "Could not insert answer" msgstr "" @@ -4928,198 +4990,186 @@ msgstr "" msgid "Sorry, but this question has no responses yet so a graph cannot be shown." msgstr "" -#: application/helpers/admin/statistics_helper.php:239 -#: application/helpers/admin/statistics_helper.php:1581 -#: application/helpers/admin/statistics_helper.php:1815 +#: application/helpers/admin/statistics_helper.php:240 +#: application/helpers/admin/statistics_helper.php:1583 +#: application/helpers/admin/statistics_helper.php:1817 msgid "Comments" msgstr "" -#: application/helpers/admin/statistics_helper.php:776 +#: application/helpers/admin/statistics_helper.php:778 #: application/models/Question.php:555 msgid "Ranking" msgstr "" -#: application/helpers/admin/statistics_helper.php:827 +#: application/helpers/admin/statistics_helper.php:829 msgid "Total number of files" msgstr "" -#: application/helpers/admin/statistics_helper.php:828 +#: application/helpers/admin/statistics_helper.php:830 msgid "Average no. of files per respondent" msgstr "" -#: application/helpers/admin/statistics_helper.php:851 +#: application/helpers/admin/statistics_helper.php:853 msgid "Total size of files" msgstr "" -#: application/helpers/admin/statistics_helper.php:852 +#: application/helpers/admin/statistics_helper.php:854 msgid "Average file size" msgstr "" -#: application/helpers/admin/statistics_helper.php:853 +#: application/helpers/admin/statistics_helper.php:855 msgid "Average size per respondent" msgstr "" -#: application/helpers/admin/statistics_helper.php:872 -#: application/helpers/admin/statistics_helper.php:890 -#: application/helpers/admin/statistics_helper.php:899 -#: application/helpers/admin/statistics_helper.php:952 -#: application/helpers/admin/statistics_helper.php:972 -#: application/helpers/admin/statistics_helper.php:981 -#: application/helpers/admin/statistics_helper.php:1631 -#: application/helpers/admin/statistics_helper.php:1647 -#: application/helpers/admin/statistics_helper.php:1663 +#: application/helpers/admin/statistics_helper.php:874 +#: application/helpers/admin/statistics_helper.php:892 +#: application/helpers/admin/statistics_helper.php:901 +#: application/helpers/admin/statistics_helper.php:954 +#: application/helpers/admin/statistics_helper.php:974 +#: application/helpers/admin/statistics_helper.php:983 +#: application/helpers/admin/statistics_helper.php:1633 +#: application/helpers/admin/statistics_helper.php:1649 +#: application/helpers/admin/statistics_helper.php:1665 msgid "Field summary for %s" msgstr "" -#: application/helpers/admin/statistics_helper.php:881 -#: application/helpers/admin/statistics_helper.php:893 -#: application/helpers/admin/statistics_helper.php:903 -#: application/helpers/admin/statistics_helper.php:962 -#: application/helpers/admin/statistics_helper.php:975 -#: application/helpers/admin/statistics_helper.php:985 +#: application/helpers/admin/statistics_helper.php:883 +#: application/helpers/admin/statistics_helper.php:895 +#: application/helpers/admin/statistics_helper.php:905 +#: application/helpers/admin/statistics_helper.php:964 +#: application/helpers/admin/statistics_helper.php:977 +#: application/helpers/admin/statistics_helper.php:987 msgid "Calculation" msgstr "" -#: application/helpers/admin/statistics_helper.php:882 -#: application/helpers/admin/statistics_helper.php:893 -#: application/helpers/admin/statistics_helper.php:905 -#: application/helpers/admin/statistics_helper.php:963 -#: application/helpers/admin/statistics_helper.php:975 -#: application/helpers/admin/statistics_helper.php:987 +#: application/helpers/admin/statistics_helper.php:884 +#: application/helpers/admin/statistics_helper.php:895 +#: application/helpers/admin/statistics_helper.php:907 +#: application/helpers/admin/statistics_helper.php:965 +#: application/helpers/admin/statistics_helper.php:977 +#: application/helpers/admin/statistics_helper.php:989 msgid "Result" msgstr "" -#: application/helpers/admin/statistics_helper.php:1065 -#: application/helpers/admin/statistics_helper.php:1916 -#: application/helpers/admin/statistics_helper.php:1922 -#: application/helpers/admin/statistics_helper.php:1933 -#: application/helpers/admin/statistics_helper.php:2428 -#: application/helpers/admin/statistics_helper.php:2432 -#: application/helpers/admin/statistics_helper.php:2444 -#: application/helpers/admin/statistics_helper.php:2450 +#: application/helpers/admin/statistics_helper.php:1067 +#: application/helpers/admin/statistics_helper.php:1918 +#: application/helpers/admin/statistics_helper.php:1924 +#: application/helpers/admin/statistics_helper.php:1935 +#: application/helpers/admin/statistics_helper.php:2430 +#: application/helpers/admin/statistics_helper.php:2434 +#: application/helpers/admin/statistics_helper.php:2446 +#: application/helpers/admin/statistics_helper.php:2452 msgid "Sum" msgstr "" -#: application/helpers/admin/statistics_helper.php:1066 -#: application/helpers/admin/statistics_helper.php:2610 -#: application/helpers/admin/statistics_helper.php:2617 -#: application/helpers/admin/statistics_helper.php:2624 +#: application/helpers/admin/statistics_helper.php:1068 +#: application/helpers/admin/statistics_helper.php:2612 +#: application/helpers/admin/statistics_helper.php:2619 +#: application/helpers/admin/statistics_helper.php:2626 msgid "Standard deviation" msgstr "" -#: application/helpers/admin/statistics_helper.php:1067 +#: application/helpers/admin/statistics_helper.php:1069 msgid "Average" msgstr "" -#: application/helpers/admin/statistics_helper.php:1084 -#: application/helpers/admin/statistics_helper.php:1867 -#: application/helpers/admin/statistics_helper.php:1883 -#: application/helpers/admin/statistics_helper.php:1914 -#: application/helpers/admin/statistics_helper.php:1922 -#: application/helpers/admin/statistics_helper.php:1929 -#: application/helpers/admin/statistics_helper.php:1951 -#: application/helpers/admin/statistics_helper.php:1958 -#: application/helpers/admin/statistics_helper.php:1965 -#: application/helpers/admin/statistics_helper.php:1995 -#: application/helpers/admin/statistics_helper.php:2002 -#: application/helpers/admin/statistics_helper.php:2009 +#: application/helpers/admin/statistics_helper.php:1086 +#: application/helpers/admin/statistics_helper.php:1869 +#: application/helpers/admin/statistics_helper.php:1885 +#: application/helpers/admin/statistics_helper.php:1916 +#: application/helpers/admin/statistics_helper.php:1924 +#: application/helpers/admin/statistics_helper.php:1931 +#: application/helpers/admin/statistics_helper.php:1953 +#: application/helpers/admin/statistics_helper.php:1960 +#: application/helpers/admin/statistics_helper.php:1967 +#: application/helpers/admin/statistics_helper.php:1997 +#: application/helpers/admin/statistics_helper.php:2004 +#: application/helpers/admin/statistics_helper.php:2011 msgid "Count" msgstr "" -#: application/helpers/admin/statistics_helper.php:1090 +#: application/helpers/admin/statistics_helper.php:1092 msgid "1st quartile (Q1)" msgstr "" -#: application/helpers/admin/statistics_helper.php:1091 +#: application/helpers/admin/statistics_helper.php:1093 msgid "2nd quartile (Median)" msgstr "" -#: application/helpers/admin/statistics_helper.php:1092 +#: application/helpers/admin/statistics_helper.php:1094 msgid "3rd quartile (Q3)" msgstr "" -#: application/helpers/admin/statistics_helper.php:1131 -#: application/helpers/admin/statistics_helper.php:1135 -#: application/helpers/admin/statistics_helper.php:1141 -#: application/helpers/admin/statistics_helper.php:1157 +#: application/helpers/admin/statistics_helper.php:1133 +#: application/helpers/admin/statistics_helper.php:1137 +#: application/helpers/admin/statistics_helper.php:1143 +#: application/helpers/admin/statistics_helper.php:1159 msgid "Null values are ignored in calculations" msgstr "" -#: application/helpers/admin/statistics_helper.php:1133 -#: application/helpers/admin/statistics_helper.php:1136 -#: application/helpers/admin/statistics_helper.php:1142 -#: application/helpers/admin/statistics_helper.php:1158 +#: application/helpers/admin/statistics_helper.php:1135 +#: application/helpers/admin/statistics_helper.php:1138 +#: application/helpers/admin/statistics_helper.php:1144 +#: application/helpers/admin/statistics_helper.php:1160 msgid "Q1 and Q3 calculated using %s" msgstr "" -#: application/helpers/admin/statistics_helper.php:1133 -#: application/helpers/admin/statistics_helper.php:1136 -#: application/helpers/admin/statistics_helper.php:1142 -#: application/helpers/admin/statistics_helper.php:1158 +#: application/helpers/admin/statistics_helper.php:1135 +#: application/helpers/admin/statistics_helper.php:1138 +#: application/helpers/admin/statistics_helper.php:1144 +#: application/helpers/admin/statistics_helper.php:1160 msgid "minitab method" msgstr "" -#: application/helpers/admin/statistics_helper.php:1167 -#: application/helpers/admin/statistics_helper.php:1825 -#: application/helpers/admin/statistics_helper.php:1874 -#: application/helpers/admin/statistics_helper.php:3118 +#: application/helpers/admin/statistics_helper.php:1169 +#: application/helpers/admin/statistics_helper.php:1827 +#: application/helpers/admin/statistics_helper.php:1876 +#: application/helpers/admin/statistics_helper.php:3120 msgid "Browse" msgstr "" -#: application/helpers/admin/statistics_helper.php:1191 -#: application/helpers/admin/statistics_helper.php:1196 -#: application/helpers/admin/statistics_helper.php:1207 +#: application/helpers/admin/statistics_helper.php:1193 +#: application/helpers/admin/statistics_helper.php:1198 +#: application/helpers/admin/statistics_helper.php:1209 msgid "Not enough values for calculation" msgstr "" -#: application/helpers/admin/statistics_helper.php:1829 -#: application/helpers/admin/statistics_helper.php:1842 -#: application/helpers/admin/statistics_helper.php:1890 -#: application/views/admin/assessments_view.php:9 -#: application/views/admin/saved/savedlist_view.php:5 -#: application/views/admin/survey/Question/questionbar_view.php:5 -#: application/views/admin/survey/QuestionGroups/questiongroupbar_view.php:2 -#: application/views/admin/survey/surveybar_view.php:4 -#: application/views/admin/survey/surveySummary_view.php:7 -msgid "ID" -msgstr "" - -#: application/helpers/admin/statistics_helper.php:1829 -#: application/helpers/admin/statistics_helper.php:1842 -#: application/helpers/admin/statistics_helper.php:1890 +#: application/helpers/admin/statistics_helper.php:1831 +#: application/helpers/admin/statistics_helper.php:1844 +#: application/helpers/admin/statistics_helper.php:1892 msgid "Response" msgstr "" -#: application/helpers/admin/statistics_helper.php:1867 -#: application/helpers/admin/statistics_helper.php:1885 -#: application/helpers/admin/statistics_helper.php:1915 -#: application/helpers/admin/statistics_helper.php:1922 -#: application/helpers/admin/statistics_helper.php:1931 -#: application/helpers/admin/statistics_helper.php:1952 -#: application/helpers/admin/statistics_helper.php:1958 -#: application/helpers/admin/statistics_helper.php:1967 -#: application/helpers/admin/statistics_helper.php:1996 -#: application/helpers/admin/statistics_helper.php:2002 -#: application/helpers/admin/statistics_helper.php:2011 +#: application/helpers/admin/statistics_helper.php:1869 +#: application/helpers/admin/statistics_helper.php:1887 +#: application/helpers/admin/statistics_helper.php:1917 +#: application/helpers/admin/statistics_helper.php:1924 +#: application/helpers/admin/statistics_helper.php:1933 +#: application/helpers/admin/statistics_helper.php:1954 +#: application/helpers/admin/statistics_helper.php:1960 +#: application/helpers/admin/statistics_helper.php:1969 +#: application/helpers/admin/statistics_helper.php:1998 +#: application/helpers/admin/statistics_helper.php:2004 +#: application/helpers/admin/statistics_helper.php:2013 msgid "Percentage" msgstr "" -#: application/helpers/admin/statistics_helper.php:2110 -#: application/helpers/admin/statistics_helper.php:2142 -#: application/helpers/admin/statistics_helper.php:2190 +#: application/helpers/admin/statistics_helper.php:2112 +#: application/helpers/admin/statistics_helper.php:2144 +#: application/helpers/admin/statistics_helper.php:2192 msgid "Not completed or Not displayed" msgstr "" -#: application/helpers/admin/statistics_helper.php:2114 -#: application/helpers/admin/statistics_helper.php:2146 -#: application/helpers/admin/statistics_helper.php:2194 +#: application/helpers/admin/statistics_helper.php:2116 +#: application/helpers/admin/statistics_helper.php:2148 +#: application/helpers/admin/statistics_helper.php:2196 msgid "Not displayed" msgstr "" -#: application/helpers/admin/statistics_helper.php:2428 -#: application/helpers/admin/statistics_helper.php:2432 -#: application/helpers/admin/statistics_helper.php:2444 -#: application/helpers/admin/statistics_helper.php:2450 +#: application/helpers/admin/statistics_helper.php:2430 +#: application/helpers/admin/statistics_helper.php:2434 +#: application/helpers/admin/statistics_helper.php:2446 +#: application/helpers/admin/statistics_helper.php:2452 #: application/views/admin/quotas/viewquotasrow_view.php:49 #: application/views/admin/survey/copySurvey_view.php:24 #: application/views/admin/survey/importSurvey_view.php:39 @@ -5128,118 +5178,118 @@ msgstr "" msgid "Answers" msgstr "" -#: application/helpers/admin/statistics_helper.php:2429 -#: application/helpers/admin/statistics_helper.php:2437 -#: application/helpers/admin/statistics_helper.php:2445 -#: application/helpers/admin/statistics_helper.php:2456 +#: application/helpers/admin/statistics_helper.php:2431 +#: application/helpers/admin/statistics_helper.php:2439 +#: application/helpers/admin/statistics_helper.php:2447 +#: application/helpers/admin/statistics_helper.php:2458 msgid "Number of cases" msgstr "" -#: application/helpers/admin/statistics_helper.php:2607 -#: application/helpers/admin/statistics_helper.php:2616 -#: application/helpers/admin/statistics_helper.php:2622 +#: application/helpers/admin/statistics_helper.php:2609 +#: application/helpers/admin/statistics_helper.php:2618 +#: application/helpers/admin/statistics_helper.php:2624 msgid "Arithmetic mean" msgstr "" -#: application/helpers/admin/statistics_helper.php:2781 +#: application/helpers/admin/statistics_helper.php:2783 msgid "Disable chart" msgstr "" -#: application/helpers/admin/statistics_helper.php:2782 +#: application/helpers/admin/statistics_helper.php:2784 msgid "Enable chart" msgstr "" -#: application/helpers/admin/statistics_helper.php:2783 +#: application/helpers/admin/statistics_helper.php:2785 msgid "Display as bar chart" msgstr "" -#: application/helpers/admin/statistics_helper.php:2784 +#: application/helpers/admin/statistics_helper.php:2786 msgid "Display as pie chart" msgstr "" -#: application/helpers/admin/statistics_helper.php:2785 +#: application/helpers/admin/statistics_helper.php:2787 msgid "Disable map display" msgstr "" -#: application/helpers/admin/statistics_helper.php:2786 +#: application/helpers/admin/statistics_helper.php:2788 msgid "Enable map display" msgstr "" -#: application/helpers/admin/statistics_helper.php:2944 +#: application/helpers/admin/statistics_helper.php:2946 msgid "Statistics survey %s" msgstr "" -#: application/helpers/admin/statistics_helper.php:2946 -#: application/helpers/common_helper.php:2960 -#: application/helpers/common_helper.php:2971 -#: application/helpers/common_helper.php:2982 -#: application/helpers/common_helper.php:3328 -#: application/models/Permission.php:66 +#: application/helpers/admin/statistics_helper.php:2948 +#: application/helpers/common_helper.php:2956 +#: application/helpers/common_helper.php:2967 +#: application/helpers/common_helper.php:2978 +#: application/helpers/common_helper.php:3324 +#: application/models/Permission.php:95 #: application/views/admin/export/statistics_view.php:1252 msgid "Statistics" msgstr "" -#: application/helpers/admin/statistics_helper.php:2946 +#: application/helpers/admin/statistics_helper.php:2948 msgid "Survey %s" msgstr "" -#: application/helpers/admin/statistics_helper.php:2957 -#: application/helpers/admin/statistics_helper.php:3069 -#: application/helpers/admin/statistics_helper.php:3192 -#: application/views/admin/participants/displayParticipants_view.php:302 +#: application/helpers/admin/statistics_helper.php:2959 +#: application/helpers/admin/statistics_helper.php:3071 +#: application/helpers/admin/statistics_helper.php:3194 +#: application/views/admin/participants/displayParticipants_view.php:298 #: application/views/admin/survey/listSurveys_view.php:46 #: application/views/admin/survey/surveybar_view.php:3 msgid "Survey" msgstr "" -#: application/helpers/admin/statistics_helper.php:3042 -#: application/helpers/admin/statistics_helper.php:3060 -#: application/helpers/admin/statistics_helper.php:3077 +#: application/helpers/admin/statistics_helper.php:3044 +#: application/helpers/admin/statistics_helper.php:3062 +#: application/helpers/admin/statistics_helper.php:3079 msgid "Number of records in this query:" msgstr "" -#: application/helpers/admin/statistics_helper.php:3045 -#: application/helpers/admin/statistics_helper.php:3061 -#: application/helpers/admin/statistics_helper.php:3079 +#: application/helpers/admin/statistics_helper.php:3047 +#: application/helpers/admin/statistics_helper.php:3063 +#: application/helpers/admin/statistics_helper.php:3081 msgid "Total records in survey:" msgstr "" -#: application/helpers/admin/statistics_helper.php:3051 -#: application/helpers/admin/statistics_helper.php:3065 -#: application/helpers/admin/statistics_helper.php:3086 +#: application/helpers/admin/statistics_helper.php:3053 +#: application/helpers/admin/statistics_helper.php:3067 +#: application/helpers/admin/statistics_helper.php:3088 msgid "Percentage of total:" msgstr "" -#: application/helpers/admin/statistics_helper.php:3068 -#: application/helpers/admin/statistics_helper.php:3069 -#: application/helpers/admin/statistics_helper.php:3076 +#: application/helpers/admin/statistics_helper.php:3070 +#: application/helpers/admin/statistics_helper.php:3071 +#: application/helpers/admin/statistics_helper.php:3078 msgid "Results" msgstr "" -#: application/helpers/common_helper.php:230 +#: application/helpers/common_helper.php:210 #: application/views/admin/quotas/viewquotasrow_view.php:10 #: application/views/admin/survey/listSurveys_view.php:69 #: application/views/plugins/index.php:13 msgid "Active" msgstr "" -#: application/helpers/common_helper.php:927 +#: application/helpers/common_helper.php:907 msgid "No email notification" msgstr "" -#: application/helpers/common_helper.php:928 +#: application/helpers/common_helper.php:908 msgid "Basic email notification" msgstr "" -#: application/helpers/common_helper.php:929 +#: application/helpers/common_helper.php:909 msgid "Detailed email notification with result codes" msgstr "" -#: application/helpers/common_helper.php:1216 +#: application/helpers/common_helper.php:1196 msgid "Response submission for survey {SURVEYNAME} with results" msgstr "" -#: application/helpers/common_helper.php:1217 +#: application/helpers/common_helper.php:1197 msgid "" "Hello,\n" "\n" @@ -5262,11 +5312,11 @@ msgid "" "{ANSWERTABLE}" msgstr "" -#: application/helpers/common_helper.php:1254 +#: application/helpers/common_helper.php:1234 msgid "Response submission for survey {SURVEYNAME}" msgstr "" -#: application/helpers/common_helper.php:1255 +#: application/helpers/common_helper.php:1235 msgid "" "Hello,\n" "\n" @@ -5285,11 +5335,11 @@ msgid "" "{STATISTICSURL}" msgstr "" -#: application/helpers/common_helper.php:1256 +#: application/helpers/common_helper.php:1236 msgid "Confirmation of your participation in our survey" msgstr "" -#: application/helpers/common_helper.php:1257 +#: application/helpers/common_helper.php:1237 msgid "" "Dear {FIRSTNAME},\n" "\n" @@ -5302,11 +5352,11 @@ msgid "" "{ADMINNAME}" msgstr "" -#: application/helpers/common_helper.php:1258 +#: application/helpers/common_helper.php:1238 msgid "Invitation to participate in a survey" msgstr "" -#: application/helpers/common_helper.php:1259 +#: application/helpers/common_helper.php:1239 msgid "" "Dear {FIRSTNAME},\n" "\n" @@ -5328,25 +5378,25 @@ msgid "" "{SURVEYURL}" msgstr "" -#: application/helpers/common_helper.php:1259 -#: application/helpers/common_helper.php:1261 +#: application/helpers/common_helper.php:1239 +#: application/helpers/common_helper.php:1241 #: application/views/admin/token/remind.php:32 msgid "" "If you do not want to participate in this survey and don't want to receive any more invitations please click the following link:\n" "{OPTOUTURL}" msgstr "" -#: application/helpers/common_helper.php:1259 +#: application/helpers/common_helper.php:1239 msgid "" "If you are blacklisted but want to participate in this survey and want to receive invitations please click the following link:\n" "{OPTINURL}" msgstr "" -#: application/helpers/common_helper.php:1260 +#: application/helpers/common_helper.php:1240 msgid "Reminder to participate in a survey" msgstr "" -#: application/helpers/common_helper.php:1261 +#: application/helpers/common_helper.php:1241 #: application/views/admin/token/remind.php:32 msgid "" "Dear {FIRSTNAME},\n" @@ -5371,11 +5421,11 @@ msgid "" "{SURVEYURL}" msgstr "" -#: application/helpers/common_helper.php:1262 +#: application/helpers/common_helper.php:1242 msgid "Survey registration confirmation" msgstr "" -#: application/helpers/common_helper.php:1263 +#: application/helpers/common_helper.php:1243 msgid "" "Dear {FIRSTNAME},\n" "\n" @@ -5388,911 +5438,920 @@ msgid "" "If you have any questions about this survey, or if you did not register to participate and believe this email is in error, please contact {ADMINNAME} at {ADMINEMAIL}." msgstr "" -#: application/helpers/common_helper.php:1812 +#: application/helpers/common_helper.php:1814 #: application/views/admin/export/statistics_view.php:78 msgid "Response ID" msgstr "" -#: application/helpers/common_helper.php:1820 +#: application/helpers/common_helper.php:1822 msgid "Date submitted" msgstr "" -#: application/helpers/common_helper.php:1828 +#: application/helpers/common_helper.php:1830 msgid "Last page" msgstr "" -#: application/helpers/common_helper.php:1836 +#: application/helpers/common_helper.php:1838 msgid "Start language" msgstr "" -#: application/helpers/common_helper.php:1854 -#: application/helpers/common_helper.php:5026 -#: application/helpers/frontend_helper.php:1121 application/models/Token.php:42 +#: application/helpers/common_helper.php:1850 +#: application/helpers/common_helper.php:5007 +#: application/helpers/frontend_helper.php:1133 application/models/Token.php:42 #: application/views/admin/dataentry/caption_view.php:29 #: application/views/admin/participants/attributeMap_view.php:96 -#: application/views/admin/token/browse.php:117 +#: application/views/admin/token/browse.php:111 #: application/views/admin/token/tokenform.php:56 #: application/views/entertoken_view.php:15 msgid "Token" msgstr "" -#: application/helpers/common_helper.php:1869 +#: application/helpers/common_helper.php:1865 msgid "Date started" msgstr "" -#: application/helpers/common_helper.php:1882 +#: application/helpers/common_helper.php:1878 msgid "Date last action" msgstr "" -#: application/helpers/common_helper.php:1898 +#: application/helpers/common_helper.php:1894 #: application/views/admin/dataentry/caption_view.php:74 #: application/views/admin/saved/savedlist_view.php:8 msgid "IP address" msgstr "" -#: application/helpers/common_helper.php:1909 +#: application/helpers/common_helper.php:1905 msgid "Referrer URL" msgstr "" -#: application/helpers/common_helper.php:2143 +#: application/helpers/common_helper.php:2139 msgid "Scale 1" msgstr "" -#: application/helpers/common_helper.php:2160 +#: application/helpers/common_helper.php:2156 msgid "Scale 2" msgstr "" -#: application/helpers/common_helper.php:2185 +#: application/helpers/common_helper.php:2181 msgid "Rank %s" msgstr "" -#: application/helpers/common_helper.php:2315 +#: application/helpers/common_helper.php:2311 msgid "Other comment" msgstr "" -#: application/helpers/common_helper.php:2416 +#: application/helpers/common_helper.php:2412 msgid "Group time" msgstr "" -#: application/helpers/common_helper.php:2423 +#: application/helpers/common_helper.php:2419 msgid "Question time" msgstr "" -#: application/helpers/common_helper.php:2661 -#: application/helpers/common_helper.php:2672 -#: application/helpers/common_helper.php:2682 -#: application/helpers/common_helper.php:2727 -#: application/helpers/common_helper.php:2770 -#: application/helpers/common_helper.php:2781 -#: application/helpers/common_helper.php:2789 -#: application/helpers/common_helper.php:2800 -#: application/helpers/common_helper.php:2808 -#: application/helpers/common_helper.php:2816 -#: application/helpers/common_helper.php:2825 -#: application/helpers/common_helper.php:2833 -#: application/helpers/common_helper.php:2842 -#: application/helpers/common_helper.php:3052 -#: application/helpers/common_helper.php:3063 -#: application/helpers/common_helper.php:3146 -#: application/helpers/common_helper.php:3154 -#: application/helpers/common_helper.php:3162 -#: application/helpers/common_helper.php:3170 -#: application/helpers/common_helper.php:3181 -#: application/helpers/common_helper.php:3256 -#: application/helpers/common_helper.php:3289 -#: application/helpers/common_helper.php:3309 -#: application/helpers/common_helper.php:3318 -#: application/helpers/common_helper.php:3339 -#: application/helpers/common_helper.php:3365 -#: application/helpers/common_helper.php:3375 -#: application/helpers/common_helper.php:3385 -#: application/helpers/common_helper.php:3396 -#: application/helpers/common_helper.php:3458 -#: application/helpers/common_helper.php:3504 -#: application/helpers/common_helper.php:3513 -#: application/helpers/common_helper.php:3521 -#: application/helpers/common_helper.php:3533 -#: application/helpers/common_helper.php:3542 -#: application/helpers/common_helper.php:3755 +#: application/helpers/common_helper.php:2657 +#: application/helpers/common_helper.php:2668 +#: application/helpers/common_helper.php:2678 +#: application/helpers/common_helper.php:2723 +#: application/helpers/common_helper.php:2766 +#: application/helpers/common_helper.php:2777 +#: application/helpers/common_helper.php:2785 +#: application/helpers/common_helper.php:2796 +#: application/helpers/common_helper.php:2804 +#: application/helpers/common_helper.php:2812 +#: application/helpers/common_helper.php:2821 +#: application/helpers/common_helper.php:2829 +#: application/helpers/common_helper.php:2838 +#: application/helpers/common_helper.php:3048 +#: application/helpers/common_helper.php:3059 +#: application/helpers/common_helper.php:3142 +#: application/helpers/common_helper.php:3150 +#: application/helpers/common_helper.php:3158 +#: application/helpers/common_helper.php:3166 +#: application/helpers/common_helper.php:3177 +#: application/helpers/common_helper.php:3252 +#: application/helpers/common_helper.php:3285 +#: application/helpers/common_helper.php:3305 +#: application/helpers/common_helper.php:3314 +#: application/helpers/common_helper.php:3335 +#: application/helpers/common_helper.php:3361 +#: application/helpers/common_helper.php:3371 +#: application/helpers/common_helper.php:3381 +#: application/helpers/common_helper.php:3392 +#: application/helpers/common_helper.php:3454 +#: application/helpers/common_helper.php:3500 +#: application/helpers/common_helper.php:3509 +#: application/helpers/common_helper.php:3517 +#: application/helpers/common_helper.php:3529 +#: application/helpers/common_helper.php:3538 +#: application/helpers/common_helper.php:3751 msgid "Display" msgstr "" -#: application/helpers/common_helper.php:2667 +#: application/helpers/common_helper.php:2663 msgid "Sort the answer options alphabetically" msgstr "" -#: application/helpers/common_helper.php:2668 +#: application/helpers/common_helper.php:2664 msgid "Sort answers alphabetically" msgstr "" -#: application/helpers/common_helper.php:2677 +#: application/helpers/common_helper.php:2673 msgid "Set the percentage width of the (sub-)question column (1-100)" msgstr "" -#: application/helpers/common_helper.php:2678 +#: application/helpers/common_helper.php:2674 msgid "(Sub-)question width" msgstr "" -#: application/helpers/common_helper.php:2686 +#: application/helpers/common_helper.php:2682 msgid "Repeat headings every X subquestions (Set to 0 to deactivate heading repeat, deactivate minimum repeat headings from config)." msgstr "" -#: application/helpers/common_helper.php:2687 +#: application/helpers/common_helper.php:2683 msgid "Repeat headers" msgstr "" -#: application/helpers/common_helper.php:2691 -#: application/helpers/common_helper.php:2699 -#: application/helpers/common_helper.php:2707 -#: application/helpers/common_helper.php:2718 -#: application/helpers/common_helper.php:2735 -#: application/helpers/common_helper.php:2743 -#: application/helpers/common_helper.php:2757 -#: application/helpers/common_helper.php:2859 -#: application/helpers/common_helper.php:2867 -#: application/helpers/common_helper.php:2875 -#: application/helpers/common_helper.php:2883 -#: application/helpers/common_helper.php:2891 -#: application/helpers/common_helper.php:2899 -#: application/helpers/common_helper.php:3074 -#: application/helpers/common_helper.php:3114 -#: application/helpers/common_helper.php:3267 -#: application/helpers/common_helper.php:3278 -#: application/helpers/common_helper.php:3826 +#: application/helpers/common_helper.php:2687 +#: application/helpers/common_helper.php:2695 +#: application/helpers/common_helper.php:2703 +#: application/helpers/common_helper.php:2714 +#: application/helpers/common_helper.php:2731 +#: application/helpers/common_helper.php:2739 +#: application/helpers/common_helper.php:2753 +#: application/helpers/common_helper.php:2855 +#: application/helpers/common_helper.php:2863 +#: application/helpers/common_helper.php:2871 +#: application/helpers/common_helper.php:2879 +#: application/helpers/common_helper.php:2887 +#: application/helpers/common_helper.php:2895 +#: application/helpers/common_helper.php:3070 +#: application/helpers/common_helper.php:3110 +#: application/helpers/common_helper.php:3263 +#: application/helpers/common_helper.php:3274 +#: application/helpers/common_helper.php:3822 msgid "Logic" msgstr "" -#: application/helpers/common_helper.php:2694 +#: application/helpers/common_helper.php:2690 msgid "Enter the code(s) of Multiple choice question(s) (separated by semicolons) to only show the matching answer options in this question." msgstr "" -#: application/helpers/common_helper.php:2695 +#: application/helpers/common_helper.php:2691 msgid "Array filter" msgstr "" -#: application/helpers/common_helper.php:2702 +#: application/helpers/common_helper.php:2698 msgid "Enter the code(s) of Multiple choice question(s) (separated by semicolons) to exclude the matching answer options in this question." msgstr "" -#: application/helpers/common_helper.php:2703 +#: application/helpers/common_helper.php:2699 msgid "Array filter exclusion" msgstr "" -#: application/helpers/common_helper.php:2710 +#: application/helpers/common_helper.php:2706 msgid "Hidden" msgstr "" -#: application/helpers/common_helper.php:2711 +#: application/helpers/common_helper.php:2707 #: application/views/admin/survey/QuestionGroups/questiongroupbar_view.php:113 #: application/views/admin/survey/subview/tabPresentation_view.php:94 -#: application/views/admin/survey/surveybar_view.php:313 +#: application/views/admin/survey/surveybar_view.php:318 msgid "Disabled" msgstr "" -#: application/helpers/common_helper.php:2713 +#: application/helpers/common_helper.php:2709 msgid "Specify how array-filtered sub-questions should be displayed" msgstr "" -#: application/helpers/common_helper.php:2714 +#: application/helpers/common_helper.php:2710 msgid "Array filter style" msgstr "" -#: application/helpers/common_helper.php:2722 +#: application/helpers/common_helper.php:2718 msgid "If one of the subquestions is marked then for each marked subquestion this value is added as assessment." msgstr "" -#: application/helpers/common_helper.php:2723 -#: application/views/admin/labels/labelview_view.php:40 +#: application/helpers/common_helper.php:2719 +#: application/views/admin/labels/labelview_view.php:35 #: application/views/admin/survey/Question/answerOptions_view.php:23 -#: application/views/admin/survey/Question/answerOptions_view.php:69 +#: application/views/admin/survey/Question/answerOptions_view.php:70 msgid "Assessment value" msgstr "" -#: application/helpers/common_helper.php:2730 -#: application/helpers/common_helper.php:2731 +#: application/helpers/common_helper.php:2726 +#: application/helpers/common_helper.php:2727 msgid "Category separator" msgstr "" -#: application/helpers/common_helper.php:2738 +#: application/helpers/common_helper.php:2734 msgid "Filter the available answers by this value" msgstr "" -#: application/helpers/common_helper.php:2739 +#: application/helpers/common_helper.php:2735 msgid "Code filter" msgstr "" -#: application/helpers/common_helper.php:2747 +#: application/helpers/common_helper.php:2743 msgid "No control on checkbox" msgstr "" -#: application/helpers/common_helper.php:2748 +#: application/helpers/common_helper.php:2744 msgid "Checkbox is checked" msgstr "" -#: application/helpers/common_helper.php:2749 +#: application/helpers/common_helper.php:2745 msgid "Checkbox is unchecked" msgstr "" -#: application/helpers/common_helper.php:2752 +#: application/helpers/common_helper.php:2748 msgid "Choose when user can add a comment" msgstr "" -#: application/helpers/common_helper.php:2753 +#: application/helpers/common_helper.php:2749 msgid "Comment only when" msgstr "" -#: application/helpers/common_helper.php:2765 +#: application/helpers/common_helper.php:2761 msgid "Use javascript function to remove text and uncheck checkbox (or use Expression Manager only)." msgstr "" -#: application/helpers/common_helper.php:2766 +#: application/helpers/common_helper.php:2762 msgid "Remove text or uncheck checkbox automatically" msgstr "" -#: application/helpers/common_helper.php:2776 +#: application/helpers/common_helper.php:2772 msgid "The answer options will be distributed across the number of columns set here" msgstr "" -#: application/helpers/common_helper.php:2777 +#: application/helpers/common_helper.php:2773 msgid "Display columns" msgstr "" -#: application/helpers/common_helper.php:2784 +#: application/helpers/common_helper.php:2780 msgid "How many rows to display" msgstr "" -#: application/helpers/common_helper.php:2785 +#: application/helpers/common_helper.php:2781 msgid "Display rows" msgstr "" -#: application/helpers/common_helper.php:2795 +#: application/helpers/common_helper.php:2791 msgid "Use accessible dropdown boxes instead of calendar popup" msgstr "" -#: application/helpers/common_helper.php:2796 +#: application/helpers/common_helper.php:2792 msgid "Display dropdown boxes" msgstr "" -#: application/helpers/common_helper.php:2803 +#: application/helpers/common_helper.php:2799 msgid "Minimum date selectable in calendar (YYYY-MM-DD). Only the year is used if dropdown boxes are selected." msgstr "" -#: application/helpers/common_helper.php:2804 +#: application/helpers/common_helper.php:2800 msgid "Minimum date" msgstr "" -#: application/helpers/common_helper.php:2811 +#: application/helpers/common_helper.php:2807 msgid "Maximum date selectable in calendar (YYYY-MM-DD). Only the year is used if dropdown boxes are selected." msgstr "" -#: application/helpers/common_helper.php:2812 +#: application/helpers/common_helper.php:2808 msgid "Maximum date" msgstr "" -#: application/helpers/common_helper.php:2820 +#: application/helpers/common_helper.php:2816 msgid "Prefix|Suffix for dropdown lists" msgstr "" -#: application/helpers/common_helper.php:2821 +#: application/helpers/common_helper.php:2817 msgid "Dropdown prefix/suffix" msgstr "" -#: application/helpers/common_helper.php:2828 +#: application/helpers/common_helper.php:2824 msgid "Text shown on each subquestion row between both scales in dropdown mode" msgstr "" -#: application/helpers/common_helper.php:2829 +#: application/helpers/common_helper.php:2825 msgid "Dropdown separator" msgstr "" -#: application/helpers/common_helper.php:2837 +#: application/helpers/common_helper.php:2833 msgid "Enter a header text for the first scale" msgstr "" -#: application/helpers/common_helper.php:2838 +#: application/helpers/common_helper.php:2834 msgid "Header for first scale" msgstr "" -#: application/helpers/common_helper.php:2846 +#: application/helpers/common_helper.php:2842 msgid "Enter a header text for the second scale" msgstr "" -#: application/helpers/common_helper.php:2847 +#: application/helpers/common_helper.php:2843 msgid "Header for second scale" msgstr "" -#: application/helpers/common_helper.php:2851 -#: application/helpers/common_helper.php:3082 -#: application/helpers/common_helper.php:3090 -#: application/helpers/common_helper.php:3106 -#: application/helpers/common_helper.php:3122 -#: application/helpers/common_helper.php:3130 -#: application/helpers/common_helper.php:3200 -#: application/helpers/common_helper.php:3738 -#: application/helpers/common_helper.php:3746 -#: application/helpers/common_helper.php:3838 +#: application/helpers/common_helper.php:2847 +#: application/helpers/common_helper.php:3078 +#: application/helpers/common_helper.php:3086 +#: application/helpers/common_helper.php:3102 +#: application/helpers/common_helper.php:3118 +#: application/helpers/common_helper.php:3126 +#: application/helpers/common_helper.php:3196 +#: application/helpers/common_helper.php:3734 +#: application/helpers/common_helper.php:3742 +#: application/helpers/common_helper.php:3834 msgid "Input" msgstr "" -#: application/helpers/common_helper.php:2854 +#: application/helpers/common_helper.php:2850 msgid "Multiple numeric inputs sum must equal this value" msgstr "" -#: application/helpers/common_helper.php:2855 +#: application/helpers/common_helper.php:2851 msgid "Equals sum value" msgstr "" -#: application/helpers/common_helper.php:2862 +#: application/helpers/common_helper.php:2858 msgid "Enter a boolean equation to validate the whole question." msgstr "" -#: application/helpers/common_helper.php:2863 +#: application/helpers/common_helper.php:2859 msgid "Question validation equation" msgstr "" -#: application/helpers/common_helper.php:2870 +#: application/helpers/common_helper.php:2866 msgid "This is a hint text that will be shown to the participant describing the question validation equation." msgstr "" -#: application/helpers/common_helper.php:2871 +#: application/helpers/common_helper.php:2867 msgid "Question validation tip" msgstr "" -#: application/helpers/common_helper.php:2878 +#: application/helpers/common_helper.php:2874 msgid "Enter a boolean equation to validate each sub-question." msgstr "" -#: application/helpers/common_helper.php:2879 +#: application/helpers/common_helper.php:2875 msgid "Sub-question validation equation" msgstr "" -#: application/helpers/common_helper.php:2886 +#: application/helpers/common_helper.php:2882 msgid "This is a tip shown to the participant describing the sub-question validation equation." msgstr "" -#: application/helpers/common_helper.php:2887 +#: application/helpers/common_helper.php:2883 msgid "Sub-question validation tip" msgstr "" -#: application/helpers/common_helper.php:2894 +#: application/helpers/common_helper.php:2890 msgid "Excludes all other options if a certain answer is selected - just enter the answer code(s) separated with a semikolon." msgstr "" -#: application/helpers/common_helper.php:2895 +#: application/helpers/common_helper.php:2891 msgid "Exclusive option" msgstr "" -#: application/helpers/common_helper.php:2905 +#: application/helpers/common_helper.php:2901 msgid "If the participant marks all options, uncheck all and check the option set in the \"Exclusive option\" setting" msgstr "" -#: application/helpers/common_helper.php:2906 +#: application/helpers/common_helper.php:2902 msgid "Auto-check exclusive option if all others are checked" msgstr "" -#: application/helpers/common_helper.php:2913 -#: application/helpers/common_helper.php:2925 -#: application/helpers/common_helper.php:2937 -#: application/helpers/common_helper.php:2949 -#: application/helpers/common_helper.php:2993 -#: application/helpers/common_helper.php:3004 -#: application/helpers/common_helper.php:3013 -#: application/helpers/common_helper.php:3022 -#: application/helpers/common_helper.php:3033 -#: application/helpers/common_helper.php:3041 +#: application/helpers/common_helper.php:2909 +#: application/helpers/common_helper.php:2921 +#: application/helpers/common_helper.php:2933 +#: application/helpers/common_helper.php:2945 +#: application/helpers/common_helper.php:2989 +#: application/helpers/common_helper.php:3000 +#: application/helpers/common_helper.php:3009 +#: application/helpers/common_helper.php:3018 +#: application/helpers/common_helper.php:3029 +#: application/helpers/common_helper.php:3037 msgid "Location" msgstr "" -#: application/helpers/common_helper.php:2919 +#: application/helpers/common_helper.php:2915 msgid "Store the city?" msgstr "" -#: application/helpers/common_helper.php:2920 +#: application/helpers/common_helper.php:2916 msgid "Save city" msgstr "" -#: application/helpers/common_helper.php:2931 +#: application/helpers/common_helper.php:2927 msgid "Store the state?" msgstr "" -#: application/helpers/common_helper.php:2932 +#: application/helpers/common_helper.php:2928 msgid "Save state" msgstr "" -#: application/helpers/common_helper.php:2943 +#: application/helpers/common_helper.php:2939 msgid "Store the postal code?" msgstr "" -#: application/helpers/common_helper.php:2944 +#: application/helpers/common_helper.php:2940 msgid "Save postal code" msgstr "" -#: application/helpers/common_helper.php:2955 +#: application/helpers/common_helper.php:2951 msgid "Store the country?" msgstr "" -#: application/helpers/common_helper.php:2956 +#: application/helpers/common_helper.php:2952 msgid "Save country" msgstr "" -#: application/helpers/common_helper.php:2964 +#: application/helpers/common_helper.php:2960 msgid "Show a map in the statistics?" msgstr "" -#: application/helpers/common_helper.php:2965 +#: application/helpers/common_helper.php:2961 msgid "Display map" msgstr "" -#: application/helpers/common_helper.php:2975 +#: application/helpers/common_helper.php:2971 msgid "Display a chart in the statistics?" msgstr "" -#: application/helpers/common_helper.php:2976 +#: application/helpers/common_helper.php:2972 msgid "Display chart" msgstr "" -#: application/helpers/common_helper.php:2985 +#: application/helpers/common_helper.php:2981 msgid "Bar chart" msgstr "" -#: application/helpers/common_helper.php:2985 +#: application/helpers/common_helper.php:2981 msgid "Pie chart" msgstr "" -#: application/helpers/common_helper.php:2986 +#: application/helpers/common_helper.php:2982 msgid "Select the type of chart to be displayed" msgstr "" -#: application/helpers/common_helper.php:2987 +#: application/helpers/common_helper.php:2983 msgid "Chart type" msgstr "" -#: application/helpers/common_helper.php:2996 -#: application/helpers/common_helper.php:3230 -#: application/helpers/common_helper.php:3342 +#: application/helpers/common_helper.php:2992 +#: application/helpers/common_helper.php:3226 +#: application/helpers/common_helper.php:3338 #: application/views/admin/globalSettings_view.php:263 #: application/views/admin/globalSettings_view.php:276 #: application/views/admin/globalSettings_view.php:297 #: application/views/admin/globalSettings_view.php:318 #: application/views/admin/globalSettings_view.php:383 -#: application/views/admin/globalSettings_view.php:513 +#: application/views/admin/globalSettings_view.php:541 msgid "Off" msgstr "" -#: application/helpers/common_helper.php:2997 +#: application/helpers/common_helper.php:2993 msgid "Google Maps" msgstr "" -#: application/helpers/common_helper.php:2999 +#: application/helpers/common_helper.php:2995 msgid "Activate this to show a map above the input field where the user can select a location" msgstr "" -#: application/helpers/common_helper.php:3000 +#: application/helpers/common_helper.php:2996 msgid "Use mapping service" msgstr "" -#: application/helpers/common_helper.php:3008 +#: application/helpers/common_helper.php:3004 msgid "Width of the map in pixel" msgstr "" -#: application/helpers/common_helper.php:3009 +#: application/helpers/common_helper.php:3005 msgid "Map width" msgstr "" -#: application/helpers/common_helper.php:3017 +#: application/helpers/common_helper.php:3013 msgid "Height of the map in pixel" msgstr "" -#: application/helpers/common_helper.php:3018 +#: application/helpers/common_helper.php:3014 msgid "Map height" msgstr "" -#: application/helpers/common_helper.php:3028 +#: application/helpers/common_helper.php:3024 msgid "Get the default location using the user's IP address?" msgstr "" -#: application/helpers/common_helper.php:3029 +#: application/helpers/common_helper.php:3025 msgid "IP as default location" msgstr "" -#: application/helpers/common_helper.php:3036 +#: application/helpers/common_helper.php:3032 msgid "Default coordinates of the map when the page first loads. Format: latitude [space] longtitude" msgstr "" -#: application/helpers/common_helper.php:3037 +#: application/helpers/common_helper.php:3033 msgid "Default position" msgstr "" -#: application/helpers/common_helper.php:3045 +#: application/helpers/common_helper.php:3041 msgid "Map zoom level" msgstr "" -#: application/helpers/common_helper.php:3046 +#: application/helpers/common_helper.php:3042 msgid "Zoom level" msgstr "" -#: application/helpers/common_helper.php:3058 +#: application/helpers/common_helper.php:3054 msgid "Hide the tip that is normally shown with a question" msgstr "" -#: application/helpers/common_helper.php:3059 +#: application/helpers/common_helper.php:3055 msgid "Hide tip" msgstr "" -#: application/helpers/common_helper.php:3069 +#: application/helpers/common_helper.php:3065 msgid "Hide this question at any time. This is useful for including data using answer prefilling." msgstr "" -#: application/helpers/common_helper.php:3070 +#: application/helpers/common_helper.php:3066 msgid "Always hide this question" msgstr "" -#: application/helpers/common_helper.php:3077 +#: application/helpers/common_helper.php:3073 msgid "Limit the number of possible answers" msgstr "" -#: application/helpers/common_helper.php:3078 +#: application/helpers/common_helper.php:3074 msgid "Maximum answers" msgstr "" -#: application/helpers/common_helper.php:3085 +#: application/helpers/common_helper.php:3081 msgid "Maximum sum value of multiple numeric input" msgstr "" -#: application/helpers/common_helper.php:3086 +#: application/helpers/common_helper.php:3082 msgid "Maximum sum value" msgstr "" -#: application/helpers/common_helper.php:3093 +#: application/helpers/common_helper.php:3089 msgid "Maximum value of the numeric input" msgstr "" -#: application/helpers/common_helper.php:3094 -#: application/helpers/common_helper.php:3150 +#: application/helpers/common_helper.php:3090 +#: application/helpers/common_helper.php:3146 msgid "Maximum value" msgstr "" -#: application/helpers/common_helper.php:3109 +#: application/helpers/common_helper.php:3105 msgid "Maximum characters allowed" msgstr "" -#: application/helpers/common_helper.php:3110 +#: application/helpers/common_helper.php:3106 msgid "Maximum characters" msgstr "" -#: application/helpers/common_helper.php:3117 +#: application/helpers/common_helper.php:3113 msgid "Ensure a minimum number of possible answers (0=No limit)" msgstr "" -#: application/helpers/common_helper.php:3118 +#: application/helpers/common_helper.php:3114 msgid "Minimum answers" msgstr "" -#: application/helpers/common_helper.php:3125 +#: application/helpers/common_helper.php:3121 msgid "The sum of the multiple numeric inputs must be greater than this value" msgstr "" -#: application/helpers/common_helper.php:3126 +#: application/helpers/common_helper.php:3122 msgid "Minimum sum value" msgstr "" -#: application/helpers/common_helper.php:3133 +#: application/helpers/common_helper.php:3129 msgid "Minimum value of the numeric input" msgstr "" -#: application/helpers/common_helper.php:3134 -#: application/helpers/common_helper.php:3158 +#: application/helpers/common_helper.php:3130 +#: application/helpers/common_helper.php:3154 msgid "Minimum value" msgstr "" -#: application/helpers/common_helper.php:3149 +#: application/helpers/common_helper.php:3145 msgid "Maximum value for array(mult-flexible) question type" msgstr "" -#: application/helpers/common_helper.php:3157 +#: application/helpers/common_helper.php:3153 msgid "Minimum value for array(multi-flexible) question type" msgstr "" -#: application/helpers/common_helper.php:3165 -#: application/helpers/common_helper.php:3166 +#: application/helpers/common_helper.php:3161 +#: application/helpers/common_helper.php:3162 msgid "Step value" msgstr "" -#: application/helpers/common_helper.php:3176 +#: application/helpers/common_helper.php:3172 msgid "Use checkbox layout" msgstr "" -#: application/helpers/common_helper.php:3177 +#: application/helpers/common_helper.php:3173 msgid "Checkbox layout" msgstr "" -#: application/helpers/common_helper.php:3187 +#: application/helpers/common_helper.php:3183 msgid "Present answer options in reverse order" msgstr "" -#: application/helpers/common_helper.php:3188 +#: application/helpers/common_helper.php:3184 msgid "Reverse answer order" msgstr "" -#: application/helpers/common_helper.php:3207 +#: application/helpers/common_helper.php:3203 msgid "Restrict input to integer values" msgstr "" -#: application/helpers/common_helper.php:3208 +#: application/helpers/common_helper.php:3204 msgid "Integer only" msgstr "" -#: application/helpers/common_helper.php:3220 +#: application/helpers/common_helper.php:3216 msgid "Allow only numerical input" msgstr "" -#: application/helpers/common_helper.php:3221 +#: application/helpers/common_helper.php:3217 msgid "Numbers only" msgstr "" -#: application/helpers/common_helper.php:3231 +#: application/helpers/common_helper.php:3227 msgid "Rows" msgstr "" -#: application/helpers/common_helper.php:3232 +#: application/helpers/common_helper.php:3228 msgid "Columns" msgstr "" -#: application/helpers/common_helper.php:3233 +#: application/helpers/common_helper.php:3229 msgid "Both rows and columns" msgstr "" -#: application/helpers/common_helper.php:3236 +#: application/helpers/common_helper.php:3232 msgid "Show totals for either rows, columns or both rows and columns" msgstr "" -#: application/helpers/common_helper.php:3237 +#: application/helpers/common_helper.php:3233 msgid "Show totals for" msgstr "" -#: application/helpers/common_helper.php:3250 +#: application/helpers/common_helper.php:3246 msgid "Show grand total for either columns or rows" msgstr "" -#: application/helpers/common_helper.php:3251 +#: application/helpers/common_helper.php:3247 msgid "Show grand total" msgstr "" -#: application/helpers/common_helper.php:3262 +#: application/helpers/common_helper.php:3258 msgid "Present as text input boxes instead of dropdown lists" msgstr "" -#: application/helpers/common_helper.php:3263 +#: application/helpers/common_helper.php:3259 msgid "Text inputs" msgstr "" -#: application/helpers/common_helper.php:3273 +#: application/helpers/common_helper.php:3269 msgid "Make the 'Other:' comment field mandatory when the 'Other:' option is active" msgstr "" -#: application/helpers/common_helper.php:3274 +#: application/helpers/common_helper.php:3270 msgid "'Other:' comment mandatory" msgstr "" -#: application/helpers/common_helper.php:3284 +#: application/helpers/common_helper.php:3280 msgid "Allow only numerical input for 'Other' text" msgstr "" -#: application/helpers/common_helper.php:3285 +#: application/helpers/common_helper.php:3281 msgid "Numbers only for 'Other'" msgstr "" -#: application/helpers/common_helper.php:3293 +#: application/helpers/common_helper.php:3289 msgid "Replaces the label of the 'Other:' answer option with a custom text" msgstr "" -#: application/helpers/common_helper.php:3294 +#: application/helpers/common_helper.php:3290 msgid "Label for 'Other:' option" msgstr "" -#: application/helpers/common_helper.php:3304 +#: application/helpers/common_helper.php:3300 msgid "Insert a page break before this question in printable view by setting this to Yes." msgstr "" -#: application/helpers/common_helper.php:3305 +#: application/helpers/common_helper.php:3301 msgid "Insert page break in printable view" msgstr "" -#: application/helpers/common_helper.php:3313 +#: application/helpers/common_helper.php:3309 msgid "Add a prefix to the answer field" msgstr "" -#: application/helpers/common_helper.php:3314 +#: application/helpers/common_helper.php:3310 msgid "Answer prefix" msgstr "" -#: application/helpers/common_helper.php:3323 +#: application/helpers/common_helper.php:3319 msgid "In the printable version replace the relevance equation with this explanation text." msgstr "" -#: application/helpers/common_helper.php:3324 +#: application/helpers/common_helper.php:3320 msgid "Relevance help for printable survey" msgstr "" -#: application/helpers/common_helper.php:3334 +#: application/helpers/common_helper.php:3330 msgid "Show statistics of this question in the public statistics page" msgstr "" -#: application/helpers/common_helper.php:3335 +#: application/helpers/common_helper.php:3331 msgid "Show in public statistics" msgstr "" -#: application/helpers/common_helper.php:3343 +#: application/helpers/common_helper.php:3339 msgid "Randomize on each page load" msgstr "" -#: application/helpers/common_helper.php:3347 +#: application/helpers/common_helper.php:3343 msgid "Present subquestions/answer options in random order" msgstr "" -#: application/helpers/common_helper.php:3348 +#: application/helpers/common_helper.php:3344 msgid "Random order" msgstr "" -#: application/helpers/common_helper.php:3371 +#: application/helpers/common_helper.php:3367 msgid "Show javascript alert" msgstr "" -#: application/helpers/common_helper.php:3372 +#: application/helpers/common_helper.php:3368 msgid "Show an alert if answers exceeds the number of max answers" msgstr "" -#: application/helpers/common_helper.php:3381 +#: application/helpers/common_helper.php:3377 msgid "Same height for all answer options" msgstr "" -#: application/helpers/common_helper.php:3382 +#: application/helpers/common_helper.php:3378 msgid "Force each answer option to have the same height" msgstr "" -#: application/helpers/common_helper.php:3391 +#: application/helpers/common_helper.php:3387 msgid "Same height for lists" msgstr "" -#: application/helpers/common_helper.php:3392 +#: application/helpers/common_helper.php:3388 msgid "Force the choice list and the rank list to have the same height" msgstr "" -#: application/helpers/common_helper.php:3399 +#: application/helpers/common_helper.php:3395 msgid "Get order from previous question" msgstr "" -#: application/helpers/common_helper.php:3400 +#: application/helpers/common_helper.php:3396 msgid "Enter question ID to get subquestion order from a previous question" msgstr "" -#: application/helpers/common_helper.php:3404 -#: application/helpers/common_helper.php:3415 -#: application/helpers/common_helper.php:3423 -#: application/helpers/common_helper.php:3431 -#: application/helpers/common_helper.php:3439 -#: application/helpers/common_helper.php:3447 -#: application/helpers/common_helper.php:3472 -#: application/helpers/common_helper.php:3485 -#: application/helpers/common_helper.php:3496 +#: application/helpers/common_helper.php:3400 +#: application/helpers/common_helper.php:3411 +#: application/helpers/common_helper.php:3419 +#: application/helpers/common_helper.php:3427 +#: application/helpers/common_helper.php:3435 +#: application/helpers/common_helper.php:3443 +#: application/helpers/common_helper.php:3468 +#: application/helpers/common_helper.php:3481 +#: application/helpers/common_helper.php:3492 msgid "Slider" msgstr "" -#: application/helpers/common_helper.php:3410 -#: application/helpers/common_helper.php:3411 -#: application/helpers/common_helper.php:3467 -#: application/helpers/common_helper.php:3468 +#: application/helpers/common_helper.php:3406 +#: application/helpers/common_helper.php:3407 +#: application/helpers/common_helper.php:3463 +#: application/helpers/common_helper.php:3464 msgid "Use slider layout" msgstr "" -#: application/helpers/common_helper.php:3418 -#: application/helpers/common_helper.php:3419 +#: application/helpers/common_helper.php:3414 +msgid "You can use Expression manager, but this must be a number before showing the page else set to 0. If minimum value is not set, this value is used." +msgstr "" + +#: application/helpers/common_helper.php:3415 msgid "Slider minimum value" msgstr "" -#: application/helpers/common_helper.php:3426 -#: application/helpers/common_helper.php:3427 +#: application/helpers/common_helper.php:3422 +msgid "You can use Expression manager, but this must be a number before showing the page else set to 100. If maximum value is not set, this value is used." +msgstr "" + +#: application/helpers/common_helper.php:3423 msgid "Slider maximum value" msgstr "" -#: application/helpers/common_helper.php:3434 -#: application/helpers/common_helper.php:3435 +#: application/helpers/common_helper.php:3430 +msgid "You can use Expression manager, but this must be a number before showing the page else set to 1." +msgstr "" + +#: application/helpers/common_helper.php:3431 msgid "Slider accuracy" msgstr "" -#: application/helpers/common_helper.php:3442 -msgid "Slider start as this value (this will set the initial value)." +#: application/helpers/common_helper.php:3438 +msgid "Slider start as this value (this will set the initial value). You can use Expression manager, but this must be a number before showing the page." msgstr "" -#: application/helpers/common_helper.php:3443 +#: application/helpers/common_helper.php:3439 msgid "Slider initial value" msgstr "" -#: application/helpers/common_helper.php:3453 +#: application/helpers/common_helper.php:3449 msgid "The handle is displayed at the middle of the slider except if Slider initial value is set (this will not set the initial value)." msgstr "" -#: application/helpers/common_helper.php:3454 +#: application/helpers/common_helper.php:3450 msgid "Slider starts at the middle position" msgstr "" -#: application/helpers/common_helper.php:3463 +#: application/helpers/common_helper.php:3459 msgid "Yes - stars" msgstr "" -#: application/helpers/common_helper.php:3464 +#: application/helpers/common_helper.php:3460 msgid "Yes - slider with emoticon" msgstr "" -#: application/helpers/common_helper.php:3480 +#: application/helpers/common_helper.php:3476 msgid "Add a button to reset the slider. If you choose an start value, it reset at start value, else empty the answer." msgstr "" -#: application/helpers/common_helper.php:3481 +#: application/helpers/common_helper.php:3477 msgid "Allow reset the slider" msgstr "" -#: application/helpers/common_helper.php:3491 +#: application/helpers/common_helper.php:3487 msgid "Display min and max value under the slider" msgstr "" -#: application/helpers/common_helper.php:3492 +#: application/helpers/common_helper.php:3488 msgid "Display slider min and max value" msgstr "" -#: application/helpers/common_helper.php:3499 +#: application/helpers/common_helper.php:3495 msgid "Answer|Left-slider-text|Right-slider-text separator character" msgstr "" -#: application/helpers/common_helper.php:3500 +#: application/helpers/common_helper.php:3496 msgid "Slider left/right text separator" msgstr "" -#: application/helpers/common_helper.php:3508 +#: application/helpers/common_helper.php:3504 msgid "Add a suffix to the answer field" msgstr "" -#: application/helpers/common_helper.php:3509 +#: application/helpers/common_helper.php:3505 msgid "Answer suffix" msgstr "" -#: application/helpers/common_helper.php:3516 +#: application/helpers/common_helper.php:3512 msgid "Width of text input box" msgstr "" -#: application/helpers/common_helper.php:3517 +#: application/helpers/common_helper.php:3513 msgid "Input box width" msgstr "" -#: application/helpers/common_helper.php:3527 +#: application/helpers/common_helper.php:3523 msgid "Present dropdown control(s) instead of list of radio buttons" msgstr "" -#: application/helpers/common_helper.php:3528 +#: application/helpers/common_helper.php:3524 msgid "Use dropdown presentation" msgstr "" -#: application/helpers/common_helper.php:3537 +#: application/helpers/common_helper.php:3533 msgid "For list dropdown boxes, show up to this many rows" msgstr "" -#: application/helpers/common_helper.php:3538 +#: application/helpers/common_helper.php:3534 msgid "Height of dropdown" msgstr "" -#: application/helpers/common_helper.php:3546 +#: application/helpers/common_helper.php:3542 msgid "Order - like 3)" msgstr "" -#: application/helpers/common_helper.php:3549 +#: application/helpers/common_helper.php:3545 msgid "Accelerator keys for list items" msgstr "" -#: application/helpers/common_helper.php:3550 +#: application/helpers/common_helper.php:3546 msgid "Prefix for list items" msgstr "" -#: application/helpers/common_helper.php:3557 +#: application/helpers/common_helper.php:3553 #: application/views/admin/authentication/login.php:43 #: application/views/admin/user/personalsettings.php:29 #: application/views/admin/user/personalsettings.php:41 @@ -6300,606 +6359,606 @@ msgstr "" msgid "Default" msgstr "" -#: application/helpers/common_helper.php:3558 +#: application/helpers/common_helper.php:3554 msgid "Nominal" msgstr "" -#: application/helpers/common_helper.php:3559 +#: application/helpers/common_helper.php:3555 msgid "Ordinal" msgstr "" -#: application/helpers/common_helper.php:3560 +#: application/helpers/common_helper.php:3556 msgid "Scale" msgstr "" -#: application/helpers/common_helper.php:3562 +#: application/helpers/common_helper.php:3558 msgid "Set a specific SPSS export scale type for this question" msgstr "" -#: application/helpers/common_helper.php:3563 +#: application/helpers/common_helper.php:3559 msgid "SPSS export scale type" msgstr "" -#: application/helpers/common_helper.php:3572 +#: application/helpers/common_helper.php:3568 msgid "Replace choice header (default: \"%s\")" msgstr "" -#: application/helpers/common_helper.php:3573 +#: application/helpers/common_helper.php:3569 msgid "Choice header" msgstr "" -#: application/helpers/common_helper.php:3582 +#: application/helpers/common_helper.php:3578 msgid "Replace rank header (default: \"%s\")" msgstr "" -#: application/helpers/common_helper.php:3583 +#: application/helpers/common_helper.php:3579 msgid "Rank header" msgstr "" -#: application/helpers/common_helper.php:3588 -#: application/helpers/common_helper.php:3596 -#: application/helpers/common_helper.php:3608 -#: application/helpers/common_helper.php:3619 -#: application/helpers/common_helper.php:3630 -#: application/helpers/common_helper.php:3639 -#: application/helpers/common_helper.php:3647 -#: application/helpers/common_helper.php:3655 -#: application/helpers/common_helper.php:3664 -#: application/helpers/common_helper.php:3672 -#: application/helpers/common_helper.php:3680 -#: application/helpers/common_helper.php:3688 -#: application/helpers/common_helper.php:3697 -#: application/helpers/common_helper.php:3705 -#: application/helpers/common_helper.php:3713 -#: application/helpers/common_helper.php:3721 -#: application/helpers/common_helper.php:3730 +#: application/helpers/common_helper.php:3584 +#: application/helpers/common_helper.php:3592 +#: application/helpers/common_helper.php:3604 +#: application/helpers/common_helper.php:3615 +#: application/helpers/common_helper.php:3626 +#: application/helpers/common_helper.php:3635 +#: application/helpers/common_helper.php:3643 +#: application/helpers/common_helper.php:3651 +#: application/helpers/common_helper.php:3660 +#: application/helpers/common_helper.php:3668 +#: application/helpers/common_helper.php:3676 +#: application/helpers/common_helper.php:3684 +#: application/helpers/common_helper.php:3693 +#: application/helpers/common_helper.php:3701 +#: application/helpers/common_helper.php:3709 +#: application/helpers/common_helper.php:3717 +#: application/helpers/common_helper.php:3726 msgid "Timer" msgstr "" -#: application/helpers/common_helper.php:3591 +#: application/helpers/common_helper.php:3587 msgid "Limit time to answer question (in seconds)" msgstr "" -#: application/helpers/common_helper.php:3592 +#: application/helpers/common_helper.php:3588 msgid "Time limit" msgstr "" -#: application/helpers/common_helper.php:3599 +#: application/helpers/common_helper.php:3595 msgid "Warn and move on" msgstr "" -#: application/helpers/common_helper.php:3600 +#: application/helpers/common_helper.php:3596 msgid "Move on without warning" msgstr "" -#: application/helpers/common_helper.php:3601 +#: application/helpers/common_helper.php:3597 msgid "Disable only" msgstr "" -#: application/helpers/common_helper.php:3603 +#: application/helpers/common_helper.php:3599 msgid "Action to perform when time limit is up" msgstr "" -#: application/helpers/common_helper.php:3604 +#: application/helpers/common_helper.php:3600 msgid "Time limit action" msgstr "" -#: application/helpers/common_helper.php:3614 +#: application/helpers/common_helper.php:3610 msgid "Disable the next button until time limit expires" msgstr "" -#: application/helpers/common_helper.php:3615 +#: application/helpers/common_helper.php:3611 msgid "Time limit disable next" msgstr "" -#: application/helpers/common_helper.php:3625 +#: application/helpers/common_helper.php:3621 msgid "Disable the prev button until the time limit expires" msgstr "" -#: application/helpers/common_helper.php:3626 +#: application/helpers/common_helper.php:3622 msgid "Time limit disable prev" msgstr "" -#: application/helpers/common_helper.php:3634 +#: application/helpers/common_helper.php:3630 msgid "The text message that displays in the countdown timer during the countdown" msgstr "" -#: application/helpers/common_helper.php:3635 +#: application/helpers/common_helper.php:3631 msgid "Time limit countdown message" msgstr "" -#: application/helpers/common_helper.php:3642 +#: application/helpers/common_helper.php:3638 msgid "CSS Style for the message that displays in the countdown timer during the countdown" msgstr "" -#: application/helpers/common_helper.php:3643 +#: application/helpers/common_helper.php:3639 msgid "Time limit timer CSS style" msgstr "" -#: application/helpers/common_helper.php:3650 +#: application/helpers/common_helper.php:3646 msgid "Display the 'time limit expiry message' for this many seconds before performing the 'time limit action' (defaults to 1 second if left blank)" msgstr "" -#: application/helpers/common_helper.php:3651 +#: application/helpers/common_helper.php:3647 msgid "Time limit expiry message display time" msgstr "" -#: application/helpers/common_helper.php:3659 +#: application/helpers/common_helper.php:3655 msgid "The message to display when the time limit has expired (a default message will display if this setting is left blank)" msgstr "" -#: application/helpers/common_helper.php:3660 +#: application/helpers/common_helper.php:3656 msgid "Time limit expiry message" msgstr "" -#: application/helpers/common_helper.php:3667 +#: application/helpers/common_helper.php:3663 msgid "CSS style for the 'time limit expiry message'" msgstr "" -#: application/helpers/common_helper.php:3668 +#: application/helpers/common_helper.php:3664 msgid "Time limit message CSS style" msgstr "" -#: application/helpers/common_helper.php:3675 +#: application/helpers/common_helper.php:3671 msgid "Display a 'time limit warning' when there are this many seconds remaining in the countdown (warning will not display if left blank)" msgstr "" -#: application/helpers/common_helper.php:3676 +#: application/helpers/common_helper.php:3672 msgid "1st time limit warning message timer" msgstr "" -#: application/helpers/common_helper.php:3683 +#: application/helpers/common_helper.php:3679 msgid "The 'time limit warning' will stay visible for this many seconds (will not turn off if this setting is left blank)" msgstr "" -#: application/helpers/common_helper.php:3684 +#: application/helpers/common_helper.php:3680 msgid "1st time limit warning message display time" msgstr "" -#: application/helpers/common_helper.php:3692 +#: application/helpers/common_helper.php:3688 msgid "The message to display as a 'time limit warning' (a default warning will display if this is left blank)" msgstr "" -#: application/helpers/common_helper.php:3693 +#: application/helpers/common_helper.php:3689 msgid "1st time limit warning message" msgstr "" -#: application/helpers/common_helper.php:3700 +#: application/helpers/common_helper.php:3696 msgid "CSS style used when the 'time limit warning' message is displayed" msgstr "" -#: application/helpers/common_helper.php:3701 +#: application/helpers/common_helper.php:3697 msgid "1st time limit warning CSS style" msgstr "" -#: application/helpers/common_helper.php:3708 +#: application/helpers/common_helper.php:3704 msgid "Display the 2nd 'time limit warning' when there are this many seconds remaining in the countdown (warning will not display if left blank)" msgstr "" -#: application/helpers/common_helper.php:3709 +#: application/helpers/common_helper.php:3705 msgid "2nd time limit warning message timer" msgstr "" -#: application/helpers/common_helper.php:3716 +#: application/helpers/common_helper.php:3712 msgid "The 2nd 'time limit warning' will stay visible for this many seconds (will not turn off if this setting is left blank)" msgstr "" -#: application/helpers/common_helper.php:3717 +#: application/helpers/common_helper.php:3713 msgid "2nd time limit warning message display time" msgstr "" -#: application/helpers/common_helper.php:3725 +#: application/helpers/common_helper.php:3721 msgid "The 2nd message to display as a 'time limit warning' (a default warning will display if this is left blank)" msgstr "" -#: application/helpers/common_helper.php:3726 +#: application/helpers/common_helper.php:3722 msgid "2nd time limit warning message" msgstr "" -#: application/helpers/common_helper.php:3733 +#: application/helpers/common_helper.php:3729 msgid "CSS style used when the 2nd 'time limit warning' message is displayed" msgstr "" -#: application/helpers/common_helper.php:3734 +#: application/helpers/common_helper.php:3730 msgid "2nd time limit warning CSS style" msgstr "" -#: application/helpers/common_helper.php:3741 +#: application/helpers/common_helper.php:3737 msgid "Specify a custom date/time format (the d/dd m/mm yy/yyyy H/HH M/MM formats and \"-./: \" characters are allowed for day/month/year/hour/minutes without or with leading zero respectively. Defaults to survey's date format" msgstr "" -#: application/helpers/common_helper.php:3742 +#: application/helpers/common_helper.php:3738 msgid "Date/Time format" msgstr "" -#: application/helpers/common_helper.php:3750 +#: application/helpers/common_helper.php:3746 msgid "Minute step interval when using select boxes" msgstr "" -#: application/helpers/common_helper.php:3751 +#: application/helpers/common_helper.php:3747 msgid "Minute step interval" msgstr "" -#: application/helpers/common_helper.php:3758 +#: application/helpers/common_helper.php:3754 msgid "Short names" msgstr "" -#: application/helpers/common_helper.php:3759 +#: application/helpers/common_helper.php:3755 msgid "Full names" msgstr "" -#: application/helpers/common_helper.php:3760 +#: application/helpers/common_helper.php:3756 msgid "Numbers" msgstr "" -#: application/helpers/common_helper.php:3762 +#: application/helpers/common_helper.php:3758 msgid "Change the display style of the month when using select boxes" msgstr "" -#: application/helpers/common_helper.php:3763 +#: application/helpers/common_helper.php:3759 msgid "Month display style" msgstr "" -#: application/helpers/common_helper.php:3767 -#: application/helpers/common_helper.php:3778 +#: application/helpers/common_helper.php:3763 +#: application/helpers/common_helper.php:3774 msgid "File metadata" msgstr "" -#: application/helpers/common_helper.php:3773 +#: application/helpers/common_helper.php:3769 msgid "Is the participant required to give a title to the uploaded file?" msgstr "" -#: application/helpers/common_helper.php:3774 +#: application/helpers/common_helper.php:3770 msgid "Show title" msgstr "" -#: application/helpers/common_helper.php:3784 +#: application/helpers/common_helper.php:3780 msgid "Is the participant required to give a comment to the uploaded file?" msgstr "" -#: application/helpers/common_helper.php:3785 +#: application/helpers/common_helper.php:3781 msgid "Show comment" msgstr "" -#: application/helpers/common_helper.php:3794 +#: application/helpers/common_helper.php:3790 msgid "The participant cannot upload a single file larger than this size" msgstr "" -#: application/helpers/common_helper.php:3795 +#: application/helpers/common_helper.php:3791 msgid "Maximum file size allowed (in KB)" msgstr "" -#: application/helpers/common_helper.php:3803 +#: application/helpers/common_helper.php:3799 msgid "Maximum number of files that the participant can upload for this question" msgstr "" -#: application/helpers/common_helper.php:3804 +#: application/helpers/common_helper.php:3800 msgid "Max number of files" msgstr "" -#: application/helpers/common_helper.php:3812 +#: application/helpers/common_helper.php:3808 msgid "Minimum number of files that the participant must upload for this question" msgstr "" -#: application/helpers/common_helper.php:3813 +#: application/helpers/common_helper.php:3809 msgid "Min number of files" msgstr "" -#: application/helpers/common_helper.php:3821 +#: application/helpers/common_helper.php:3817 msgid "Allowed file types in comma separated format. e.g. pdf,doc,odt" msgstr "" -#: application/helpers/common_helper.php:3822 +#: application/helpers/common_helper.php:3818 msgid "Allowed file types" msgstr "" -#: application/helpers/common_helper.php:3829 +#: application/helpers/common_helper.php:3825 msgid "Place questions into a specified randomization group, all questions included in the specified group will appear in a random order" msgstr "" -#: application/helpers/common_helper.php:3830 +#: application/helpers/common_helper.php:3826 msgid "Randomization group name" msgstr "" -#: application/helpers/common_helper.php:3844 +#: application/helpers/common_helper.php:3840 msgid "Is no answer (missing) allowed when either 'Equals sum value' or 'Minimum sum value' are set?" msgstr "" -#: application/helpers/common_helper.php:3845 +#: application/helpers/common_helper.php:3841 msgid "Value range allows missing" msgstr "" -#: application/helpers/common_helper.php:3989 +#: application/helpers/common_helper.php:3977 msgid "Email was not sent because demo-mode is activated." msgstr "" -#: application/helpers/common_helper.php:4123 +#: application/helpers/common_helper.php:4111 msgid "SMTP debug output:" msgstr "" -#: application/helpers/common_helper.php:5016 -#: application/helpers/replacements_helper.php:565 +#: application/helpers/common_helper.php:4997 +#: application/helpers/replacements_helper.php:594 #: application/models/Token.php:40 #: application/views/admin/export/exportresults_view.php:134 #: application/views/admin/saved/savedlist_view.php:10 -#: application/views/admin/token/browse.php:117 +#: application/views/admin/token/browse.php:111 msgid "Email address" msgstr "" -#: application/helpers/common_helper.php:5021 application/models/Token.php:41 -#: application/views/admin/token/browse.php:117 +#: application/helpers/common_helper.php:5002 application/models/Token.php:41 +#: application/views/admin/token/browse.php:111 msgid "Email status" msgstr "" -#: application/helpers/common_helper.php:5031 application/models/Token.php:43 +#: application/helpers/common_helper.php:5012 application/models/Token.php:43 msgid "Language code" msgstr "" -#: application/helpers/common_helper.php:5036 application/models/Token.php:45 +#: application/helpers/common_helper.php:5017 application/models/Token.php:45 msgid "Invitation sent date" msgstr "" -#: application/helpers/common_helper.php:5041 application/models/Token.php:46 +#: application/helpers/common_helper.php:5022 application/models/Token.php:46 msgid "Last reminder sent date" msgstr "" -#: application/helpers/common_helper.php:5046 application/models/Token.php:47 +#: application/helpers/common_helper.php:5027 application/models/Token.php:47 msgid "Total numbers of sent reminders" msgstr "" -#: application/helpers/common_helper.php:5051 application/models/Token.php:49 -#: application/views/admin/token/browse.php:117 +#: application/helpers/common_helper.php:5032 application/models/Token.php:49 +#: application/views/admin/token/browse.php:111 msgid "Uses left" msgstr "" -#: application/helpers/common_helper.php:5261 +#: application/helpers/common_helper.php:5242 msgid "Error when checking for new version: %s" msgstr "" -#: application/helpers/common_helper.php:6018 +#: application/helpers/common_helper.php:6050 msgid "You are not allowed dump the database!" msgstr "" -#: application/helpers/common_helper.php:6023 +#: application/helpers/common_helper.php:6055 msgid "You are not allowed export a label set!" msgstr "" -#: application/helpers/common_helper.php:6028 +#: application/helpers/common_helper.php:6060 msgid "You are not allowed to change user data!" msgstr "" -#: application/helpers/common_helper.php:6033 +#: application/helpers/common_helper.php:6065 msgid "You are not allowed to create new surveys!" msgstr "" -#: application/helpers/common_helper.php:6038 +#: application/helpers/common_helper.php:6070 msgid "You are not allowed to delete this survey!" msgstr "" -#: application/helpers/common_helper.php:6043 +#: application/helpers/common_helper.php:6075 msgid "You are not allowed to add new questions for this survey!" msgstr "" -#: application/helpers/common_helper.php:6048 +#: application/helpers/common_helper.php:6080 msgid "You are not allowed to activate this survey!" msgstr "" -#: application/helpers/common_helper.php:6053 +#: application/helpers/common_helper.php:6085 msgid "You are not allowed to stop this survey!" msgstr "" -#: application/helpers/common_helper.php:6058 +#: application/helpers/common_helper.php:6090 msgid "You are not allowed to add a group to this survey!" msgstr "" -#: application/helpers/common_helper.php:6064 +#: application/helpers/common_helper.php:6096 msgid "You are not allowed to order groups in this survey!" msgstr "" -#: application/helpers/common_helper.php:6070 +#: application/helpers/common_helper.php:6102 msgid "You are not allowed to edit this survey!" msgstr "" -#: application/helpers/common_helper.php:6075 +#: application/helpers/common_helper.php:6107 msgid "You are not allowed to edit groups in this survey!" msgstr "" -#: application/helpers/common_helper.php:6080 +#: application/helpers/common_helper.php:6112 msgid "You are not allowed to browse responses!" msgstr "" -#: application/helpers/common_helper.php:6085 +#: application/helpers/common_helper.php:6117 msgid "You are not allowed to set assessment rules!" msgstr "" -#: application/helpers/common_helper.php:6090 +#: application/helpers/common_helper.php:6122 msgid "You are not allowed to delete this group!" msgstr "" -#: application/helpers/common_helper.php:6095 +#: application/helpers/common_helper.php:6127 msgid "You are not allowed to import a survey!" msgstr "" -#: application/helpers/common_helper.php:6101 +#: application/helpers/common_helper.php:6133 msgid "You are not allowed to import a group!" msgstr "" -#: application/helpers/common_helper.php:6106 +#: application/helpers/common_helper.php:6138 msgid "You are not allowed to to import a question!" msgstr "" -#: application/helpers/common_helper.php:6115 -#: application/helpers/common_helper.php:6120 +#: application/helpers/common_helper.php:6147 +#: application/helpers/common_helper.php:6152 msgid "Security alert" msgstr "" -#: application/helpers/common_helper.php:6115 -#: application/helpers/common_helper.php:6120 +#: application/helpers/common_helper.php:6147 +#: application/helpers/common_helper.php:6152 msgid "Someone may be trying to use your LimeSurvey session (CSRF attack suspected). If you just clicked on a malicious link, please report this to your system administrator." msgstr "" -#: application/helpers/common_helper.php:6115 -#: application/helpers/common_helper.php:6120 +#: application/helpers/common_helper.php:6147 +#: application/helpers/common_helper.php:6152 msgid "Also this problem can occur when you are working/editing in LimeSurvey in several browser windows/tabs at the same time." msgstr "" -#: application/helpers/common_helper.php:6125 +#: application/helpers/common_helper.php:6157 msgid "You are not allowed to perform this operation!" msgstr "" -#: application/helpers/common_helper.php:6879 +#: application/helpers/common_helper.php:6911 msgid "SQL command failed: %s" msgstr "" -#: application/helpers/common_helper.php:7305 +#: application/helpers/common_helper.php:7357 msgid "ARMSCII-8 Armenian" msgstr "" -#: application/helpers/common_helper.php:7306 +#: application/helpers/common_helper.php:7358 msgid "US ASCII" msgstr "" -#: application/helpers/common_helper.php:7307 +#: application/helpers/common_helper.php:7359 msgid "Automatic" msgstr "" -#: application/helpers/common_helper.php:7308 +#: application/helpers/common_helper.php:7360 msgid "Big5 Traditional Chinese" msgstr "" -#: application/helpers/common_helper.php:7309 +#: application/helpers/common_helper.php:7361 msgid "Binary pseudo charset" msgstr "" -#: application/helpers/common_helper.php:7310 +#: application/helpers/common_helper.php:7362 msgid "Windows Central European (Windows-1250)" msgstr "" -#: application/helpers/common_helper.php:7311 +#: application/helpers/common_helper.php:7363 msgid "Windows Cyrillic (Windows-1251)" msgstr "" -#: application/helpers/common_helper.php:7312 +#: application/helpers/common_helper.php:7364 msgid "Windows Arabic (Windows-1256)" msgstr "" -#: application/helpers/common_helper.php:7313 +#: application/helpers/common_helper.php:7365 msgid "Windows Baltic (Windows-1257)" msgstr "" -#: application/helpers/common_helper.php:7314 +#: application/helpers/common_helper.php:7366 msgid "DOS West European (cp850)" msgstr "" -#: application/helpers/common_helper.php:7315 +#: application/helpers/common_helper.php:7367 msgid "DOS Central European (cp852)" msgstr "" -#: application/helpers/common_helper.php:7316 +#: application/helpers/common_helper.php:7368 msgid "DOS Cyrillic (cp866)" msgstr "" -#: application/helpers/common_helper.php:7317 +#: application/helpers/common_helper.php:7369 msgid "Windows-31J - SJIS for Windows Japanese (cp932)" msgstr "" -#: application/helpers/common_helper.php:7318 +#: application/helpers/common_helper.php:7370 msgid "DEC West European" msgstr "" -#: application/helpers/common_helper.php:7319 +#: application/helpers/common_helper.php:7371 msgid "UJIS for Windows Japanese" msgstr "" -#: application/helpers/common_helper.php:7320 +#: application/helpers/common_helper.php:7372 msgid "EUC-KR Korean" msgstr "" -#: application/helpers/common_helper.php:7321 +#: application/helpers/common_helper.php:7373 msgid "GB2312 Simplified Chinese" msgstr "" -#: application/helpers/common_helper.php:7322 +#: application/helpers/common_helper.php:7374 msgid "GBK Simplified Chinese" msgstr "" -#: application/helpers/common_helper.php:7323 +#: application/helpers/common_helper.php:7375 msgid "GEOSTD8 Georgian" msgstr "" -#: application/helpers/common_helper.php:7324 +#: application/helpers/common_helper.php:7376 msgid "ISO 8859-7 Greek" msgstr "" -#: application/helpers/common_helper.php:7325 +#: application/helpers/common_helper.php:7377 msgid "ISO 8859-8 Hebrew" msgstr "" -#: application/helpers/common_helper.php:7326 +#: application/helpers/common_helper.php:7378 msgid "HP West European" msgstr "" -#: application/helpers/common_helper.php:7327 +#: application/helpers/common_helper.php:7379 msgid "DOS Kamenicky Czech-Slovak (cp895)" msgstr "" -#: application/helpers/common_helper.php:7328 +#: application/helpers/common_helper.php:7380 msgid "KOI8-R Relcom Russian" msgstr "" -#: application/helpers/common_helper.php:7329 +#: application/helpers/common_helper.php:7381 msgid "KOI8-U Ukrainian" msgstr "" -#: application/helpers/common_helper.php:7330 +#: application/helpers/common_helper.php:7382 msgid "ISO 8859-1 West European (latin1)" msgstr "" -#: application/helpers/common_helper.php:7331 +#: application/helpers/common_helper.php:7383 msgid "ISO 8859-2 Central European (latin2)" msgstr "" -#: application/helpers/common_helper.php:7332 +#: application/helpers/common_helper.php:7384 msgid "ISO 8859-9 Turkish (latin5)" msgstr "" -#: application/helpers/common_helper.php:7333 +#: application/helpers/common_helper.php:7385 msgid "ISO 8859-13 Baltic (latin7)" msgstr "" -#: application/helpers/common_helper.php:7334 +#: application/helpers/common_helper.php:7386 msgid "Mac Central European" msgstr "" -#: application/helpers/common_helper.php:7335 +#: application/helpers/common_helper.php:7387 msgid "Mac West European" msgstr "" -#: application/helpers/common_helper.php:7336 +#: application/helpers/common_helper.php:7388 msgid "Shift-JIS Japanese" msgstr "" -#: application/helpers/common_helper.php:7337 +#: application/helpers/common_helper.php:7389 msgid "7bit Swedish" msgstr "" -#: application/helpers/common_helper.php:7338 +#: application/helpers/common_helper.php:7390 msgid "TIS620 Thai" msgstr "" -#: application/helpers/common_helper.php:7339 +#: application/helpers/common_helper.php:7391 msgid "UCS-2 Unicode" msgstr "" -#: application/helpers/common_helper.php:7340 +#: application/helpers/common_helper.php:7392 msgid "EUC-JP Japanese" msgstr "" -#: application/helpers/common_helper.php:7341 +#: application/helpers/common_helper.php:7393 msgid "UTF-8 Unicode" msgstr "" -#: application/helpers/export_helper.php:1288 +#: application/helpers/export_helper.php:1289 msgid "Only answer the following question if:" msgstr "" @@ -7200,322 +7259,342 @@ msgid "Tangent" msgstr "" #: application/helpers/expressions/em_core_helper.php:230 -msgid "Return current UNIX timestamp" +msgid "Convert a numerical value using a inputTable and outputTable of numerical values" msgstr "" #: application/helpers/expressions/em_core_helper.php:231 -msgid "Strip whitespace (or other characters) from the beginning and end of a string" +msgid "Return current UNIX timestamp" msgstr "" #: application/helpers/expressions/em_core_helper.php:232 -msgid "Uppercase the first character of each word in a string" +msgid "Strip whitespace (or other characters) from the beginning and end of a string" msgstr "" #: application/helpers/expressions/em_core_helper.php:233 +msgid "Uppercase the first character of each word in a string" +msgstr "" + +#: application/helpers/expressions/em_core_helper.php:234 msgid "Returns true if all non-empty responses are unique" msgstr "" -#: application/helpers/expressions/em_core_helper.php:261 +#: application/helpers/expressions/em_core_helper.php:262 msgid "Unable to evaluate binary operator - fewer than 2 entries on stack" msgstr "" -#: application/helpers/expressions/em_core_helper.php:268 -#: application/helpers/expressions/em_core_helper.php:420 +#: application/helpers/expressions/em_core_helper.php:269 +#: application/helpers/expressions/em_core_helper.php:421 msgid "Invalid value(s) on the stack" msgstr "" -#: application/helpers/expressions/em_core_helper.php:414 +#: application/helpers/expressions/em_core_helper.php:415 msgid "Unable to evaluate unary operator - no entries on stack" msgstr "" -#: application/helpers/expressions/em_core_helper.php:469 +#: application/helpers/expressions/em_core_helper.php:470 msgid "Extra tokens found" msgstr "" -#: application/helpers/expressions/em_core_helper.php:484 +#: application/helpers/expressions/em_core_helper.php:485 msgid "Unbalanced equation - values left on stack" msgstr "" -#: application/helpers/expressions/em_core_helper.php:490 +#: application/helpers/expressions/em_core_helper.php:491 msgid "Not a valid expression" msgstr "" -#: application/helpers/expressions/em_core_helper.php:551 -#: application/helpers/expressions/em_core_helper.php:980 -#: application/helpers/expressions/em_core_helper.php:1061 +#: application/helpers/expressions/em_core_helper.php:552 +#: application/helpers/expressions/em_core_helper.php:981 +#: application/helpers/expressions/em_core_helper.php:1062 msgid "Poorly terminated expression - expected a constant or variable" msgstr "" -#: application/helpers/expressions/em_core_helper.php:597 +#: application/helpers/expressions/em_core_helper.php:598 msgid "Variable not declared until a later page" msgstr "" -#: application/helpers/expressions/em_core_helper.php:604 -#: application/helpers/expressions/em_core_helper.php:1717 +#: application/helpers/expressions/em_core_helper.php:605 +#: application/helpers/expressions/em_core_helper.php:1718 msgid "Undefined variable" msgstr "" -#: application/helpers/expressions/em_core_helper.php:611 +#: application/helpers/expressions/em_core_helper.php:612 msgid "Should never get to this line?" msgstr "" -#: application/helpers/expressions/em_core_helper.php:697 +#: application/helpers/expressions/em_core_helper.php:698 msgid "The value of this variable can not be changed" msgstr "" -#: application/helpers/expressions/em_core_helper.php:703 +#: application/helpers/expressions/em_core_helper.php:704 msgid "Only variables can be assigned values" msgstr "" -#: application/helpers/expressions/em_core_helper.php:759 +#: application/helpers/expressions/em_core_helper.php:760 msgid "Expected expressions separated by commas" msgstr "" -#: application/helpers/expressions/em_core_helper.php:767 +#: application/helpers/expressions/em_core_helper.php:768 msgid "Extra token found after expressions" msgstr "" -#: application/helpers/expressions/em_core_helper.php:783 -#: application/helpers/expressions/em_core_helper.php:1710 +#: application/helpers/expressions/em_core_helper.php:784 +#: application/helpers/expressions/em_core_helper.php:1711 msgid "Undefined function" msgstr "" -#: application/helpers/expressions/em_core_helper.php:789 +#: application/helpers/expressions/em_core_helper.php:790 msgid "Expected left parentheses after function name" msgstr "" -#: application/helpers/expressions/em_core_helper.php:813 +#: application/helpers/expressions/em_core_helper.php:814 msgid "Extra comma found in function" msgstr "" -#: application/helpers/expressions/em_core_helper.php:997 +#: application/helpers/expressions/em_core_helper.php:998 msgid "Expected right parentheses" msgstr "" -#: application/helpers/expressions/em_core_helper.php:1701 +#: application/helpers/expressions/em_core_helper.php:1702 msgid "Extra right parentheses detected" msgstr "" -#: application/helpers/expressions/em_core_helper.php:1722 +#: application/helpers/expressions/em_core_helper.php:1723 msgid "Unsupported syntax" msgstr "" -#: application/helpers/expressions/em_core_helper.php:1730 +#: application/helpers/expressions/em_core_helper.php:1731 msgid "Missing %s closing right parentheses" msgstr "" -#: application/helpers/expressions/em_core_helper.php:2014 +#: application/helpers/expressions/em_core_helper.php:2015 msgid "Function must have at least %s argument" msgid_plural "Function must have at least %s arguments" msgstr[0] "" msgstr[1] "" -#: application/helpers/expressions/em_core_helper.php:2103 +#: application/helpers/expressions/em_core_helper.php:2104 msgid "Unsupported number of arguments: %s" msgstr "" -#: application/helpers/expressions/em_core_helper.php:2108 +#: application/helpers/expressions/em_core_helper.php:2109 msgid "Function does not support %s arguments" msgstr "" -#: application/helpers/expressions/em_core_helper.php:2109 +#: application/helpers/expressions/em_core_helper.php:2110 msgid "Function supports this many arguments, where -1=unlimited: %s" msgstr "" -#: application/helpers/expressions/em_core_helper.php:2346 +#: application/helpers/expressions/em_core_helper.php:2347 msgid "Tried to pop value off of empty stack" msgstr "" -#: application/helpers/expressions/em_core_helper.php:2756 +#: application/helpers/expressions/em_core_helper.php:2806 msgid "Invalid PERL Regular Expression: %s" msgstr "" -#: application/helpers/expressions/em_manager_helper.php:3050 -#: application/helpers/expressions/em_manager_helper.php:3235 -#: application/helpers/qanda_helper.php:3270 -#: application/helpers/qanda_helper.php:3446 +#: application/helpers/expressions/em_manager_helper.php:3028 +#: application/helpers/expressions/em_manager_helper.php:3224 +#: application/helpers/qanda_helper.php:3244 +#: application/helpers/qanda_helper.php:3425 #: application/views/admin/dataentry/content_view.php:377 msgid "Only numbers may be entered in this field." msgstr "" -#: application/helpers/expressions/em_manager_helper.php:3053 -#: application/helpers/expressions/em_manager_helper.php:3095 -#: application/helpers/expressions/em_manager_helper.php:3239 +#: application/helpers/expressions/em_manager_helper.php:3031 +#: application/helpers/expressions/em_manager_helper.php:3073 +#: application/helpers/expressions/em_manager_helper.php:3228 msgid "Only numbers may be entered in these fields." msgstr "" -#: application/helpers/expressions/em_manager_helper.php:3056 +#: application/helpers/expressions/em_manager_helper.php:3034 msgid "All your answers must be different." msgstr "" -#: application/helpers/expressions/em_manager_helper.php:3072 +#: application/helpers/expressions/em_manager_helper.php:3050 msgid "Comment only when you choose an answer." msgstr "" -#: application/helpers/expressions/em_manager_helper.php:3075 +#: application/helpers/expressions/em_manager_helper.php:3053 msgid "Comment only when you don't choose an answer." msgstr "" -#: application/helpers/expressions/em_manager_helper.php:3079 +#: application/helpers/expressions/em_manager_helper.php:3057 msgid "Comment your answers." msgstr "" -#: application/helpers/expressions/em_manager_helper.php:3087 +#: application/helpers/expressions/em_manager_helper.php:3065 msgid "The sum must equal %s." msgstr "" -#: application/helpers/expressions/em_manager_helper.php:3111 +#: application/helpers/expressions/em_manager_helper.php:3089 msgid "Please fill in at least %s answers" msgstr "" -#: application/helpers/expressions/em_manager_helper.php:3112 +#: application/helpers/expressions/em_manager_helper.php:3090 msgid "Please fill in at least one answer" msgstr "" -#: application/helpers/expressions/em_manager_helper.php:3113 +#: application/helpers/expressions/em_manager_helper.php:3091 msgid "Please fill in at most %s answers" msgstr "" -#: application/helpers/expressions/em_manager_helper.php:3114 -#: application/helpers/expressions/em_manager_helper.php:3115 +#: application/helpers/expressions/em_manager_helper.php:3092 +#: application/helpers/expressions/em_manager_helper.php:3093 msgid "Please fill in at most one answer" msgstr "" -#: application/helpers/expressions/em_manager_helper.php:3116 +#: application/helpers/expressions/em_manager_helper.php:3094 msgid "Please fill in %s answers" msgstr "" -#: application/helpers/expressions/em_manager_helper.php:3117 +#: application/helpers/expressions/em_manager_helper.php:3095 msgid "Please fill in between %s and %s answers" msgstr "" -#: application/helpers/expressions/em_manager_helper.php:3123 +#: application/helpers/expressions/em_manager_helper.php:3101 msgid "Please select at least %s answers" msgstr "" -#: application/helpers/expressions/em_manager_helper.php:3124 +#: application/helpers/expressions/em_manager_helper.php:3102 msgid "Please select at least one answer" msgstr "" -#: application/helpers/expressions/em_manager_helper.php:3125 +#: application/helpers/expressions/em_manager_helper.php:3103 msgid "Please select at most %s answers" msgstr "" -#: application/helpers/expressions/em_manager_helper.php:3126 -#: application/helpers/expressions/em_manager_helper.php:3127 +#: application/helpers/expressions/em_manager_helper.php:3104 +#: application/helpers/expressions/em_manager_helper.php:3105 msgid "Please select at most one answer" msgstr "" -#: application/helpers/expressions/em_manager_helper.php:3128 +#: application/helpers/expressions/em_manager_helper.php:3106 msgid "Please select %s answers" msgstr "" -#: application/helpers/expressions/em_manager_helper.php:3129 +#: application/helpers/expressions/em_manager_helper.php:3107 msgid "Please select between %s and %s answers" msgstr "" -#: application/helpers/expressions/em_manager_helper.php:3148 -#: application/helpers/expressions/em_manager_helper.php:3176 +#: application/helpers/expressions/em_manager_helper.php:3128 +#: application/helpers/expressions/em_manager_helper.php:3165 msgid "Each answer must be at least %s" msgstr "" -#: application/helpers/expressions/em_manager_helper.php:3149 -#: application/helpers/expressions/em_manager_helper.php:3177 +#: application/helpers/expressions/em_manager_helper.php:3129 +#: application/helpers/expressions/em_manager_helper.php:3166 msgid "Each answer must be at most %s" msgstr "" -#: application/helpers/expressions/em_manager_helper.php:3150 -#: application/helpers/expressions/em_manager_helper.php:3178 +#: application/helpers/expressions/em_manager_helper.php:3130 +#: application/helpers/expressions/em_manager_helper.php:3167 msgid "Each answer must be %s" msgstr "" -#: application/helpers/expressions/em_manager_helper.php:3151 -#: application/helpers/expressions/em_manager_helper.php:3179 +#: application/helpers/expressions/em_manager_helper.php:3131 +#: application/helpers/expressions/em_manager_helper.php:3168 msgid "Each answer must be between %s and %s" msgstr "" -#: application/helpers/expressions/em_manager_helper.php:3164 +#: application/helpers/expressions/em_manager_helper.php:3136 +msgid "Your answer must be at least %s" +msgstr "" + +#: application/helpers/expressions/em_manager_helper.php:3137 +msgid "Your answer must be at most %s" +msgstr "" + +#: application/helpers/expressions/em_manager_helper.php:3138 +msgid "Your answer must be %s" +msgstr "" + +#: application/helpers/expressions/em_manager_helper.php:3139 +msgid "Your answer must be between %s and %s" +msgstr "" + +#: application/helpers/expressions/em_manager_helper.php:3153 msgid "Answer must be greater or equal to %s" msgstr "" -#: application/helpers/expressions/em_manager_helper.php:3165 +#: application/helpers/expressions/em_manager_helper.php:3154 msgid "Answer must be less or equal to %s" msgstr "" -#: application/helpers/expressions/em_manager_helper.php:3166 +#: application/helpers/expressions/em_manager_helper.php:3155 msgid "Answer must be %s" msgstr "" -#: application/helpers/expressions/em_manager_helper.php:3167 +#: application/helpers/expressions/em_manager_helper.php:3156 msgid "Answer must be between %s and %s" msgstr "" -#: application/helpers/expressions/em_manager_helper.php:3188 +#: application/helpers/expressions/em_manager_helper.php:3177 msgid "The sum must be at least %s" msgstr "" -#: application/helpers/expressions/em_manager_helper.php:3189 +#: application/helpers/expressions/em_manager_helper.php:3178 msgid "The sum must be at most %s" msgstr "" -#: application/helpers/expressions/em_manager_helper.php:3190 +#: application/helpers/expressions/em_manager_helper.php:3179 msgid "The sum must equal %s" msgstr "" -#: application/helpers/expressions/em_manager_helper.php:3191 +#: application/helpers/expressions/em_manager_helper.php:3180 msgid "The sum must be between %s and %s" msgstr "" -#: application/helpers/expressions/em_manager_helper.php:3201 +#: application/helpers/expressions/em_manager_helper.php:3190 msgid "Please upload at least %s files" msgstr "" -#: application/helpers/expressions/em_manager_helper.php:3202 +#: application/helpers/expressions/em_manager_helper.php:3191 msgid "Please upload at least one file" msgstr "" -#: application/helpers/expressions/em_manager_helper.php:3203 +#: application/helpers/expressions/em_manager_helper.php:3192 msgid "Please upload at most %s files" msgstr "" -#: application/helpers/expressions/em_manager_helper.php:3204 +#: application/helpers/expressions/em_manager_helper.php:3193 msgid "Please upload at most one file" msgstr "" -#: application/helpers/expressions/em_manager_helper.php:3205 +#: application/helpers/expressions/em_manager_helper.php:3194 msgid "Please upload one file" msgstr "" -#: application/helpers/expressions/em_manager_helper.php:3206 +#: application/helpers/expressions/em_manager_helper.php:3195 msgid "Please upload %s files" msgstr "" -#: application/helpers/expressions/em_manager_helper.php:3207 +#: application/helpers/expressions/em_manager_helper.php:3196 msgid "Please upload between %s and %s files" msgstr "" -#: application/helpers/expressions/em_manager_helper.php:3218 +#: application/helpers/expressions/em_manager_helper.php:3207 msgid "Only an integer value may be entered in this field." msgstr "" -#: application/helpers/expressions/em_manager_helper.php:3222 +#: application/helpers/expressions/em_manager_helper.php:3211 msgid "Only integer values may be entered in these fields." msgstr "" -#: application/helpers/expressions/em_manager_helper.php:3255 -#: application/helpers/expressions/em_manager_helper.php:6250 +#: application/helpers/expressions/em_manager_helper.php:3244 +#: application/helpers/expressions/em_manager_helper.php:6246 msgid "If you choose '%s' please also specify your choice in the accompanying text field." msgstr "" -#: application/helpers/expressions/em_manager_helper.php:3267 +#: application/helpers/expressions/em_manager_helper.php:3256 msgid "Only numbers may be entered in '%s' accompanying text field." msgstr "" -#: application/helpers/expressions/em_manager_helper.php:3275 +#: application/helpers/expressions/em_manager_helper.php:3264 msgid "Please check the format of your answer." msgstr "" -#: application/helpers/expressions/em_manager_helper.php:5207 +#: application/helpers/expressions/em_manager_helper.php:5205 msgid "Unable to insert record into survey table" msgstr "" @@ -7523,65 +7602,65 @@ msgstr "" msgid "Error in SQL update" msgstr "" -#: application/helpers/expressions/em_manager_helper.php:6225 +#: application/helpers/expressions/em_manager_helper.php:6221 msgid "This question is mandatory" msgstr "" -#: application/helpers/expressions/em_manager_helper.php:6239 +#: application/helpers/expressions/em_manager_helper.php:6235 msgid "Please check at least one item." msgstr "" -#: application/helpers/expressions/em_manager_helper.php:6272 -#: application/helpers/expressions/em_manager_helper.php:6309 +#: application/helpers/expressions/em_manager_helper.php:6268 +#: application/helpers/expressions/em_manager_helper.php:6305 msgid "Please complete all parts" msgstr "" -#: application/helpers/expressions/em_manager_helper.php:6301 +#: application/helpers/expressions/em_manager_helper.php:6297 msgid "Please check at least one box per row" msgstr "" -#: application/helpers/expressions/em_manager_helper.php:6317 +#: application/helpers/expressions/em_manager_helper.php:6313 msgid "Please rank all items" msgstr "" -#: application/helpers/expressions/em_manager_helper.php:8948 +#: application/helpers/expressions/em_manager_helper.php:8934 msgid "Invalid question - probably missing sub-questions or language-specific settings for language %s" msgstr "" -#: application/helpers/expressions/em_manager_helper.php:8954 +#: application/helpers/expressions/em_manager_helper.php:8940 msgid "Logic File for Survey # " msgstr "" -#: application/helpers/expressions/em_manager_helper.php:8971 +#: application/helpers/expressions/em_manager_helper.php:8957 #: application/views/admin/survey/editLocalSettings_view.php:15 #: application/views/admin/survey/surveySummary_view.php:50 msgid "Welcome:" msgstr "" -#: application/helpers/expressions/em_manager_helper.php:8985 +#: application/helpers/expressions/em_manager_helper.php:8971 #: application/views/admin/survey/editLocalSettings_view.php:23 #: application/views/admin/survey/subview/tabGeneralNewSurvey_view.php:40 msgid "End URL:" msgstr "" -#: application/helpers/expressions/em_manager_helper.php:8989 +#: application/helpers/expressions/em_manager_helper.php:8975 msgid "Name [ID]" msgstr "" -#: application/helpers/expressions/em_manager_helper.php:8989 +#: application/helpers/expressions/em_manager_helper.php:8975 msgid "Relevance [Validation] (Default value)" msgstr "" -#: application/helpers/expressions/em_manager_helper.php:8989 +#: application/helpers/expressions/em_manager_helper.php:8975 msgid "Text [Help] (Tip)" msgstr "" -#: application/helpers/expressions/em_manager_helper.php:9041 -#: application/helpers/expressions/em_manager_helper.php:9292 +#: application/helpers/expressions/em_manager_helper.php:9027 +#: application/helpers/expressions/em_manager_helper.php:9282 msgid "Default:" msgstr "" -#: application/helpers/expressions/em_manager_helper.php:9049 +#: application/helpers/expressions/em_manager_helper.php:9035 #: application/views/admin/survey/Question/editQuestion_view.php:63 #: application/views/admin/survey/Question/editQuestion_view.php:67 #: application/views/admin/survey/Question/editQuestion_view.php:91 @@ -7592,154 +7671,154 @@ msgstr "" msgid "Help:" msgstr "" -#: application/helpers/expressions/em_manager_helper.php:9050 +#: application/helpers/expressions/em_manager_helper.php:9036 msgid "Tip:" msgstr "" -#: application/helpers/expressions/em_manager_helper.php:9067 +#: application/helpers/expressions/em_manager_helper.php:9053 msgid "Question attribute" msgstr "" -#: application/helpers/expressions/em_manager_helper.php:9067 +#: application/helpers/expressions/em_manager_helper.php:9053 msgid "Value" msgstr "" -#: application/helpers/expressions/em_manager_helper.php:9195 +#: application/helpers/expressions/em_manager_helper.php:9185 msgid "This variable name has already been used." msgstr "" -#: application/helpers/expressions/em_manager_helper.php:9207 +#: application/helpers/expressions/em_manager_helper.php:9197 msgid "Starting in 2.05, variable names should only contain letters and numbers; and may not start with a number. This variable name is deprecated." msgstr "" -#: application/helpers/expressions/em_manager_helper.php:9364 +#: application/helpers/expressions/em_manager_helper.php:9354 msgid "This question has at least %s error." msgid_plural "This question has at least %s errors." msgstr[0] "" msgstr[1] "" -#: application/helpers/expressions/em_manager_helper.php:9403 +#: application/helpers/expressions/em_manager_helper.php:9393 msgid "%s question contains errors that need to be corrected" msgid_plural "%s questions contain errors that need to be corrected" msgstr[0] "" msgstr[1] "" -#: application/helpers/expressions/em_manager_helper.php:9409 +#: application/helpers/expressions/em_manager_helper.php:9399 msgid "No syntax errors detected in this survey" msgstr "" -#: application/helpers/expressions/em_manager_helper.php:9412 +#: application/helpers/expressions/em_manager_helper.php:9402 msgid "This group, by itself, does not contain any syntax errors" msgstr "" -#: application/helpers/expressions/em_manager_helper.php:9415 +#: application/helpers/expressions/em_manager_helper.php:9405 msgid "This question, by itself, does not contain any syntax errors" msgstr "" -#: application/helpers/frontend_helper.php:166 +#: application/helpers/frontend_helper.php:176 msgid "You have completed %s%% of this survey" msgstr "" -#: application/helpers/frontend_helper.php:260 -#: application/helpers/frontend_helper.php:306 +#: application/helpers/frontend_helper.php:270 +#: application/helpers/frontend_helper.php:316 msgid "Choose another language" msgstr "" -#: application/helpers/frontend_helper.php:263 -#: application/helpers/frontend_helper.php:309 +#: application/helpers/frontend_helper.php:273 +#: application/helpers/frontend_helper.php:319 msgid "Change the language" msgstr "" -#: application/helpers/frontend_helper.php:371 +#: application/helpers/frontend_helper.php:381 msgid "Sorry, the uploaded file (%s) is larger than the allowed filesize of %s KB." msgstr "" -#: application/helpers/frontend_helper.php:384 -#: application/helpers/frontend_helper.php:390 +#: application/helpers/frontend_helper.php:394 +#: application/helpers/frontend_helper.php:400 msgid "Sorry, only %s extensions are allowed!" msgstr "" -#: application/helpers/frontend_helper.php:402 +#: application/helpers/frontend_helper.php:412 msgid "The minimum number of files has not been uploaded." msgstr "" -#: application/helpers/frontend_helper.php:797 -#: application/helpers/SurveyRuntimeHelper.php:569 +#: application/helpers/frontend_helper.php:808 +#: application/helpers/SurveyRuntimeHelper.php:550 msgid "Did Not Save" msgstr "" -#: application/helpers/frontend_helper.php:798 +#: application/helpers/frontend_helper.php:809 msgid "An unexpected error has occurred and your responses cannot be saved." msgstr "" -#: application/helpers/frontend_helper.php:801 +#: application/helpers/frontend_helper.php:812 msgid "Your responses have not been lost and have been emailed to the survey administrator and will be entered into our database at a later point." msgstr "" -#: application/helpers/frontend_helper.php:806 +#: application/helpers/frontend_helper.php:817 msgid "An error occurred saving a response to survey id" msgstr "" -#: application/helpers/frontend_helper.php:807 +#: application/helpers/frontend_helper.php:818 msgid "DATA TO BE ENTERED" msgstr "" -#: application/helpers/frontend_helper.php:812 +#: application/helpers/frontend_helper.php:823 msgid "SQL CODE THAT FAILED" msgstr "" -#: application/helpers/frontend_helper.php:814 +#: application/helpers/frontend_helper.php:825 msgid "ERROR MESSAGE" msgstr "" -#: application/helpers/frontend_helper.php:816 +#: application/helpers/frontend_helper.php:827 msgid "Error saving results" msgstr "" -#: application/helpers/frontend_helper.php:823 +#: application/helpers/frontend_helper.php:834 msgid "Try to submit again" msgstr "" -#: application/helpers/frontend_helper.php:877 +#: application/helpers/frontend_helper.php:889 msgid "Please confirm access to survey by answering the security question below and click continue." msgstr "" -#: application/helpers/frontend_helper.php:901 +#: application/helpers/frontend_helper.php:913 msgid "Security question:" msgstr "" -#: application/helpers/frontend_helper.php:952 -#: application/helpers/frontend_helper.php:1106 +#: application/helpers/frontend_helper.php:964 +#: application/helpers/frontend_helper.php:1118 #: application/views/entertoken_view.php:9 msgid "If you have been issued a token, please enter it in the box below and click continue." msgstr "" -#: application/helpers/frontend_helper.php:957 -#: application/helpers/frontend_helper.php:1139 +#: application/helpers/frontend_helper.php:969 +#: application/helpers/frontend_helper.php:1151 msgid "Token:" msgstr "" -#: application/helpers/frontend_helper.php:982 -#: application/helpers/frontend_helper.php:1147 -#: application/helpers/replacements_helper.php:585 +#: application/helpers/frontend_helper.php:994 +#: application/helpers/frontend_helper.php:1159 +#: application/helpers/replacements_helper.php:614 msgid "Security Question" msgstr "" -#: application/helpers/frontend_helper.php:1021 -#: application/helpers/frontend_helper.php:1063 +#: application/helpers/frontend_helper.php:1033 +#: application/helpers/frontend_helper.php:1075 msgid "The token you have provided is either not valid, or has already been used." msgstr "" -#: application/helpers/frontend_helper.php:1125 +#: application/helpers/frontend_helper.php:1137 msgid "Please confirm the token by answering the security question below and click continue." msgstr "" -#: application/helpers/frontend_helper.php:1253 +#: application/helpers/frontend_helper.php:1255 msgid "This survey does not yet have any questions and cannot be tested or completed." msgstr "" -#: application/helpers/frontend_helper.php:1656 -#: application/helpers/frontend_helper.php:2098 +#: application/helpers/frontend_helper.php:1659 +#: application/helpers/frontend_helper.php:2021 #: application/views/admin/templates/templateeditor_navigator_view.php:5 #: application/views/installer/dbconfig_view.php:61 #: application/views/installer/dbsettings_view.php:13 @@ -7749,8 +7828,8 @@ msgstr "" msgid "Previous" msgstr "" -#: application/helpers/frontend_helper.php:1665 -#: application/helpers/replacements_helper.php:343 +#: application/helpers/frontend_helper.php:1668 +#: application/helpers/replacements_helper.php:373 #: application/helpers/SurveyRuntimeHelper.php:159 #: application/views/admin/dataentry/active_html_view.php:67 #: application/views/admin/dataentry/includes/editdata/editdata.php:57 @@ -7758,20 +7837,20 @@ msgstr "" msgid "Submit" msgstr "" -#: application/helpers/frontend_helper.php:1668 +#: application/helpers/frontend_helper.php:1671 #: application/views/admin/participants/displayParticipants_view.php:133 #: application/views/admin/quotas/newanswertwo_view.php:45 #: application/views/admin/quotas/newanswer_view.php:33 #: application/views/admin/templates/templateeditor_navigator_view.php:9 -#: application/views/admin/token/browse.php:65 +#: application/views/admin/token/browse.php:59 #: application/views/installer/dbconfig_view.php:66 #: application/views/installer/optconfig_view.php:84 #: application/views/installer/precheck_view.php:158 msgid "Next" msgstr "" -#: application/helpers/frontend_helper.php:2224 -#: application/helpers/SurveyRuntimeHelper.php:1158 +#: application/helpers/frontend_helper.php:2150 +#: application/helpers/SurveyRuntimeHelper.php:1139 msgid "This survey is currently not active. You will not be able to save your responses." msgstr "" @@ -7779,541 +7858,553 @@ msgstr "" msgid "page" msgstr "" -#: application/helpers/qanda_helper.php:143 -#: application/helpers/qanda_helper.php:144 -#: application/helpers/qanda_helper.php:152 -#: application/helpers/qanda_helper.php:153 -#: application/helpers/qanda_helper.php:161 -#: application/helpers/qanda_helper.php:162 +#: application/helpers/qanda_helper.php:139 +#: application/helpers/qanda_helper.php:140 +#: application/helpers/qanda_helper.php:148 +#: application/helpers/qanda_helper.php:149 +#: application/helpers/qanda_helper.php:157 +#: application/helpers/qanda_helper.php:158 msgid "Choose one of the following answers" msgstr "" -#: application/helpers/qanda_helper.php:169 -msgid "Double-click or drag-and-drop items in the left list to move them to the right - your highest ranking item should be on the top right, moving through to your lowest ranking item." -msgstr "" - -#: application/helpers/qanda_helper.php:181 -#: application/helpers/qanda_helper.php:182 -#: application/helpers/qanda_helper.php:224 -#: application/helpers/qanda_helper.php:225 +#: application/helpers/qanda_helper.php:173 +#: application/helpers/qanda_helper.php:174 +#: application/helpers/qanda_helper.php:216 +#: application/helpers/qanda_helper.php:217 msgid "Check any that apply" msgstr "" -#: application/helpers/qanda_helper.php:211 -#: application/helpers/qanda_helper.php:212 -#: application/helpers/qanda_helper.php:1381 +#: application/helpers/qanda_helper.php:203 +#: application/helpers/qanda_helper.php:204 +#: application/helpers/qanda_helper.php:1374 msgid "Choose your language" msgstr "" -#: application/helpers/qanda_helper.php:474 +#: application/helpers/qanda_helper.php:466 msgid "You cannot proceed until you enter some text for one or more questions." msgstr "" -#: application/helpers/qanda_helper.php:478 -#: application/helpers/SurveyRuntimeHelper.php:1007 +#: application/helpers/qanda_helper.php:470 +#: application/helpers/SurveyRuntimeHelper.php:988 msgid "One or more mandatory questions have not been answered. You cannot proceed until these have been completed." msgstr "" -#: application/helpers/qanda_helper.php:503 -#: application/helpers/SurveyRuntimeHelper.php:1013 +#: application/helpers/qanda_helper.php:495 +#: application/helpers/SurveyRuntimeHelper.php:994 msgid "One or more questions have not been answered in a valid manner. You cannot proceed until these answers are valid." msgstr "" -#: application/helpers/qanda_helper.php:525 +#: application/helpers/qanda_helper.php:517 msgid "One or more file have either exceeded the filesize/are not in the right format or the minimum number of required files have not been uploaded. You cannot proceed until these have been completed" msgstr "" -#: application/helpers/qanda_helper.php:571 +#: application/helpers/qanda_helper.php:563 msgid "Your time to answer this question has expired" msgstr "" -#: application/helpers/qanda_helper.php:574 +#: application/helpers/qanda_helper.php:566 msgid "Time remaining" msgstr "" -#: application/helpers/qanda_helper.php:575 -#: application/helpers/qanda_helper.php:578 +#: application/helpers/qanda_helper.php:567 +#: application/helpers/qanda_helper.php:570 msgid "Your time to answer this question has nearly expired. You have {TIME} remaining." msgstr "" -#: application/helpers/qanda_helper.php:730 -#: application/helpers/qanda_helper.php:750 -#: application/helpers/qanda_helper.php:769 +#: application/helpers/qanda_helper.php:722 +#: application/helpers/qanda_helper.php:742 +#: application/helpers/qanda_helper.php:761 msgid "hours" msgstr "" -#: application/helpers/qanda_helper.php:731 -#: application/helpers/qanda_helper.php:751 -#: application/helpers/qanda_helper.php:770 +#: application/helpers/qanda_helper.php:723 +#: application/helpers/qanda_helper.php:743 +#: application/helpers/qanda_helper.php:762 msgid "mins" msgstr "" -#: application/helpers/qanda_helper.php:732 -#: application/helpers/qanda_helper.php:752 -#: application/helpers/qanda_helper.php:771 -#: application/helpers/qanda_helper.php:772 +#: application/helpers/qanda_helper.php:724 +#: application/helpers/qanda_helper.php:744 +#: application/helpers/qanda_helper.php:763 +#: application/helpers/qanda_helper.php:764 msgid "seconds" msgstr "" -#: application/helpers/qanda_helper.php:973 +#: application/helpers/qanda_helper.php:964 msgid "Date entered is invalid!" msgstr "" -#: application/helpers/qanda_helper.php:974 +#: application/helpers/qanda_helper.php:965 msgid "Please complete all parts of the date!" msgstr "" -#: application/helpers/qanda_helper.php:1068 -#: application/helpers/qanda_helper.php:1069 +#: application/helpers/qanda_helper.php:1059 +#: application/helpers/qanda_helper.php:1060 msgid "Day" msgstr "" -#: application/helpers/qanda_helper.php:1085 -#: application/helpers/qanda_helper.php:1086 +#: application/helpers/qanda_helper.php:1076 +#: application/helpers/qanda_helper.php:1077 msgid "Month" msgstr "" -#: application/helpers/qanda_helper.php:1091 +#: application/helpers/qanda_helper.php:1082 msgid "Jan" msgstr "" -#: application/helpers/qanda_helper.php:1092 +#: application/helpers/qanda_helper.php:1083 msgid "Feb" msgstr "" -#: application/helpers/qanda_helper.php:1093 +#: application/helpers/qanda_helper.php:1084 msgid "Mar" msgstr "" -#: application/helpers/qanda_helper.php:1094 +#: application/helpers/qanda_helper.php:1085 msgid "Apr" msgstr "" -#: application/helpers/qanda_helper.php:1095 -#: application/helpers/qanda_helper.php:1110 +#: application/helpers/qanda_helper.php:1086 +#: application/helpers/qanda_helper.php:1101 msgid "May" msgstr "" -#: application/helpers/qanda_helper.php:1096 +#: application/helpers/qanda_helper.php:1087 msgid "Jun" msgstr "" -#: application/helpers/qanda_helper.php:1097 +#: application/helpers/qanda_helper.php:1088 msgid "Jul" msgstr "" -#: application/helpers/qanda_helper.php:1098 +#: application/helpers/qanda_helper.php:1089 msgid "Aug" msgstr "" -#: application/helpers/qanda_helper.php:1099 +#: application/helpers/qanda_helper.php:1090 msgid "Sep" msgstr "" -#: application/helpers/qanda_helper.php:1100 +#: application/helpers/qanda_helper.php:1091 msgid "Oct" msgstr "" -#: application/helpers/qanda_helper.php:1101 +#: application/helpers/qanda_helper.php:1092 msgid "Nov" msgstr "" -#: application/helpers/qanda_helper.php:1102 +#: application/helpers/qanda_helper.php:1093 msgid "Dec" msgstr "" -#: application/helpers/qanda_helper.php:1106 +#: application/helpers/qanda_helper.php:1097 msgid "January" msgstr "" -#: application/helpers/qanda_helper.php:1107 +#: application/helpers/qanda_helper.php:1098 msgid "February" msgstr "" -#: application/helpers/qanda_helper.php:1108 +#: application/helpers/qanda_helper.php:1099 msgid "March" msgstr "" -#: application/helpers/qanda_helper.php:1109 +#: application/helpers/qanda_helper.php:1100 msgid "April" msgstr "" -#: application/helpers/qanda_helper.php:1111 +#: application/helpers/qanda_helper.php:1102 msgid "June" msgstr "" -#: application/helpers/qanda_helper.php:1112 +#: application/helpers/qanda_helper.php:1103 msgid "July" msgstr "" -#: application/helpers/qanda_helper.php:1113 +#: application/helpers/qanda_helper.php:1104 msgid "August" msgstr "" -#: application/helpers/qanda_helper.php:1114 +#: application/helpers/qanda_helper.php:1105 msgid "September" msgstr "" -#: application/helpers/qanda_helper.php:1115 +#: application/helpers/qanda_helper.php:1106 msgid "October" msgstr "" -#: application/helpers/qanda_helper.php:1116 +#: application/helpers/qanda_helper.php:1107 msgid "November" msgstr "" -#: application/helpers/qanda_helper.php:1117 +#: application/helpers/qanda_helper.php:1108 msgid "December" msgstr "" -#: application/helpers/qanda_helper.php:1139 -#: application/helpers/qanda_helper.php:1140 +#: application/helpers/qanda_helper.php:1130 +#: application/helpers/qanda_helper.php:1131 msgid "Year" msgstr "" -#: application/helpers/qanda_helper.php:1197 +#: application/helpers/qanda_helper.php:1189 msgid "Hour" msgstr "" -#: application/helpers/qanda_helper.php:1220 -#: application/helpers/qanda_helper.php:1221 +#: application/helpers/qanda_helper.php:1212 +#: application/helpers/qanda_helper.php:1213 msgid "Minute" msgstr "" -#: application/helpers/qanda_helper.php:1257 +#: application/helpers/qanda_helper.php:1249 msgid "Date in the format : %s" msgstr "" -#: application/helpers/qanda_helper.php:1296 +#: application/helpers/qanda_helper.php:1289 msgid "Date picker" msgstr "" -#: application/helpers/qanda_helper.php:1297 -#: application/helpers/qanda_helper.php:1350 +#: application/helpers/qanda_helper.php:1290 +#: application/helpers/qanda_helper.php:1343 #: application/views/admin/token/dummytokenform.php:38 #: application/views/admin/token/tokenform.php:148 msgid "Format: %s" msgstr "" -#: application/helpers/qanda_helper.php:1645 +#: application/helpers/qanda_helper.php:1638 msgid "Other answer" msgstr "" -#: application/helpers/qanda_helper.php:1970 +#: application/helpers/qanda_helper.php:1963 msgid "Please enter your comment here" msgstr "" -#: application/helpers/qanda_helper.php:2150 +#: application/helpers/qanda_helper.php:2145 msgid "Choice of rank %s" msgstr "" -#: application/helpers/qanda_helper.php:2797 +#: application/helpers/qanda_helper.php:2203 +msgid "Double-click or drag-and-drop items in the left list to move them to the right - your highest ranking item should be on the top right, moving through to your lowest ranking item." +msgstr "" + +#: application/helpers/qanda_helper.php:2796 msgid "Upload files" msgstr "" -#: application/helpers/qanda_helper.php:2809 +#: application/helpers/qanda_helper.php:2808 msgid "Upload your files" msgstr "" -#: application/helpers/qanda_helper.php:2810 -#: application/helpers/replacements_helper.php:468 +#: application/helpers/qanda_helper.php:2809 +#: application/helpers/replacements_helper.php:497 msgid "Return to survey" msgstr "" -#: application/helpers/qanda_helper.php:2991 -#: application/helpers/qanda_helper.php:3232 -#: application/helpers/qanda_helper.php:4296 +#: application/helpers/qanda_helper.php:2990 +#: application/helpers/qanda_helper.php:3207 +#: application/helpers/qanda_helper.php:4282 msgid "Error: This question has no answers." msgstr "" -#: application/helpers/qanda_helper.php:3291 +#: application/helpers/qanda_helper.php:3270 msgid "Remaining: " msgstr "" -#: application/helpers/qanda_helper.php:3299 +#: application/helpers/qanda_helper.php:3278 msgid "Total: " msgstr "" -#: application/helpers/qanda_helper.php:3330 -#: application/views/admin/emailtemplates/email_language_template_tab.php:11 -#: application/views/admin/emailtemplates/email_language_template_tab.php:24 -#: application/views/admin/participants/attributeControl_view.php:19 +#: application/helpers/qanda_helper.php:3309 +#: application/views/admin/emailtemplates/email_language_template_tab.php:7 +#: application/views/admin/emailtemplates/email_language_template_tab.php:14 +#: application/views/admin/participants/attributeControl_view.php:20 #: application/views/admin/participants/attributeMapCSV_view.php:54 #: application/views/admin/participants/attributeMapToken_view.php:91 #: application/views/admin/participants/attributeMap_view.php:106 #: application/views/admin/participants/displayParticipants_view.php:120 #: application/views/admin/participants/sharePanel_view.php:26 #: application/views/admin/survey/listSurveys_view.php:33 -#: application/views/admin/token/browse.php:71 +#: application/views/admin/token/browse.php:65 #: application/views/admin/usergroup/mailUserGroup_view.php:10 msgid "Reset" msgstr "" -#: application/helpers/qanda_helper.php:3331 +#: application/helpers/qanda_helper.php:3310 msgid "Please click and drag the slider handles to enter your answer." msgstr "" -#: application/helpers/qanda_helper.php:3630 -#: application/helpers/qanda_helper.php:3631 +#: application/helpers/qanda_helper.php:3613 +#: application/helpers/qanda_helper.php:3614 msgid "Drag and drop the pin to the desired location. You may also right click on the map to move the pin." msgstr "" -#: application/helpers/qanda_helper.php:3934 +#: application/helpers/qanda_helper.php:3918 msgid "An array with sub-question on each line. The answers are value from 1 to 5 and are contained in the table header. " msgstr "" -#: application/helpers/qanda_helper.php:4103 +#: application/helpers/qanda_helper.php:4088 msgid "An array with sub-question on each line. The answers are value from 1 to 10 and are contained in the table header. " msgstr "" -#: application/helpers/qanda_helper.php:4122 -#: application/helpers/qanda_helper.php:4252 -#: application/helpers/qanda_helper.php:4407 -#: application/helpers/qanda_helper.php:4628 -#: application/helpers/qanda_helper.php:5922 +#: application/helpers/qanda_helper.php:4107 +#: application/helpers/qanda_helper.php:4238 +#: application/helpers/qanda_helper.php:4393 +#: application/helpers/qanda_helper.php:4613 +#: application/helpers/qanda_helper.php:5910 msgid "The last cell are for no answer. " msgstr "" -#: application/helpers/qanda_helper.php:4232 +#: application/helpers/qanda_helper.php:4218 msgid "An array with sub-question on each line. The answers are yes, no, uncertain and are in the table header. " msgstr "" -#: application/helpers/qanda_helper.php:4389 +#: application/helpers/qanda_helper.php:4375 msgid "An array with sub-question on each line. The answers are increase, same, decrease and are contained in the table header. " msgstr "" -#: application/helpers/qanda_helper.php:4572 +#: application/helpers/qanda_helper.php:4557 msgid "An array with sub-question on each line. You have to select your answer." msgstr "" -#: application/helpers/qanda_helper.php:4577 +#: application/helpers/qanda_helper.php:4562 msgid "An array with sub-question on each line. The answers are contained in the table header. " msgstr "" -#: application/helpers/qanda_helper.php:4623 +#: application/helpers/qanda_helper.php:4608 msgid "After answers, a cell give some information. " msgstr "" -#: application/helpers/qanda_helper.php:4886 -#: application/helpers/qanda_helper.php:5275 -#: application/helpers/qanda_helper.php:5640 -#: application/helpers/qanda_helper.php:5793 -#: application/helpers/qanda_helper.php:6376 +#: application/helpers/qanda_helper.php:4864 +#: application/helpers/qanda_helper.php:5252 +#: application/helpers/qanda_helper.php:5628 +#: application/helpers/qanda_helper.php:5780 +#: application/helpers/qanda_helper.php:6337 msgid "Error: There are no answer options for this question and/or they don't exist in this language." msgstr "" -#: application/helpers/qanda_helper.php:4905 -#: application/helpers/qanda_helper.php:5292 +#: application/helpers/qanda_helper.php:4884 +#: application/helpers/qanda_helper.php:5270 msgid "An array of sub-question on each cell. The sub-question text are in the table header and concerns line header. " msgstr "" -#: application/helpers/qanda_helper.php:4966 -msgid "Each answers are number. " +#: application/helpers/qanda_helper.php:4945 +msgid "Each answer is a number. " msgstr "" -#: application/helpers/qanda_helper.php:4988 -msgid "The last row show the total for the column. " +#: application/helpers/qanda_helper.php:4955 +#: application/helpers/qanda_helper.php:5000 +#: application/views/admin/assessments_view.php:39 +#: application/views/admin/assessments_view.php:71 +#: application/views/admin/survey/listSurveys_view.php:46 +msgid "Total" msgstr "" -#: application/helpers/qanda_helper.php:5008 -msgid "The last column show the total for the row. " +#: application/helpers/qanda_helper.php:4959 +msgid "Grand total" msgstr "" -#: application/helpers/qanda_helper.php:5036 -msgid "The last row show the total for the column and the last column show the total for the row. " +#: application/helpers/qanda_helper.php:4967 +msgid "The last row shows the total for the column. " msgstr "" -#: application/helpers/qanda_helper.php:5097 -#: application/helpers/qanda_helper.php:5425 +#: application/helpers/qanda_helper.php:4987 +msgid "The last column shows the total for the row. " +msgstr "" + +#: application/helpers/qanda_helper.php:5015 +msgid "The last row shows the total for the column and the last column shows the total for the row. " +msgstr "" + +#: application/helpers/qanda_helper.php:5076 +#: application/helpers/qanda_helper.php:5403 msgid "The last cell give some information. " msgstr "" -#: application/helpers/qanda_helper.php:5351 +#: application/helpers/qanda_helper.php:5329 msgid "Check or uncheck the answer for each subquestion. " msgstr "" -#: application/helpers/qanda_helper.php:5358 +#: application/helpers/qanda_helper.php:5336 msgid "Each answers are a number. " msgstr "" -#: application/helpers/qanda_helper.php:5363 +#: application/helpers/qanda_helper.php:5341 msgid "Select the answer for each subquestion. " msgstr "" -#: application/helpers/qanda_helper.php:5561 +#: application/helpers/qanda_helper.php:5549 msgid "..." msgstr "" -#: application/helpers/qanda_helper.php:5655 +#: application/helpers/qanda_helper.php:5644 msgid "An array with sub-question on each column. The sub-question are on table header, the answers are in each line header. " msgstr "" -#: application/helpers/qanda_helper.php:5787 +#: application/helpers/qanda_helper.php:5774 msgid "Error: There are no answers defined for this question." msgstr "" -#: application/helpers/qanda_helper.php:5840 +#: application/helpers/qanda_helper.php:5828 msgid "An array with sub-question on each line, with 2 answers to provide on each line. You have to select the answer." msgstr "" -#: application/helpers/qanda_helper.php:5848 +#: application/helpers/qanda_helper.php:5836 msgid "An array with sub-question on each line, with 2 answers to provide on each line. The answers are contained in the table header. " msgstr "" -#: application/helpers/replacements_helper.php:300 +#: application/helpers/replacements_helper.php:330 msgid "There are no questions in this survey" msgstr "" -#: application/helpers/replacements_helper.php:304 +#: application/helpers/replacements_helper.php:334 msgid "There is 1 question in this survey" msgstr "" -#: application/helpers/replacements_helper.php:308 +#: application/helpers/replacements_helper.php:338 msgid "There are {NUMBEROFQUESTIONS} questions in this survey." msgstr "" -#: application/helpers/replacements_helper.php:371 +#: application/helpers/replacements_helper.php:401 msgid "Exit and clear survey" msgstr "" -#: application/helpers/replacements_helper.php:371 +#: application/helpers/replacements_helper.php:401 msgid "This action need confirmation." msgstr "" -#: application/helpers/replacements_helper.php:373 +#: application/helpers/replacements_helper.php:403 msgid "Are you sure you want to clear all your responses?" msgstr "" -#: application/helpers/replacements_helper.php:428 +#: application/helpers/replacements_helper.php:457 msgid "If you want to check any of the answers you have made, and/or change them, you can do that now by clicking on the [<< prev] button and browsing through your responses." msgstr "" -#: application/helpers/replacements_helper.php:442 +#: application/helpers/replacements_helper.php:471 msgid "Restart this Survey" msgstr "" -#: application/helpers/replacements_helper.php:451 +#: application/helpers/replacements_helper.php:480 msgid "To remain anonymous please use a pseudonym as your username, also an email address is not required." msgstr "" -#: application/helpers/replacements_helper.php:488 +#: application/helpers/replacements_helper.php:517 msgid "Repeat password" msgstr "" -#: application/helpers/replacements_helper.php:494 +#: application/helpers/replacements_helper.php:523 msgid "Your email address" msgstr "" -#: application/helpers/replacements_helper.php:502 -#: application/helpers/replacements_helper.php:523 +#: application/helpers/replacements_helper.php:531 +#: application/helpers/replacements_helper.php:552 #: application/views/entertoken_view.php:41 msgid "Security question" msgstr "" -#: application/helpers/replacements_helper.php:509 +#: application/helpers/replacements_helper.php:538 msgid "Saved name" msgstr "" -#: application/helpers/replacements_helper.php:525 +#: application/helpers/replacements_helper.php:554 msgid "Load now" msgstr "" -#: application/helpers/replacements_helper.php:707 +#: application/helpers/replacements_helper.php:736 msgid "Answers cleared" msgstr "" -#: application/helpers/replacements_helper.php:710 +#: application/helpers/replacements_helper.php:739 msgid "Your assessment" msgstr "" -#: application/helpers/replacements_helper.php:711 +#: application/helpers/replacements_helper.php:740 msgid "Caution: JavaScript execution is disabled in your browser. You may not be able to answer all questions in this survey. Please, verify your browser parameters." msgstr "" -#: application/helpers/replacements_helper.php:713 +#: application/helpers/replacements_helper.php:742 msgid "Close this window" msgstr "" -#: application/helpers/replacements_helper.php:727 +#: application/helpers/replacements_helper.php:756 msgid "Load a previously saved survey" msgstr "" -#: application/helpers/replacements_helper.php:728 +#: application/helpers/replacements_helper.php:757 msgid "You can load a survey that you have previously saved from this screen." msgstr "" -#: application/helpers/replacements_helper.php:728 +#: application/helpers/replacements_helper.php:757 msgid "Type in the 'name' you used to save the survey, and the password." msgstr "" -#: application/helpers/replacements_helper.php:734 +#: application/helpers/replacements_helper.php:763 msgid "A Note On Privacy" msgstr "" -#: application/helpers/replacements_helper.php:734 +#: application/helpers/replacements_helper.php:763 msgid "This survey is anonymous." msgstr "" -#: application/helpers/replacements_helper.php:734 +#: application/helpers/replacements_helper.php:763 msgid "The record of your survey responses does not contain any identifying information about you, unless a specific survey question explicitly asked for it." msgstr "" -#: application/helpers/replacements_helper.php:734 +#: application/helpers/replacements_helper.php:763 msgid "If you used an identifying token to access this survey, please rest assured that this token will not be stored together with your responses. It is managed in a separate database and will only be updated to indicate whether you did (or did not) complete this survey. There is no way of matching identification tokens with survey responses." msgstr "" -#: application/helpers/replacements_helper.php:753 +#: application/helpers/replacements_helper.php:782 msgid "You must be registered to complete this survey" msgstr "" -#: application/helpers/replacements_helper.php:754 +#: application/helpers/replacements_helper.php:783 msgid "You may register for this survey if you wish to take part." msgstr "" -#: application/helpers/replacements_helper.php:754 +#: application/helpers/replacements_helper.php:783 msgid "Enter your details below, and an email containing the link to participate in this survey will be sent immediately." msgstr "" -#: application/helpers/replacements_helper.php:762 +#: application/helpers/replacements_helper.php:791 msgid "Save your unfinished survey" msgstr "" -#: application/helpers/replacements_helper.php:763 +#: application/helpers/replacements_helper.php:792 msgid "Enter a name and password for this survey and click save below." msgstr "" -#: application/helpers/replacements_helper.php:763 +#: application/helpers/replacements_helper.php:792 msgid "Your survey will be saved using that name and password, and can be completed later by logging in with the same name and password." msgstr "" -#: application/helpers/replacements_helper.php:763 +#: application/helpers/replacements_helper.php:792 msgid "If you give an email address, an email containing the details will be sent to you." msgstr "" -#: application/helpers/replacements_helper.php:763 +#: application/helpers/replacements_helper.php:792 msgid "After having clicked the save button you can either close this browser window or continue filling out the survey." msgstr "" -#: application/helpers/replacements_helper.php:768 -#: application/helpers/SurveyRuntimeHelper.php:630 +#: application/helpers/replacements_helper.php:797 +#: application/helpers/SurveyRuntimeHelper.php:611 #: application/views/admin/templates/templateeditor_completed_view.php:2 msgid "Thank you!" msgstr "" -#: application/helpers/replacements_helper.php:768 +#: application/helpers/replacements_helper.php:797 msgid "You have completed answering the questions in this survey." msgstr "" -#: application/helpers/replacements_helper.php:768 +#: application/helpers/replacements_helper.php:797 msgid "Click on 'Submit' now to complete the process and save your answers." msgstr "" -#: application/helpers/replacements_helper.php:880 +#: application/helpers/replacements_helper.php:909 msgid "Load unfinished survey" msgstr "" -#: application/helpers/replacements_helper.php:881 -#: application/helpers/replacements_helper.php:896 +#: application/helpers/replacements_helper.php:910 +#: application/helpers/replacements_helper.php:925 msgid "Resume later" msgstr "" @@ -8332,56 +8423,52 @@ msgstr "" msgid "Go to this question" msgstr "" -#: application/helpers/SurveyRuntimeHelper.php:309 +#: application/helpers/SurveyRuntimeHelper.php:301 msgid "Please use the LimeSurvey navigation buttons or index. It appears you attempted to use the browser back button to re-submit a page." msgstr "" -#: application/helpers/SurveyRuntimeHelper.php:425 -msgid "Save your responses so far" -msgstr "" - -#: application/helpers/SurveyRuntimeHelper.php:570 +#: application/helpers/SurveyRuntimeHelper.php:551 msgid "Your survey responses have not been recorded. This survey is not yet active." msgstr "" -#: application/helpers/SurveyRuntimeHelper.php:575 +#: application/helpers/SurveyRuntimeHelper.php:556 msgid "Clear Responses" msgstr "" -#: application/helpers/SurveyRuntimeHelper.php:631 +#: application/helpers/SurveyRuntimeHelper.php:612 #: application/views/admin/templates/templateeditor_completed_view.php:4 msgid "Your survey responses have been recorded." msgstr "" -#: application/helpers/SurveyRuntimeHelper.php:644 +#: application/helpers/SurveyRuntimeHelper.php:625 msgid "Print your answers." msgstr "" -#: application/helpers/SurveyRuntimeHelper.php:660 +#: application/helpers/SurveyRuntimeHelper.php:641 msgid "View the statistics for this survey." msgstr "" -#: application/helpers/SurveyRuntimeHelper.php:730 +#: application/helpers/SurveyRuntimeHelper.php:711 msgid "Sorry. There is no matching survey." msgstr "" -#: application/helpers/SurveyRuntimeHelper.php:747 +#: application/helpers/SurveyRuntimeHelper.php:728 msgid "Invalid group number for this survey: " msgstr "" -#: application/helpers/SurveyRuntimeHelper.php:753 +#: application/helpers/SurveyRuntimeHelper.php:734 msgid "This group contains no questions. You must add questions to this group before you can preview it" msgstr "" -#: application/helpers/SurveyRuntimeHelper.php:771 +#: application/helpers/SurveyRuntimeHelper.php:752 msgid "Submit your answers" msgstr "" -#: application/helpers/SurveyRuntimeHelper.php:772 +#: application/helpers/SurveyRuntimeHelper.php:753 msgid "There are no more questions. Please press the button to finish this survey." msgstr "" -#: application/helpers/SurveyRuntimeHelper.php:1019 +#: application/helpers/SurveyRuntimeHelper.php:1000 msgid "One or more uploaded files are not in proper format/size. You cannot proceed until these files are valid." msgstr "" @@ -8602,174 +8689,186 @@ msgid "Japanese" msgstr "" #: application/helpers/surveytranslator_helper.php:368 -msgid "Kinyarwanda" +msgid "Kazakh" msgstr "" #: application/helpers/surveytranslator_helper.php:375 -msgid "Korean" +msgid "Kinyarwanda" msgstr "" #: application/helpers/surveytranslator_helper.php:382 +msgid "Korean" +msgstr "" + +#: application/helpers/surveytranslator_helper.php:389 msgid "Kurdish (Sorani)" msgstr "" -#: application/helpers/surveytranslator_helper.php:390 +#: application/helpers/surveytranslator_helper.php:396 +msgid "Kyrgyz" +msgstr "" + +#: application/helpers/surveytranslator_helper.php:403 msgid "Lithuanian" msgstr "" -#: application/helpers/surveytranslator_helper.php:397 +#: application/helpers/surveytranslator_helper.php:410 msgid "Latvian" msgstr "" -#: application/helpers/surveytranslator_helper.php:404 +#: application/helpers/surveytranslator_helper.php:417 msgid "Macedonian" msgstr "" -#: application/helpers/surveytranslator_helper.php:411 +#: application/helpers/surveytranslator_helper.php:424 msgid "Mongolian" msgstr "" -#: application/helpers/surveytranslator_helper.php:418 +#: application/helpers/surveytranslator_helper.php:431 msgid "Malay" msgstr "" -#: application/helpers/surveytranslator_helper.php:425 +#: application/helpers/surveytranslator_helper.php:438 msgid "Maltese" msgstr "" -#: application/helpers/surveytranslator_helper.php:432 +#: application/helpers/surveytranslator_helper.php:445 msgid "Marathi" msgstr "" -#: application/helpers/surveytranslator_helper.php:439 +#: application/helpers/surveytranslator_helper.php:452 msgid "Norwegian (Bokmal)" msgstr "" -#: application/helpers/surveytranslator_helper.php:446 +#: application/helpers/surveytranslator_helper.php:459 msgid "Norwegian (Nynorsk)" msgstr "" -#: application/helpers/surveytranslator_helper.php:453 +#: application/helpers/surveytranslator_helper.php:466 msgid "Occitan" msgstr "" -#: application/helpers/surveytranslator_helper.php:460 +#: application/helpers/surveytranslator_helper.php:473 msgid "Pashto" msgstr "" -#: application/helpers/surveytranslator_helper.php:467 +#: application/helpers/surveytranslator_helper.php:480 msgid "Persian" msgstr "" -#: application/helpers/surveytranslator_helper.php:474 +#: application/helpers/surveytranslator_helper.php:487 msgid "Papiamento (Aruba)" msgstr "" -#: application/helpers/surveytranslator_helper.php:481 +#: application/helpers/surveytranslator_helper.php:494 msgid "Papiamento (Curaçao and Bonaire)" msgstr "" -#: application/helpers/surveytranslator_helper.php:488 +#: application/helpers/surveytranslator_helper.php:501 msgid "Polish" msgstr "" -#: application/helpers/surveytranslator_helper.php:495 +#: application/helpers/surveytranslator_helper.php:508 +msgid "Polish (Informal)" +msgstr "" + +#: application/helpers/surveytranslator_helper.php:515 msgid "Portuguese" msgstr "" -#: application/helpers/surveytranslator_helper.php:502 +#: application/helpers/surveytranslator_helper.php:522 msgid "Portuguese (Brazilian)" msgstr "" -#: application/helpers/surveytranslator_helper.php:509 +#: application/helpers/surveytranslator_helper.php:529 msgid "Punjabi" msgstr "" -#: application/helpers/surveytranslator_helper.php:516 +#: application/helpers/surveytranslator_helper.php:536 msgid "Russian" msgstr "" -#: application/helpers/surveytranslator_helper.php:523 +#: application/helpers/surveytranslator_helper.php:543 msgid "Romanian" msgstr "" -#: application/helpers/surveytranslator_helper.php:530 +#: application/helpers/surveytranslator_helper.php:550 msgid "Slovak" msgstr "" -#: application/helpers/surveytranslator_helper.php:537 +#: application/helpers/surveytranslator_helper.php:557 msgid "Sinhala" msgstr "" -#: application/helpers/surveytranslator_helper.php:544 +#: application/helpers/surveytranslator_helper.php:564 msgid "Slovenian" msgstr "" -#: application/helpers/surveytranslator_helper.php:551 +#: application/helpers/surveytranslator_helper.php:571 msgid "Serbian (Cyrillic)" msgstr "" -#: application/helpers/surveytranslator_helper.php:558 +#: application/helpers/surveytranslator_helper.php:578 msgid "Serbian (Latin)" msgstr "" -#: application/helpers/surveytranslator_helper.php:565 +#: application/helpers/surveytranslator_helper.php:585 msgid "Spanish" msgstr "" -#: application/helpers/surveytranslator_helper.php:572 +#: application/helpers/surveytranslator_helper.php:592 msgid "Spanish (Argentina)" msgstr "" -#: application/helpers/surveytranslator_helper.php:579 +#: application/helpers/surveytranslator_helper.php:599 msgid "Spanish (Argentina) (Informal)" msgstr "" -#: application/helpers/surveytranslator_helper.php:586 +#: application/helpers/surveytranslator_helper.php:606 msgid "Spanish (Chile)" msgstr "" -#: application/helpers/surveytranslator_helper.php:593 +#: application/helpers/surveytranslator_helper.php:613 msgid "Spanish (Mexico)" msgstr "" -#: application/helpers/surveytranslator_helper.php:600 +#: application/helpers/surveytranslator_helper.php:620 msgid "Swahili" msgstr "" -#: application/helpers/surveytranslator_helper.php:607 +#: application/helpers/surveytranslator_helper.php:627 msgid "Swedish" msgstr "" -#: application/helpers/surveytranslator_helper.php:614 +#: application/helpers/surveytranslator_helper.php:634 msgid "Tamil" msgstr "" -#: application/helpers/surveytranslator_helper.php:621 +#: application/helpers/surveytranslator_helper.php:641 msgid "Turkish" msgstr "" -#: application/helpers/surveytranslator_helper.php:628 +#: application/helpers/surveytranslator_helper.php:648 msgid "Thai" msgstr "" -#: application/helpers/surveytranslator_helper.php:636 +#: application/helpers/surveytranslator_helper.php:656 msgid "Urdu" msgstr "" -#: application/helpers/surveytranslator_helper.php:643 +#: application/helpers/surveytranslator_helper.php:663 msgid "Vietnamese" msgstr "" -#: application/helpers/surveytranslator_helper.php:650 +#: application/helpers/surveytranslator_helper.php:670 msgid "Zulu" msgstr "" -#: application/helpers/surveytranslator_helper.php:681 +#: application/helpers/surveytranslator_helper.php:701 msgid "Dot (.)" msgstr "" -#: application/helpers/surveytranslator_helper.php:682 +#: application/helpers/surveytranslator_helper.php:702 msgid "Comma (,)" msgstr "" @@ -8785,23 +8884,23 @@ msgstr "" msgid "Moving user templates to new location at %s..." msgstr "" -#: application/helpers/update/updatedb_helper.php:1272 +#: application/helpers/update/updatedb_helper.php:1279 msgid "An non-recoverable error happened during the update. Error details:" msgstr "" -#: application/helpers/update/updatedb_helper.php:1276 +#: application/helpers/update/updatedb_helper.php:1283 msgid "Database update finished (%s)" msgstr "" -#: application/helpers/update/updatedb_helper.php:2306 +#: application/helpers/update/updatedb_helper.php:2327 msgid "Some user templates can not be updated, please add the placeholder {TEMPLATEJS} in your startpage.pstpl manually." msgstr "" -#: application/helpers/update/updatedb_helper.php:2308 +#: application/helpers/update/updatedb_helper.php:2329 msgid "Template(s) to be verified :" msgstr "" -#: application/helpers/update/updatedb_helper.php:2314 +#: application/helpers/update/updatedb_helper.php:2335 msgid "All %s user templates updated." msgstr "" @@ -8855,7 +8954,7 @@ msgstr "" msgid "Click here to continue" msgstr "" -#: application/libraries/admin/quexmlpdf.php:1615 +#: application/libraries/admin/quexmlpdf.php:1614 msgid "Section" msgstr "" @@ -8888,150 +8987,150 @@ msgstr "" msgid "This name has already been used for this survey. You must use a unique save name." msgstr "" -#: application/libraries/Save.php:213 +#: application/libraries/Save.php:220 msgid "Error: Email failed, this may indicate a PHP Mail Setup problem on the server. Your survey details have still been saved, however you will not get an email with the details. You should note the \"name\" and \"password\" you just used for future reference." msgstr "" -#: application/libraries/Save.php:216 +#: application/libraries/Save.php:223 msgid "(Reason: Admin email address empty)" msgstr "" -#: application/libraries/Save.php:220 +#: application/libraries/Save.php:227 msgid "Your survey was successfully saved." msgstr "" -#: application/models/InstallerConfigForm.php:76 +#: application/models/InstallerConfigForm.php:75 msgid "Passwords do not match!" msgstr "" -#: application/models/Permission.php:63 +#: application/models/Permission.php:74 msgid "Permission to create/view/update/delete assessments rules for a survey" msgstr "" -#: application/models/Permission.php:64 +#: application/models/Permission.php:81 msgid "Permission to create/view/update/delete quota rules for a survey" msgstr "" -#: application/models/Permission.php:65 +#: application/models/Permission.php:85 #: application/views/admin/export/exportresults_view.php:95 #: application/views/admin/survey/importSurvey_view.php:69 -#: application/views/admin/survey/surveybar_view.php:215 +#: application/views/admin/survey/surveybar_view.php:220 msgid "Responses" msgstr "" -#: application/models/Permission.php:65 +#: application/models/Permission.php:86 msgid "Permission to create(data entry)/view/update/delete/import/export responses" msgstr "" -#: application/models/Permission.php:66 +#: application/models/Permission.php:96 msgid "Permission to view statistics" msgstr "" -#: application/models/Permission.php:67 +#: application/models/Permission.php:104 msgid "Survey deletion" msgstr "" -#: application/models/Permission.php:67 +#: application/models/Permission.php:105 msgid "Permission to delete a survey" msgstr "" -#: application/models/Permission.php:68 +#: application/models/Permission.php:114 msgid "Survey activation" msgstr "" -#: application/models/Permission.php:68 +#: application/models/Permission.php:115 msgid "Permission to activate/deactivate a survey" msgstr "" -#: application/models/Permission.php:69 +#: application/models/Permission.php:119 msgid "Survey content" msgstr "" -#: application/models/Permission.php:69 +#: application/models/Permission.php:120 msgid "Permission to create/view/update/delete/import/export the questions, groups, answers & conditions of a survey" msgstr "" -#: application/models/Permission.php:70 -msgid "Survey locale settings" +#: application/models/Permission.php:128 +msgid "Survey text elements" msgstr "" -#: application/models/Permission.php:70 -msgid "Permission to view/update the survey locale settings" +#: application/models/Permission.php:129 +msgid "Permission to view/update the survey text elements : survey title, survey description, welcome and end message …" msgstr "" -#: application/models/Permission.php:71 +#: application/models/Permission.php:135 msgid "Survey security" msgstr "" -#: application/models/Permission.php:71 +#: application/models/Permission.php:136 msgid "Permission to modify survey security settings" msgstr "" -#: application/models/Permission.php:72 +#: application/models/Permission.php:144 msgid "Survey settings" msgstr "" -#: application/models/Permission.php:72 +#: application/models/Permission.php:145 msgid "Permission to view/update the survey settings including token table creation" msgstr "" -#: application/models/Permission.php:73 +#: application/models/Permission.php:149 #: application/views/admin/survey/subview/tab_view.php:17 msgid "Tokens" msgstr "" -#: application/models/Permission.php:73 +#: application/models/Permission.php:149 msgid "Permission to create/update/delete/import/export token entries" msgstr "" -#: application/models/Permission.php:74 +#: application/models/Permission.php:157 msgid "Quick translation" msgstr "" -#: application/models/Permission.php:74 +#: application/models/Permission.php:158 msgid "Permission to view & update the translations using the quick-translation feature" msgstr "" -#: application/models/Permission.php:92 +#: application/models/Permission.php:191 #: application/views/admin/globalSettings_view.php:28 -#: application/views/admin/participants/displayParticipants_view.php:177 +#: application/views/admin/participants/displayParticipants_view.php:173 #: application/views/admin/survey/copySurvey_view.php:20 #: application/views/admin/survey/importSurvey_view.php:34 #: application/views/admin/survey/listSurveys_view.php:7 msgid "Surveys" msgstr "" -#: application/models/Permission.php:92 +#: application/models/Permission.php:192 msgid "Permission to create surveys (for which all permissions are automatically given) and view, update and delete surveys from other users" msgstr "" -#: application/models/Permission.php:93 +#: application/models/Permission.php:198 #: application/views/admin/globalSettings_view.php:25 msgid "Users" msgstr "" -#: application/models/Permission.php:93 +#: application/models/Permission.php:199 msgid "Permission to create, view, update and delete users" msgstr "" -#: application/models/Permission.php:94 +#: application/models/Permission.php:205 #: application/views/admin/usergroup/usergroupbar_view.php:50 msgid "User groups" msgstr "" -#: application/models/Permission.php:94 +#: application/models/Permission.php:206 msgid "Permission to create, view, update and delete user groups" msgstr "" -#: application/models/Permission.php:95 +#: application/models/Permission.php:210 msgid "Templates" msgstr "" -#: application/models/Permission.php:95 +#: application/models/Permission.php:211 msgid "Permission to create, view, update, delete, export and import templates" msgstr "" -#: application/models/Permission.php:96 +#: application/models/Permission.php:215 #: application/views/admin/labels/import_view.php:42 #: application/views/admin/survey/copySurvey_view.php:39 #: application/views/admin/survey/importSurvey_view.php:54 @@ -9040,32 +9139,32 @@ msgstr "" msgid "Label sets" msgstr "" -#: application/models/Permission.php:96 +#: application/models/Permission.php:216 msgid "Permission to create, view, update, delete, export and import label sets/labels" msgstr "" -#: application/models/Permission.php:97 +#: application/models/Permission.php:223 msgid "Settings & Plugins" msgstr "" -#: application/models/Permission.php:97 +#: application/models/Permission.php:224 msgid "Permission to view and update global settings & plugins and to delete and import plugins" msgstr "" -#: application/models/Permission.php:98 +#: application/models/Permission.php:229 #: application/views/admin/participants/participantsPanel_view.php:16 msgid "Participant panel" msgstr "" -#: application/models/Permission.php:98 +#: application/models/Permission.php:230 msgid "Permission to create your own participants in the central participants database (for which all permissions are automatically given) and view, update and delete participants from other users" msgstr "" -#: application/models/Permission.php:101 +#: application/models/Permission.php:241 msgid "Superadministrator" msgstr "" -#: application/models/Permission.php:101 +#: application/models/Permission.php:242 msgid "Unlimited administration permissions" msgstr "" @@ -9229,18 +9328,18 @@ msgstr "" #: application/models/Token.php:44 #: application/views/admin/participants/displayParticipants_view.php:74 -#: application/views/admin/participants/displayParticipants_view.php:177 -#: application/views/admin/participants/displayParticipants_view.php:199 +#: application/views/admin/participants/displayParticipants_view.php:173 +#: application/views/admin/participants/displayParticipants_view.php:195 msgid "Blacklisted" msgstr "" -#: application/models/Token.php:50 application/views/admin/token/browse.php:117 +#: application/models/Token.php:50 application/views/admin/token/browse.php:111 #: application/views/admin/token/dummytokenform.php:24 #: application/views/admin/token/tokenform.php:133 msgid "Valid from" msgstr "" -#: application/models/Token.php:51 application/views/admin/token/browse.php:117 +#: application/models/Token.php:51 application/views/admin/token/browse.php:111 msgid "Valid until" msgstr "" @@ -9253,12 +9352,12 @@ msgid "Assessment rules" msgstr "" #: application/views/admin/assessments_view.php:9 -#: application/views/admin/participants/attributeControl_view.php:25 +#: application/views/admin/participants/attributeControl_view.php:26 #: application/views/admin/participants/displayParticipants_view.php:103 #: application/views/admin/responses/browseallheader_view.php:74 #: application/views/admin/responses/browsetimeheader_view.php:51 #: application/views/admin/saved/savedlist_view.php:6 -#: application/views/admin/survey/Question/answerOptions_view.php:78 +#: application/views/admin/survey/Question/answerOptions_view.php:79 msgid "Actions" msgstr "" @@ -9269,17 +9368,11 @@ msgstr "" #: application/views/admin/assessments_view.php:13 #: application/views/admin/assessments_view.php:122 -#: application/views/admin/token/email.php:75 +#: application/views/admin/token/email.php:77 #: application/views/admin/token/remind.php:53 msgid "Message" msgstr "" -#: application/views/admin/assessments_view.php:39 -#: application/views/admin/assessments_view.php:71 -#: application/views/admin/survey/listSurveys_view.php:46 -msgid "Total" -msgstr "" - #: application/views/admin/assessments_view.php:89 msgid "No question group found." msgstr "" @@ -9326,9 +9419,9 @@ msgstr "" #: application/views/admin/authentication/login.php:50 #: application/views/admin/globalSettings_view.php:17 #: application/views/admin/participants/displayParticipants_view.php:77 -#: application/views/admin/participants/displayParticipants_view.php:177 -#: application/views/admin/participants/displayParticipants_view.php:202 -#: application/views/admin/token/browse.php:117 +#: application/views/admin/participants/displayParticipants_view.php:173 +#: application/views/admin/participants/displayParticipants_view.php:198 +#: application/views/admin/token/browse.php:111 #: application/views/admin/token/dummytokenform.php:19 #: application/views/admin/token/tokenform.php:66 msgid "Language" @@ -9356,168 +9449,168 @@ msgstr "" msgid "The following conditions should be deleted:" msgstr "" -#: application/views/admin/checkintegrity/check_view.php:14 -#: application/views/admin/checkintegrity/check_view.php:76 -#: application/views/admin/checkintegrity/check_view.php:93 -#: application/views/admin/checkintegrity/check_view.php:110 -#: application/views/admin/checkintegrity/check_view.php:127 -#: application/views/admin/checkintegrity/check_view.php:144 -#: application/views/admin/checkintegrity/check_view.php:162 +#: application/views/admin/checkintegrity/check_view.php:15 +#: application/views/admin/checkintegrity/check_view.php:78 +#: application/views/admin/checkintegrity/check_view.php:96 +#: application/views/admin/checkintegrity/check_view.php:114 +#: application/views/admin/checkintegrity/check_view.php:132 +#: application/views/admin/checkintegrity/check_view.php:150 +#: application/views/admin/checkintegrity/check_view.php:168 msgid "Reason:" msgstr "" -#: application/views/admin/checkintegrity/check_view.php:21 +#: application/views/admin/checkintegrity/check_view.php:23 msgid "All conditions meet consistency standards." msgstr "" -#: application/views/admin/checkintegrity/check_view.php:26 +#: application/views/admin/checkintegrity/check_view.php:28 msgid "There are %s orphaned question attributes." msgstr "" -#: application/views/admin/checkintegrity/check_view.php:30 +#: application/views/admin/checkintegrity/check_view.php:32 msgid "All question attributes meet consistency standards." msgstr "" -#: application/views/admin/checkintegrity/check_view.php:35 +#: application/views/admin/checkintegrity/check_view.php:37 msgid "There are %s orphaned default value entries which can be deleted." msgstr "" -#: application/views/admin/checkintegrity/check_view.php:39 +#: application/views/admin/checkintegrity/check_view.php:41 msgid "All default values meet consistency standards." msgstr "" -#: application/views/admin/checkintegrity/check_view.php:44 +#: application/views/admin/checkintegrity/check_view.php:46 msgid "There are %s orphaned quota entries which can be deleted." msgstr "" -#: application/views/admin/checkintegrity/check_view.php:48 +#: application/views/admin/checkintegrity/check_view.php:50 msgid "All quotas meet consistency standards." msgstr "" -#: application/views/admin/checkintegrity/check_view.php:53 +#: application/views/admin/checkintegrity/check_view.php:55 msgid "There are %s orphaned quota language settings which can be deleted." msgstr "" -#: application/views/admin/checkintegrity/check_view.php:57 +#: application/views/admin/checkintegrity/check_view.php:59 msgid "All quota language settings meet consistency standards." msgstr "" -#: application/views/admin/checkintegrity/check_view.php:62 +#: application/views/admin/checkintegrity/check_view.php:64 msgid "There are %s orphaned quota members which can be deleted." msgstr "" -#: application/views/admin/checkintegrity/check_view.php:66 +#: application/views/admin/checkintegrity/check_view.php:68 msgid "All quota quota members meet consistency standards." msgstr "" -#: application/views/admin/checkintegrity/check_view.php:72 +#: application/views/admin/checkintegrity/check_view.php:74 msgid "The following assessments should be deleted:" msgstr "" -#: application/views/admin/checkintegrity/check_view.php:76 +#: application/views/admin/checkintegrity/check_view.php:78 msgid "Assessment:" msgstr "" -#: application/views/admin/checkintegrity/check_view.php:83 +#: application/views/admin/checkintegrity/check_view.php:86 msgid "All assessments meet consistency standards." msgstr "" -#: application/views/admin/checkintegrity/check_view.php:89 +#: application/views/admin/checkintegrity/check_view.php:92 msgid "The following answers should be deleted:" msgstr "" -#: application/views/admin/checkintegrity/check_view.php:93 +#: application/views/admin/checkintegrity/check_view.php:96 #: application/views/admin/survey/Question/editQuestion_view.php:55 #: application/views/admin/survey/Question/questionbar_view.php:151 msgid "Code:" msgstr "" -#: application/views/admin/checkintegrity/check_view.php:100 +#: application/views/admin/checkintegrity/check_view.php:104 msgid "All answers meet consistency standards." msgstr "" -#: application/views/admin/checkintegrity/check_view.php:106 +#: application/views/admin/checkintegrity/check_view.php:110 msgid "The following surveys should be deleted:" msgstr "" -#: application/views/admin/checkintegrity/check_view.php:117 +#: application/views/admin/checkintegrity/check_view.php:122 msgid "All surveys meet consistency standards." msgstr "" -#: application/views/admin/checkintegrity/check_view.php:123 +#: application/views/admin/checkintegrity/check_view.php:128 msgid "The following survey language settings should be deleted:" msgstr "" -#: application/views/admin/checkintegrity/check_view.php:134 +#: application/views/admin/checkintegrity/check_view.php:140 msgid "All survey language settings meet consistency standards." msgstr "" -#: application/views/admin/checkintegrity/check_view.php:140 +#: application/views/admin/checkintegrity/check_view.php:146 msgid "The following questions should be deleted:" msgstr "" -#: application/views/admin/checkintegrity/check_view.php:152 +#: application/views/admin/checkintegrity/check_view.php:158 msgid "All questions meet consistency standards." msgstr "" -#: application/views/admin/checkintegrity/check_view.php:158 +#: application/views/admin/checkintegrity/check_view.php:164 msgid "The following groups should be deleted:" msgstr "" -#: application/views/admin/checkintegrity/check_view.php:169 +#: application/views/admin/checkintegrity/check_view.php:176 msgid "All groups meet consistency standards." msgstr "" -#: application/views/admin/checkintegrity/check_view.php:175 +#: application/views/admin/checkintegrity/check_view.php:182 msgid "The following old survey tables should be deleted because they contain no records or their parent survey no longer exists:" msgstr "" -#: application/views/admin/checkintegrity/check_view.php:187 +#: application/views/admin/checkintegrity/check_view.php:194 msgid "All old survey tables meet consistency standards." msgstr "" -#: application/views/admin/checkintegrity/check_view.php:193 +#: application/views/admin/checkintegrity/check_view.php:200 msgid "The following old token tables should be deleted because they contain no records or their parent survey no longer exists:" msgstr "" -#: application/views/admin/checkintegrity/check_view.php:204 +#: application/views/admin/checkintegrity/check_view.php:212 msgid "All old token tables meet consistency standards." msgstr "" -#: application/views/admin/checkintegrity/check_view.php:209 -#: application/views/admin/checkintegrity/check_view.php:225 +#: application/views/admin/checkintegrity/check_view.php:217 +#: application/views/admin/checkintegrity/check_view.php:233 msgid "No database action required!" msgstr "" -#: application/views/admin/checkintegrity/check_view.php:212 +#: application/views/admin/checkintegrity/check_view.php:220 msgid "Should we proceed with the delete?" msgstr "" -#: application/views/admin/checkintegrity/check_view.php:215 +#: application/views/admin/checkintegrity/check_view.php:223 msgid "Yes - Delete Them!" msgstr "" -#: application/views/admin/checkintegrity/check_view.php:221 +#: application/views/admin/checkintegrity/check_view.php:229 msgid "Data redundancy check" msgstr "" -#: application/views/admin/checkintegrity/check_view.php:222 +#: application/views/admin/checkintegrity/check_view.php:230 msgid "The redundancy check looks for tables leftover after deactivating a survey. You can delete these if you no longer require them." msgstr "" -#: application/views/admin/checkintegrity/check_view.php:233 +#: application/views/admin/checkintegrity/check_view.php:241 msgid "The following old survey response tables exist and may be deleted if no longer required:" msgstr "" -#: application/views/admin/checkintegrity/check_view.php:247 +#: application/views/admin/checkintegrity/check_view.php:255 msgid "The following old token list tables exist and may be deleted if no longer required:" msgstr "" -#: application/views/admin/checkintegrity/check_view.php:259 +#: application/views/admin/checkintegrity/check_view.php:267 msgid "Delete checked items!" msgstr "" -#: application/views/admin/checkintegrity/check_view.php:260 +#: application/views/admin/checkintegrity/check_view.php:268 msgid "Note that you cannot undo a delete if you proceed. The data will be gone." msgstr "" @@ -9622,7 +9715,7 @@ msgstr "" #: application/views/admin/dataentry/active_html_view.php:40 #: application/views/admin/dataentry/insert.php:15 #: application/views/admin/globalSettings_view.php:312 -#: application/views/admin/token/bounce.php:47 +#: application/views/admin/token/bounce.php:50 msgid "Password:" msgstr "" @@ -9922,15 +10015,15 @@ msgstr "" msgid "Detailed notification attachments:" msgstr "" -#: application/views/admin/emailtemplates/email_language_template_tab.php:33 +#: application/views/admin/emailtemplates/email_language_template_tab.php:20 msgid "Add file" msgstr "" -#: application/views/admin/emailtemplates/email_language_template_tab.php:39 +#: application/views/admin/emailtemplates/email_language_template_tab.php:26 msgid "Size" msgstr "" -#: application/views/admin/emailtemplates/email_language_template_tab.php:40 +#: application/views/admin/emailtemplates/email_language_template_tab.php:27 msgid "Relevance" msgstr "" @@ -10145,7 +10238,7 @@ msgid "Open the syntax file in SPSS in Unicode mode" msgstr "" #: application/views/admin/export/spss_view.php:38 -msgid "Edit the 4th line and complete the filename with a full path to the downloaded data file" +msgid "Edit the %s line and complete the filename with a full path to the downloaded data file" msgstr "" #: application/views/admin/export/spss_view.php:39 @@ -10603,13 +10696,13 @@ msgstr "" #: application/views/admin/globalSettings_view.php:266 #: application/views/admin/globalSettings_view.php:321 -#: application/views/admin/token/bounce.php:62 +#: application/views/admin/token/bounce.php:65 msgid "SSL" msgstr "" #: application/views/admin/globalSettings_view.php:269 #: application/views/admin/globalSettings_view.php:324 -#: application/views/admin/token/bounce.php:68 +#: application/views/admin/token/bounce.php:71 msgid "TLS" msgstr "" @@ -10634,37 +10727,37 @@ msgid "Default site bounce email:" msgstr "" #: application/views/admin/globalSettings_view.php:293 -#: application/views/admin/token/bounce.php:28 +#: application/views/admin/token/bounce.php:31 msgid "Server type:" msgstr "" #: application/views/admin/globalSettings_view.php:300 -#: application/views/admin/token/bounce.php:35 +#: application/views/admin/token/bounce.php:38 msgid "IMAP" msgstr "" #: application/views/admin/globalSettings_view.php:303 -#: application/views/admin/token/bounce.php:41 +#: application/views/admin/token/bounce.php:44 msgid "POP" msgstr "" #: application/views/admin/globalSettings_view.php:306 -#: application/views/admin/token/bounce.php:43 +#: application/views/admin/token/bounce.php:46 msgid "Server name & port:" msgstr "" #: application/views/admin/globalSettings_view.php:307 -#: application/views/admin/token/bounce.php:44 +#: application/views/admin/token/bounce.php:47 msgid "Enter your hostname and port, e.g.: imap.gmail.com:995" msgstr "" #: application/views/admin/globalSettings_view.php:309 -#: application/views/admin/token/bounce.php:45 +#: application/views/admin/token/bounce.php:48 msgid "User name:" msgstr "" #: application/views/admin/globalSettings_view.php:314 -#: application/views/admin/token/bounce.php:49 +#: application/views/admin/token/bounce.php:52 msgid "Encryption type:" msgstr "" @@ -10773,50 +10866,70 @@ msgstr "" msgid "Show question code only" msgstr "" -#: application/views/admin/globalSettings_view.php:463 +#: application/views/admin/globalSettings_view.php:458 +msgid "Font size of PDFs" +msgstr "" + +#: application/views/admin/globalSettings_view.php:461 +msgid "Show header in answers export PDFs?" +msgstr "" + +#: application/views/admin/globalSettings_view.php:477 +msgid "Width of PDF header logo" +msgstr "" + +#: application/views/admin/globalSettings_view.php:480 +msgid "PDF header title (if empty, site name will be used)" +msgstr "" + +#: application/views/admin/globalSettings_view.php:483 +msgid "PDF header string (if empty, survey name will be used)" +msgstr "" + +#: application/views/admin/globalSettings_view.php:491 msgid "Default site language:" msgstr "" -#: application/views/admin/globalSettings_view.php:479 +#: application/views/admin/globalSettings_view.php:507 msgid "Available languages:" msgstr "" -#: application/views/admin/globalSettings_view.php:492 +#: application/views/admin/globalSettings_view.php:520 #: application/views/admin/labels/editlabel_view.php:34 #: application/views/admin/quotas/viewquotasrowsub_view.php:10 #: application/views/admin/quotas/viewquotasrow_view.php:37 -#: application/views/admin/survey/subview/tabGeneralEditSurvey_view.php:33 +#: application/views/admin/survey/subview/tabGeneralEditSurvey_view.php:39 msgid "Remove" msgstr "" -#: application/views/admin/globalSettings_view.php:509 +#: application/views/admin/globalSettings_view.php:537 msgid "RPC interface enabled:" msgstr "" -#: application/views/admin/globalSettings_view.php:516 +#: application/views/admin/globalSettings_view.php:544 msgid "JSON-RPC" msgstr "" -#: application/views/admin/globalSettings_view.php:519 +#: application/views/admin/globalSettings_view.php:547 msgid "XML-RPC" msgstr "" -#: application/views/admin/globalSettings_view.php:521 +#: application/views/admin/globalSettings_view.php:549 msgid "URL:" msgstr "" -#: application/views/admin/globalSettings_view.php:523 +#: application/views/admin/globalSettings_view.php:551 msgid "Publish API on /admin/remotecontrol:" msgstr "" -#: application/views/admin/globalSettings_view.php:541 -#: application/views/admin/token/bounce.php:70 +#: application/views/admin/globalSettings_view.php:569 +#: application/views/admin/token/bounce.php:73 #: application/views/admin/user/personalsettings.php:79 #: application/views/admin/user/setusertemplates.php:25 msgid "Save settings" msgstr "" -#: application/views/admin/globalSettings_view.php:544 +#: application/views/admin/globalSettings_view.php:572 msgid "Note: Demo mode is activated. Marked (*) settings can't be changed." msgstr "" @@ -10854,7 +10967,7 @@ msgid "Close" msgstr "" #: application/views/admin/labels/editlabel_view.php:4 -#: application/views/admin/labels/labelsetsbar_view.php:36 +#: application/views/admin/labels/labelsetsbar_view.php:38 msgid "Create or import new label set(s)" msgstr "" @@ -10897,7 +11010,7 @@ msgid "You have to select at least one label set." msgstr "" #: application/views/admin/labels/exportmulti_view.php:7 -#: application/views/admin/labels/labelsetsbar_view.php:14 +#: application/views/admin/labels/labelsetsbar_view.php:15 msgid "Export multiple label sets" msgstr "" @@ -10988,7 +11101,7 @@ msgid "Label set import summary" msgstr "" #: application/views/admin/labels/import_view.php:43 -#: application/views/admin/labels/labelview_view.php:6 +#: application/views/admin/labels/labelview_view.php:1 msgid "Labels" msgstr "" @@ -11004,19 +11117,19 @@ msgstr "" msgid "Label Set" msgstr "" -#: application/views/admin/labels/labelbar_view.php:11 +#: application/views/admin/labels/labelbar_view.php:14 msgid "Do you really want to delete this label set?" msgstr "" -#: application/views/admin/labels/labelbar_view.php:12 +#: application/views/admin/labels/labelbar_view.php:15 msgid "Delete label set" msgstr "" -#: application/views/admin/labels/labelbar_view.php:15 +#: application/views/admin/labels/labelbar_view.php:20 msgid "Export this label set" msgstr "" -#: application/views/admin/labels/labelbar_view.php:18 +#: application/views/admin/labels/labelbar_view.php:24 msgid "Close Window" msgstr "" @@ -11024,110 +11137,110 @@ msgstr "" msgid "Label set administration" msgstr "" -#: application/views/admin/labels/labelsetsbar_view.php:18 +#: application/views/admin/labels/labelsetsbar_view.php:20 msgid "Label sets:" msgstr "" -#: application/views/admin/labels/labelsetsbar_view.php:44 -#: application/views/admin/token/tokenbar.php:82 +#: application/views/admin/labels/labelsetsbar_view.php:46 +#: application/views/admin/token/tokenbar.php:83 msgid "Show help" msgstr "" -#: application/views/admin/labels/labelview_view.php:2 +#: application/views/admin/labels/labelsetsbar_view.php:52 msgid "Error: You are trying to use duplicate label codes." msgstr "" -#: application/views/admin/labels/labelview_view.php:3 +#: application/views/admin/labels/labelsetsbar_view.php:53 #: application/views/admin/survey/Question/subQuestion_view.php:13 msgid "Error: 'other' is a reserved keyword." msgstr "" -#: application/views/admin/labels/labelview_view.php:4 +#: application/views/admin/labels/labelsetsbar_view.php:54 msgid "Quick-add subquestion or answer items" msgstr "" -#: application/views/admin/labels/labelview_view.php:14 +#: application/views/admin/labels/labelview_view.php:9 msgid "Uploaded resources management" msgstr "" -#: application/views/admin/labels/labelview_view.php:39 +#: application/views/admin/labels/labelview_view.php:34 #: application/views/admin/survey/Question/answerOptions_view.php:18 -#: application/views/admin/survey/Question/answerOptions_view.php:66 +#: application/views/admin/survey/Question/answerOptions_view.php:67 #: application/views/admin/survey/Question/subQuestion_view.php:5 -#: application/views/admin/survey/Question/subQuestion_view.php:78 +#: application/views/admin/survey/Question/subQuestion_view.php:79 msgid "Code" msgstr "" -#: application/views/admin/labels/labelview_view.php:87 +#: application/views/admin/labels/labelview_view.php:82 msgid "Label:" msgstr "" -#: application/views/admin/labels/labelview_view.php:95 +#: application/views/admin/labels/labelview_view.php:90 msgid "Insert a new label after this one" msgstr "" -#: application/views/admin/labels/labelview_view.php:96 +#: application/views/admin/labels/labelview_view.php:91 msgid "Delete this label" msgstr "" -#: application/views/admin/labels/labelview_view.php:110 -#: application/views/admin/survey/Question/answerOptions_view.php:150 -#: application/views/admin/survey/Question/subQuestion_view.php:151 +#: application/views/admin/labels/labelview_view.php:105 +#: application/views/admin/survey/Question/answerOptions_view.php:151 +#: application/views/admin/survey/Question/subQuestion_view.php:152 msgid "Quick add..." msgstr "" -#: application/views/admin/labels/labelview_view.php:112 -#: application/views/admin/survey/Question/answerOptions_view.php:214 -#: application/views/admin/survey/Question/subQuestion_view.php:212 +#: application/views/admin/labels/labelview_view.php:107 +#: application/views/admin/survey/Question/answerOptions_view.php:215 +#: application/views/admin/survey/Question/subQuestion_view.php:213 #: application/views/admin/templates/templatesummary_view.php:44 -#: application/views/admin/token/browse.php:81 +#: application/views/admin/token/browse.php:75 msgid "Save changes" msgstr "" -#: application/views/admin/labels/labelview_view.php:125 +#: application/views/admin/labels/labelview_view.php:120 #: application/views/admin/survey/subview/tabResourceManagement_view.php:6 msgid "Files" msgstr "" -#: application/views/admin/labels/labelview_view.php:125 +#: application/views/admin/labels/labelview_view.php:120 #: application/views/admin/survey/subview/tabResourceManagement_view.php:6 msgid "Flash" msgstr "" -#: application/views/admin/labels/labelview_view.php:125 +#: application/views/admin/labels/labelview_view.php:120 #: application/views/admin/survey/subview/tabResourceManagement_view.php:6 msgid "Images" msgstr "" -#: application/views/admin/labels/labelview_view.php:126 +#: application/views/admin/labels/labelview_view.php:121 msgid "Browse uploaded resources" msgstr "" -#: application/views/admin/labels/labelview_view.php:132 +#: application/views/admin/labels/labelview_view.php:127 msgid "Export resources as ZIP archive" msgstr "" -#: application/views/admin/labels/labelview_view.php:144 +#: application/views/admin/labels/labelview_view.php:139 msgid "Select ZIP file:" msgstr "" -#: application/views/admin/labels/labelview_view.php:149 +#: application/views/admin/labels/labelview_view.php:144 msgid "Import resources ZIP archive" msgstr "" -#: application/views/admin/labels/labelview_view.php:160 +#: application/views/admin/labels/labelview_view.php:155 msgid "Enter your labels:" msgstr "" -#: application/views/admin/labels/labelview_view.php:162 +#: application/views/admin/labels/labelview_view.php:157 msgid "Enter one label per line. You can provide a code by separating code and label text with a semikolon or tab. For multilingual surveys you add the translation(s) on the same line separated with a semikolon or tab." msgstr "" -#: application/views/admin/labels/labelview_view.php:164 -#: application/views/admin/survey/Question/answerOptions_view.php:169 -#: application/views/admin/survey/Question/answerOptions_view.php:181 -#: application/views/admin/survey/Question/subQuestion_view.php:167 -#: application/views/admin/survey/Question/subQuestion_view.php:180 +#: application/views/admin/labels/labelview_view.php:159 +#: application/views/admin/survey/Question/answerOptions_view.php:170 +#: application/views/admin/survey/Question/answerOptions_view.php:182 +#: application/views/admin/survey/Question/subQuestion_view.php:168 +#: application/views/admin/survey/Question/subQuestion_view.php:181 msgid "Replace" msgstr "" @@ -11177,8 +11290,8 @@ msgstr "" #: application/views/admin/participants/sharePanel_view.php:17 #: application/views/admin/survey/listSurveys_view.php:12 #: application/views/admin/survey/Question/editQuestion_view.php:294 -#: application/views/admin/token/browse.php:59 -#: application/views/admin/translate/translatetabs_view.php:9 +#: application/views/admin/token/browse.php:53 +#: application/views/admin/translate/translatetabs_view.php:10 msgid "Loading..." msgstr "" @@ -11199,155 +11312,159 @@ msgid "Add attribute" msgstr "" #: application/views/admin/participants/attributeControl_view.php:12 -msgid "This field is required." +msgid "Maximum 60 attributes. Please remove an attribute before adding." msgstr "" #: application/views/admin/participants/attributeControl_view.php:13 +msgid "This field is required." +msgstr "" + +#: application/views/admin/participants/attributeControl_view.php:14 #: application/views/admin/participants/displayParticipants_view.php:113 #: application/views/admin/participants/sharePanel_view.php:22 msgid "Refresh list" msgstr "" -#: application/views/admin/participants/attributeControl_view.php:14 +#: application/views/admin/participants/attributeControl_view.php:15 msgid "Search attributes" msgstr "" -#: application/views/admin/participants/attributeControl_view.php:15 +#: application/views/admin/participants/attributeControl_view.php:16 #: application/views/admin/participants/displayParticipants_view.php:114 #: application/views/admin/participants/sharePanel_view.php:23 #: application/views/admin/survey/listSurveys_view.php:10 -#: application/views/admin/token/browse.php:63 +#: application/views/admin/token/browse.php:57 msgid "Page {0} of {1}" msgstr "" -#: application/views/admin/participants/attributeControl_view.php:16 +#: application/views/admin/participants/attributeControl_view.php:17 #: application/views/admin/participants/displayParticipants_view.php:115 #: application/views/admin/participants/sharePanel_view.php:24 #: application/views/admin/survey/listSurveys_view.php:9 -#: application/views/admin/token/browse.php:62 +#: application/views/admin/token/browse.php:56 msgid "View {0} - {1} of {2}" msgstr "" -#: application/views/admin/participants/attributeControl_view.php:17 +#: application/views/admin/participants/attributeControl_view.php:18 msgid "No attributes to view" msgstr "" -#: application/views/admin/participants/attributeControl_view.php:18 +#: application/views/admin/participants/attributeControl_view.php:19 #: application/views/admin/participants/sharePanel_view.php:25 msgid "Find" msgstr "" -#: application/views/admin/participants/attributeControl_view.php:20 +#: application/views/admin/participants/attributeControl_view.php:21 #: application/views/admin/participants/sharePanel_view.php:27 msgid "Search..." msgstr "" -#: application/views/admin/participants/attributeControl_view.php:21 +#: application/views/admin/participants/attributeControl_view.php:22 #: application/views/admin/participants/displayParticipants_view.php:87 #: application/views/admin/participants/sharePanel_view.php:28 -#: application/views/admin/token/browse.php:114 +#: application/views/admin/token/browse.php:108 msgid "AND" msgstr "" -#: application/views/admin/participants/attributeControl_view.php:25 +#: application/views/admin/participants/attributeControl_view.php:26 #: application/views/admin/participants/displayParticipants_view.php:107 msgid "Attribute name" msgstr "" -#: application/views/admin/participants/attributeControl_view.php:25 +#: application/views/admin/participants/attributeControl_view.php:26 #: application/views/admin/participants/displayParticipants_view.php:105 msgid "Attribute type" msgstr "" -#: application/views/admin/participants/attributeControl_view.php:25 +#: application/views/admin/participants/attributeControl_view.php:26 msgid "Visible in participants panel" msgstr "" -#: application/views/admin/participants/attributeControl_view.php:29 +#: application/views/admin/participants/attributeControl_view.php:30 #: application/views/admin/participants/sharePanel_view.php:30 #: application/views/admin/survey/listSurveys_view.php:16 msgid "equal" msgstr "" -#: application/views/admin/participants/attributeControl_view.php:30 +#: application/views/admin/participants/attributeControl_view.php:31 #: application/views/admin/participants/sharePanel_view.php:31 #: application/views/admin/survey/listSurveys_view.php:17 msgid "not equal" msgstr "" -#: application/views/admin/participants/attributeControl_view.php:31 +#: application/views/admin/participants/attributeControl_view.php:32 #: application/views/admin/participants/sharePanel_view.php:32 #: application/views/admin/survey/listSurveys_view.php:18 msgid "less" msgstr "" -#: application/views/admin/participants/attributeControl_view.php:32 +#: application/views/admin/participants/attributeControl_view.php:33 #: application/views/admin/participants/sharePanel_view.php:33 #: application/views/admin/survey/listSurveys_view.php:19 msgid "less or equal" msgstr "" -#: application/views/admin/participants/attributeControl_view.php:33 +#: application/views/admin/participants/attributeControl_view.php:34 #: application/views/admin/participants/sharePanel_view.php:34 #: application/views/admin/survey/listSurveys_view.php:20 msgid "greater" msgstr "" -#: application/views/admin/participants/attributeControl_view.php:34 +#: application/views/admin/participants/attributeControl_view.php:35 #: application/views/admin/participants/sharePanel_view.php:35 #: application/views/admin/survey/listSurveys_view.php:21 msgid "greater or equal" msgstr "" -#: application/views/admin/participants/attributeControl_view.php:35 +#: application/views/admin/participants/attributeControl_view.php:36 #: application/views/admin/participants/sharePanel_view.php:36 #: application/views/admin/survey/listSurveys_view.php:22 msgid "begins with" msgstr "" -#: application/views/admin/participants/attributeControl_view.php:36 +#: application/views/admin/participants/attributeControl_view.php:37 #: application/views/admin/participants/sharePanel_view.php:37 #: application/views/admin/survey/listSurveys_view.php:23 msgid "does not begin with" msgstr "" -#: application/views/admin/participants/attributeControl_view.php:37 +#: application/views/admin/participants/attributeControl_view.php:38 #: application/views/admin/participants/sharePanel_view.php:38 #: application/views/admin/survey/listSurveys_view.php:24 msgid "is in" msgstr "" -#: application/views/admin/participants/attributeControl_view.php:38 +#: application/views/admin/participants/attributeControl_view.php:39 #: application/views/admin/participants/sharePanel_view.php:39 #: application/views/admin/survey/listSurveys_view.php:25 msgid "is not in" msgstr "" -#: application/views/admin/participants/attributeControl_view.php:39 +#: application/views/admin/participants/attributeControl_view.php:40 #: application/views/admin/participants/sharePanel_view.php:40 #: application/views/admin/survey/listSurveys_view.php:26 msgid "ends with" msgstr "" -#: application/views/admin/participants/attributeControl_view.php:40 +#: application/views/admin/participants/attributeControl_view.php:41 #: application/views/admin/participants/sharePanel_view.php:41 #: application/views/admin/survey/listSurveys_view.php:27 msgid "does not end with" msgstr "" -#: application/views/admin/participants/attributeControl_view.php:41 +#: application/views/admin/participants/attributeControl_view.php:42 #: application/views/admin/participants/sharePanel_view.php:42 #: application/views/admin/survey/listSurveys_view.php:28 msgid "contains" msgstr "" -#: application/views/admin/participants/attributeControl_view.php:42 +#: application/views/admin/participants/attributeControl_view.php:43 #: application/views/admin/participants/sharePanel_view.php:43 #: application/views/admin/survey/listSurveys_view.php:29 msgid "does not contain" msgstr "" -#: application/views/admin/participants/attributeControl_view.php:44 +#: application/views/admin/participants/attributeControl_view.php:45 #: application/views/admin/participants/participantsPanel_view.php:61 #: application/views/admin/participants/participantsPanel_view.php:62 msgid "Attribute management" @@ -11539,65 +11656,65 @@ msgid "Full search" msgstr "" #: application/views/admin/participants/displayParticipants_view.php:70 -#: application/views/admin/participants/displayParticipants_view.php:195 -#: application/views/admin/participants/displayParticipants_view.php:205 -#: application/views/admin/participants/displayParticipants_view.php:260 +#: application/views/admin/participants/displayParticipants_view.php:191 +#: application/views/admin/participants/displayParticipants_view.php:201 +#: application/views/admin/participants/displayParticipants_view.php:256 #: application/views/admin/participants/viewAttribute_view.php:9 -#: application/views/admin/token/browse.php:162 -#: application/views/admin/token/browse.php:170 +#: application/views/admin/token/browse.php:163 +#: application/views/admin/token/browse.php:171 msgid "Select..." msgstr "" #: application/views/admin/participants/displayParticipants_view.php:75 -#: application/views/admin/participants/displayParticipants_view.php:200 +#: application/views/admin/participants/displayParticipants_view.php:196 msgid "Survey links" msgstr "" #: application/views/admin/participants/displayParticipants_view.php:76 #: application/views/admin/participants/displayParticipants_view.php:93 -#: application/views/admin/participants/displayParticipants_view.php:201 +#: application/views/admin/participants/displayParticipants_view.php:197 msgid "Survey name" msgstr "" #: application/views/admin/participants/displayParticipants_view.php:78 -#: application/views/admin/participants/displayParticipants_view.php:203 +#: application/views/admin/participants/displayParticipants_view.php:199 msgid "Owner ID" msgstr "" #: application/views/admin/participants/displayParticipants_view.php:79 -#: application/views/admin/participants/displayParticipants_view.php:177 -#: application/views/admin/participants/displayParticipants_view.php:204 +#: application/views/admin/participants/displayParticipants_view.php:173 +#: application/views/admin/participants/displayParticipants_view.php:200 msgid "Owner name" msgstr "" #: application/views/admin/participants/displayParticipants_view.php:80 -#: application/views/admin/participants/displayParticipants_view.php:206 -#: application/views/admin/token/browse.php:116 -#: application/views/admin/token/browse.php:171 +#: application/views/admin/participants/displayParticipants_view.php:202 +#: application/views/admin/token/browse.php:110 +#: application/views/admin/token/browse.php:172 msgid "Equals" msgstr "" #: application/views/admin/participants/displayParticipants_view.php:81 -#: application/views/admin/participants/displayParticipants_view.php:207 -#: application/views/admin/token/browse.php:116 -#: application/views/admin/token/browse.php:172 +#: application/views/admin/participants/displayParticipants_view.php:203 +#: application/views/admin/token/browse.php:110 +#: application/views/admin/token/browse.php:173 msgid "Contains" msgstr "" #: application/views/admin/participants/displayParticipants_view.php:82 -#: application/views/admin/participants/displayParticipants_view.php:209 -#: application/views/admin/token/browse.php:116 -#: application/views/admin/token/browse.php:173 +#: application/views/admin/participants/displayParticipants_view.php:205 +#: application/views/admin/token/browse.php:110 +#: application/views/admin/token/browse.php:174 msgid "Not equal" msgstr "" #: application/views/admin/participants/displayParticipants_view.php:83 -#: application/views/admin/participants/displayParticipants_view.php:210 +#: application/views/admin/participants/displayParticipants_view.php:206 msgid "Does not contain" msgstr "" #: application/views/admin/participants/displayParticipants_view.php:86 -#: application/views/admin/participants/displayParticipants_view.php:208 +#: application/views/admin/participants/displayParticipants_view.php:204 msgid "Begins with" msgstr "" @@ -11655,7 +11772,7 @@ msgid "Delete selected participants" msgstr "" #: application/views/admin/participants/displayParticipants_view.php:116 -#: application/views/admin/participants/displayParticipants_view.php:295 +#: application/views/admin/participants/displayParticipants_view.php:291 msgid "Participants" msgstr "" @@ -11713,8 +11830,8 @@ msgstr "" #: application/views/admin/participants/displayParticipants_view.php:136 #: application/views/admin/participants/sharePanel_view.php:20 -#: application/views/admin/token/browse.php:60 -#: application/views/admin/token/browse.php:223 +#: application/views/admin/token/browse.php:54 +#: application/views/admin/token/browse.php:224 msgid "Please select at least one participant." msgstr "" @@ -11727,11 +11844,12 @@ msgid "Export CSV" msgstr "" #: application/views/admin/participants/displayParticipants_view.php:139 -msgid "Please choose either of the options" +#: application/views/admin/participants/displayParticipants_view.php:144 +msgid "Please choose one option." msgstr "" #: application/views/admin/participants/displayParticipants_view.php:140 -#: application/views/admin/token/browse.php:67 +#: application/views/admin/token/browse.php:61 msgid "Remove condition" msgstr "" @@ -11739,12 +11857,8 @@ msgstr "" msgid "You must select a survey from the list" msgstr "" -#: application/views/admin/participants/displayParticipants_view.php:144 -msgid "Select one of the three options" -msgstr "" - #: application/views/admin/participants/displayParticipants_view.php:145 -#: application/views/admin/token/browse.php:72 +#: application/views/admin/token/browse.php:66 msgid "You have no row selected" msgstr "" @@ -11752,74 +11866,74 @@ msgstr "" msgid "Delete participant(s) from central participants panel only" msgstr "" -#: application/views/admin/participants/displayParticipants_view.php:147 +#: application/views/admin/participants/displayParticipants_view.php:146 msgid "Delete participant(s) from central panel and tokens tables" msgstr "" -#: application/views/admin/participants/displayParticipants_view.php:148 +#: application/views/admin/participants/displayParticipants_view.php:146 msgid "Delete participant(s) from central panel, tokens tables and all associated responses" msgstr "" -#: application/views/admin/participants/displayParticipants_view.php:150 -#: application/views/admin/token/browse.php:73 +#: application/views/admin/participants/displayParticipants_view.php:147 +#: application/views/admin/token/browse.php:67 msgid "Search" msgstr "" -#: application/views/admin/participants/displayParticipants_view.php:151 -#: application/views/admin/token/browse.php:74 +#: application/views/admin/participants/displayParticipants_view.php:148 +#: application/views/admin/token/browse.php:68 msgid "You can see and edit settings for shared participants in share panel." msgstr "" -#: application/views/admin/participants/displayParticipants_view.php:161 +#: application/views/admin/participants/displayParticipants_view.php:158 msgid "Remove search condition" msgstr "" -#: application/views/admin/participants/displayParticipants_view.php:162 -#: application/views/admin/participants/displayParticipants_view.php:229 +#: application/views/admin/participants/displayParticipants_view.php:159 +#: application/views/admin/participants/displayParticipants_view.php:225 msgid "Add search condition" msgstr "" -#: application/views/admin/participants/displayParticipants_view.php:241 +#: application/views/admin/participants/displayParticipants_view.php:237 msgid "Please select a field" msgstr "" -#: application/views/admin/participants/displayParticipants_view.php:246 +#: application/views/admin/participants/displayParticipants_view.php:242 msgid "Please select a condition" msgstr "" -#: application/views/admin/participants/displayParticipants_view.php:251 +#: application/views/admin/participants/displayParticipants_view.php:247 msgid "Please select at least one participant" msgstr "" -#: application/views/admin/participants/displayParticipants_view.php:254 +#: application/views/admin/participants/displayParticipants_view.php:250 msgid "Share" msgstr "" -#: application/views/admin/participants/displayParticipants_view.php:257 +#: application/views/admin/participants/displayParticipants_view.php:253 msgid "User with whom the participants are to be shared" msgstr "" -#: application/views/admin/participants/displayParticipants_view.php:274 +#: application/views/admin/participants/displayParticipants_view.php:270 msgid "Allow this user to edit these participants" msgstr "" -#: application/views/admin/participants/displayParticipants_view.php:296 +#: application/views/admin/participants/displayParticipants_view.php:292 msgid "Add all participants in your current list to a survey." msgstr "" -#: application/views/admin/participants/displayParticipants_view.php:297 +#: application/views/admin/participants/displayParticipants_view.php:293 msgid "Add the selected participants to a survey." msgstr "" -#: application/views/admin/participants/displayParticipants_view.php:320 +#: application/views/admin/participants/displayParticipants_view.php:316 msgid "Options" msgstr "" -#: application/views/admin/participants/displayParticipants_view.php:331 +#: application/views/admin/participants/displayParticipants_view.php:327 msgid "Display survey tokens after adding?" msgstr "" -#: application/views/admin/participants/displayParticipants_view.php:337 +#: application/views/admin/participants/displayParticipants_view.php:333 msgid "You do not have the permission to edit this participant." msgstr "" @@ -12303,26 +12417,26 @@ msgstr "" #: application/views/admin/responses/browseallheader_view.php:15 #: application/views/admin/responses/browsetimeheader_view.php:13 #: application/views/admin/responses/browsetimeheader_view.php:14 -#: application/views/admin/token/browse.php:142 +#: application/views/admin/token/browse.php:143 msgid "Show start..." msgstr "" #: application/views/admin/responses/browseallheader_view.php:17 #: application/views/admin/responses/browsetimeheader_view.php:16 #: application/views/admin/responses/browsetimeheader_view.php:17 -#: application/views/admin/token/browse.php:143 +#: application/views/admin/token/browse.php:144 msgid "Show previous.." msgstr "" #: application/views/admin/responses/browseallheader_view.php:21 #: application/views/admin/responses/browsetimeheader_view.php:21 -#: application/views/admin/token/browse.php:145 +#: application/views/admin/token/browse.php:146 msgid "Show next.." msgstr "" #: application/views/admin/responses/browseallheader_view.php:23 #: application/views/admin/responses/browsetimeheader_view.php:24 -#: application/views/admin/token/browse.php:146 +#: application/views/admin/token/browse.php:147 msgid "Show last.." msgstr "" @@ -12438,7 +12552,7 @@ msgid "Total invitations sent" msgstr "" #: application/views/admin/responses/browseindex_view.php:15 -#: application/views/admin/token/tokensummary.php:40 +#: application/views/admin/token/tokensummary.php:48 msgid "Total surveys completed" msgstr "" @@ -12638,12 +12752,12 @@ msgid "Save IP address?" msgstr "" #: application/views/admin/survey/activateSurvey_view.php:108 -#: application/views/admin/survey/subview/tabNotification_view.php:71 +#: application/views/admin/survey/subview/tabNotification_view.php:39 msgid "Save referrer URL?" msgstr "" #: application/views/admin/survey/activateSurvey_view.php:123 -#: application/views/admin/survey/subview/tabNotification_view.php:97 +#: application/views/admin/survey/subview/tabNotification_view.php:54 msgid "Save timings?" msgstr "" @@ -12875,20 +12989,15 @@ msgstr "" msgid "Edit survey settings" msgstr "" -#: application/views/admin/survey/editSurvey_view.php:34 -#: application/views/admin/survey/editSurvey_view.php:35 -msgid "All questions, answers, etc for removed languages will be lost. Are you sure?" -msgstr "" - -#: application/views/admin/survey/editSurvey_view.php:35 +#: application/views/admin/survey/editSurvey_view.php:27 msgid "Save & edit survey text elements" msgstr "" -#: application/views/admin/survey/editSurvey_view.php:40 +#: application/views/admin/survey/editSurvey_view.php:43 msgid "Parameter name:" msgstr "" -#: application/views/admin/survey/editSurvey_view.php:42 +#: application/views/admin/survey/editSurvey_view.php:45 msgid "Target (sub-)question:" msgstr "" @@ -12966,7 +13075,7 @@ msgid "is not null" msgstr "" #: application/views/admin/survey/listSurveys_view.php:32 -#: application/views/admin/token/browse.php:93 +#: application/views/admin/token/browse.php:87 msgid "Filter" msgstr "" @@ -13081,95 +13190,91 @@ msgid "There are no label sets which match the survey default language" msgstr "" #: application/views/admin/survey/Question/answerOptions_view.php:28 -#: application/views/admin/survey/Question/answerOptions_view.php:153 +#: application/views/admin/survey/Question/answerOptions_view.php:154 #: application/views/admin/survey/Question/subQuestion_view.php:15 -#: application/views/admin/survey/Question/subQuestion_view.php:153 +#: application/views/admin/survey/Question/subQuestion_view.php:154 msgid "Save as label set" msgstr "" -#: application/views/admin/survey/Question/answerOptions_view.php:34 -#: application/views/admin/survey/Question/subQuestion_view.php:21 -msgid "The records have been saved successfully!" -msgstr "" - #: application/views/admin/survey/Question/answerOptions_view.php:35 #: application/views/admin/survey/Question/subQuestion_view.php:22 -msgid "Sorry, the request failed!" +msgid "The records have been saved successfully!" msgstr "" #: application/views/admin/survey/Question/answerOptions_view.php:36 #: application/views/admin/survey/Question/subQuestion_view.php:23 +msgid "Sorry, the request failed!" +msgstr "" + +#: application/views/admin/survey/Question/answerOptions_view.php:37 +#: application/views/admin/survey/Question/subQuestion_view.php:24 msgid "Ok" msgstr "" -#: application/views/admin/survey/Question/answerOptions_view.php:58 +#: application/views/admin/survey/Question/answerOptions_view.php:59 msgid "Answer scale %s" msgstr "" -#: application/views/admin/survey/Question/answerOptions_view.php:77 +#: application/views/admin/survey/Question/answerOptions_view.php:78 msgid "Answer option" msgstr "" -#: application/views/admin/survey/Question/answerOptions_view.php:132 +#: application/views/admin/survey/Question/answerOptions_view.php:133 msgid "Some example answer option" msgstr "" -#: application/views/admin/survey/Question/answerOptions_view.php:133 +#: application/views/admin/survey/Question/answerOptions_view.php:134 msgid "Answer:" msgstr "" -#: application/views/admin/survey/Question/answerOptions_view.php:137 +#: application/views/admin/survey/Question/answerOptions_view.php:138 msgid "Insert a new answer option after this one" msgstr "" -#: application/views/admin/survey/Question/answerOptions_view.php:138 +#: application/views/admin/survey/Question/answerOptions_view.php:139 msgid "Delete this answer option" msgstr "" -#: application/views/admin/survey/Question/answerOptions_view.php:149 -#: application/views/admin/survey/Question/subQuestion_view.php:150 +#: application/views/admin/survey/Question/answerOptions_view.php:150 +#: application/views/admin/survey/Question/subQuestion_view.php:151 msgid "Predefined label sets..." msgstr "" -#: application/views/admin/survey/Question/answerOptions_view.php:166 -#: application/views/admin/survey/Question/subQuestion_view.php:164 +#: application/views/admin/survey/Question/answerOptions_view.php:167 +#: application/views/admin/survey/Question/subQuestion_view.php:165 msgid "Available label sets:" msgstr "" -#: application/views/admin/survey/Question/answerOptions_view.php:178 +#: application/views/admin/survey/Question/answerOptions_view.php:179 msgid "Enter your answers:" msgstr "" -#: application/views/admin/survey/Question/answerOptions_view.php:179 +#: application/views/admin/survey/Question/answerOptions_view.php:180 msgid "Enter one answer per line. You can provide a code by separating code and answer text with a semikolon or tab. For multilingual surveys you add the translation(s) on the same line separated with a semikolon or tab." msgstr "" -#: application/views/admin/survey/Question/answerOptions_view.php:190 -#: application/views/admin/survey/Question/subQuestion_view.php:189 +#: application/views/admin/survey/Question/answerOptions_view.php:191 +#: application/views/admin/survey/Question/subQuestion_view.php:190 msgid "New label set" msgstr "" -#: application/views/admin/survey/Question/answerOptions_view.php:194 -#: application/views/admin/survey/Question/subQuestion_view.php:193 +#: application/views/admin/survey/Question/answerOptions_view.php:195 +#: application/views/admin/survey/Question/subQuestion_view.php:194 msgid "Replace existing label set" msgstr "" -#: application/views/admin/survey/Question/answerOptions_view.php:202 -#: application/views/admin/survey/Question/subQuestion_view.php:200 -msgid "Replace label set?" -msgstr "" - #: application/views/admin/survey/Question/answerOptions_view.php:203 -msgid "You are about to replace a given label set with the current answer options. Continue?" -msgstr "" - -#: application/views/admin/survey/Question/answerOptions_view.php:206 -#: application/views/admin/survey/Question/subQuestion_view.php:204 -msgid "Duplicate label set name" +#: application/views/admin/survey/Question/subQuestion_view.php:201 +msgid "Replace label set?" msgstr "" #: application/views/admin/survey/Question/answerOptions_view.php:207 #: application/views/admin/survey/Question/subQuestion_view.php:205 +msgid "Duplicate label set name" +msgstr "" + +#: application/views/admin/survey/Question/answerOptions_view.php:208 +#: application/views/admin/survey/Question/subQuestion_view.php:206 msgid "Sorry, the name you entered for the label set is already in the database. Please select a different name." msgstr "" @@ -13190,11 +13295,11 @@ msgstr "" msgid "Default value for option 'Other':" msgstr "" -#: application/views/admin/survey/Question/editdefaultvalues_view.php:151 +#: application/views/admin/survey/Question/editdefaultvalues_view.php:166 msgid "Default value:" msgstr "" -#: application/views/admin/survey/Question/editdefaultvalues_view.php:166 +#: application/views/admin/survey/Question/editdefaultvalues_view.php:180 msgid "Use same default value across languages:" msgstr "" @@ -13436,52 +13541,56 @@ msgstr "" msgid "Error: You are trying to use duplicate subquestion codes." msgstr "" -#: application/views/admin/survey/Question/subQuestion_view.php:28 +#: application/views/admin/survey/Question/subQuestion_view.php:29 msgid "Edit subquestions" msgstr "" -#: application/views/admin/survey/Question/subQuestion_view.php:64 +#: application/views/admin/survey/Question/subQuestion_view.php:65 msgid "Y-Scale" msgstr "" -#: application/views/admin/survey/Question/subQuestion_view.php:69 +#: application/views/admin/survey/Question/subQuestion_view.php:70 msgid "X-Scale" msgstr "" -#: application/views/admin/survey/Question/subQuestion_view.php:79 +#: application/views/admin/survey/Question/subQuestion_view.php:80 msgid "Subquestion" msgstr "" -#: application/views/admin/survey/Question/subQuestion_view.php:127 +#: application/views/admin/survey/Question/subQuestion_view.php:128 msgid "Some example subquestion" msgstr "" -#: application/views/admin/survey/Question/subQuestion_view.php:128 +#: application/views/admin/survey/Question/subQuestion_view.php:129 msgid "Subquestion:" msgstr "" -#: application/views/admin/survey/Question/subQuestion_view.php:135 +#: application/views/admin/survey/Question/subQuestion_view.php:136 msgid "Insert a new subquestion after this one" msgstr "" -#: application/views/admin/survey/Question/subQuestion_view.php:136 +#: application/views/admin/survey/Question/subQuestion_view.php:137 msgid "Delete this subquestion" msgstr "" -#: application/views/admin/survey/Question/subQuestion_view.php:177 +#: application/views/admin/survey/Question/subQuestion_view.php:178 msgid "Enter your subquestions:" msgstr "" -#: application/views/admin/survey/Question/subQuestion_view.php:178 +#: application/views/admin/survey/Question/subQuestion_view.php:179 msgid "Enter one subquestion per line. You can provide a code by separating code and subquestion text with a semikolon or tab. For multilingual surveys you add the translation(s) on the same line separated with a semikolon or tab." msgstr "" -#: application/views/admin/survey/Question/subQuestion_view.php:201 -msgid "You are about to replace a given label set with the labels of this subquestions. Continue?" +#: application/views/admin/survey/Question/subQuestion_view.php:219 +msgid "You cannot add/remove subquestions or edit their codes because the survey is active." msgstr "" -#: application/views/admin/survey/Question/subQuestion_view.php:218 -msgid "You cannot add/remove subquestions or edit their codes because the survey is active." +#: application/views/admin/survey/Question/yesNo_defaultvalue_widget.php:64 +msgid "YES" +msgstr "" + +#: application/views/admin/survey/Question/yesNo_defaultvalue_widget.php:65 +msgid "EM Value" msgstr "" #: application/views/admin/survey/QuestionGroups/addGroup_view.php:2 @@ -13645,32 +13754,36 @@ msgstr "" msgid "Reset start/end date/time?" msgstr "" -#: application/views/admin/survey/subview/tabGeneralEditSurvey_view.php:8 +#: application/views/admin/survey/subview/tabGeneralEditSurvey_view.php:5 +msgid "All questions, answers, etc for removed languages will be lost. Are you sure?" +msgstr "" + +#: application/views/admin/survey/subview/tabGeneralEditSurvey_view.php:14 #: application/views/admin/survey/subview/tabGeneralNewSurvey_view.php:4 #: application/views/admin/survey/surveySummary_view.php:114 msgid "Base language:" msgstr "" -#: application/views/admin/survey/subview/tabGeneralEditSurvey_view.php:11 +#: application/views/admin/survey/subview/tabGeneralEditSurvey_view.php:17 msgid "Additional Languages" msgstr "" -#: application/views/admin/survey/subview/tabGeneralEditSurvey_view.php:48 +#: application/views/admin/survey/subview/tabGeneralEditSurvey_view.php:54 #: application/views/admin/survey/subview/tabGeneralNewSurvey_view.php:56 #: application/views/admin/survey/surveySummary_view.php:72 msgid "Administrator:" msgstr "" -#: application/views/admin/survey/subview/tabGeneralEditSurvey_view.php:50 +#: application/views/admin/survey/subview/tabGeneralEditSurvey_view.php:56 #: application/views/admin/survey/subview/tabGeneralNewSurvey_view.php:58 msgid "Admin email:" msgstr "" -#: application/views/admin/survey/subview/tabGeneralEditSurvey_view.php:52 +#: application/views/admin/survey/subview/tabGeneralEditSurvey_view.php:58 msgid "Bounce email:" msgstr "" -#: application/views/admin/survey/subview/tabGeneralEditSurvey_view.php:54 +#: application/views/admin/survey/subview/tabGeneralEditSurvey_view.php:60 #: application/views/admin/survey/subview/tabGeneralNewSurvey_view.php:62 #: application/views/admin/survey/surveySummary_view.php:81 msgid "Fax to:" @@ -13696,83 +13809,83 @@ msgstr "" msgid "Import survey" msgstr "" -#: application/views/admin/survey/subview/tabNotification_view.php:5 +#: application/views/admin/survey/subview/tabNotification_view.php:3 msgid "Send basic admin notification email to:" msgstr "" -#: application/views/admin/survey/subview/tabNotification_view.php:10 +#: application/views/admin/survey/subview/tabNotification_view.php:7 msgid "Send detailed admin notification email to:" msgstr "" -#: application/views/admin/survey/subview/tabNotification_view.php:17 +#: application/views/admin/survey/subview/tabNotification_view.php:11 msgid "Date Stamp?" msgstr "" -#: application/views/admin/survey/subview/tabNotification_view.php:20 +#: application/views/admin/survey/subview/tabNotification_view.php:14 msgid "Responses will not be date stamped." msgstr "" -#: application/views/admin/survey/subview/tabNotification_view.php:24 -#: application/views/admin/survey/subview/tabNotification_view.php:51 -#: application/views/admin/survey/subview/tabNotification_view.php:79 -#: application/views/admin/survey/subview/tabNotification_view.php:103 -#: application/views/admin/survey/subview/tabTokens_view.php:24 +#: application/views/admin/survey/subview/tabNotification_view.php:18 +#: application/views/admin/survey/subview/tabNotification_view.php:32 +#: application/views/admin/survey/subview/tabNotification_view.php:47 +#: application/views/admin/survey/subview/tabNotification_view.php:60 +#: application/views/admin/survey/subview/tabTokens_view.php:31 msgid "Cannot be changed" msgstr "" -#: application/views/admin/survey/subview/tabNotification_view.php:43 +#: application/views/admin/survey/subview/tabNotification_view.php:25 msgid "Save IP Address?" msgstr "" -#: application/views/admin/survey/subview/tabNotification_view.php:47 +#: application/views/admin/survey/subview/tabNotification_view.php:28 msgid "Responses will not have the IP address logged." msgstr "" -#: application/views/admin/survey/subview/tabNotification_view.php:49 +#: application/views/admin/survey/subview/tabNotification_view.php:30 msgid "Responses will have the IP address logged" msgstr "" -#: application/views/admin/survey/subview/tabNotification_view.php:75 +#: application/views/admin/survey/subview/tabNotification_view.php:43 msgid "Responses will not have their referring URL logged." msgstr "" -#: application/views/admin/survey/subview/tabNotification_view.php:77 +#: application/views/admin/survey/subview/tabNotification_view.php:45 msgid "Responses will have their referring URL logged." msgstr "" -#: application/views/admin/survey/subview/tabNotification_view.php:101 +#: application/views/admin/survey/subview/tabNotification_view.php:58 msgid "Timings will not be saved." msgstr "" -#: application/views/admin/survey/subview/tabNotification_view.php:102 +#: application/views/admin/survey/subview/tabNotification_view.php:59 msgid "Timings will be saved." msgstr "" -#: application/views/admin/survey/subview/tabNotification_view.php:120 +#: application/views/admin/survey/subview/tabNotification_view.php:69 msgid "Enable assessment mode?" msgstr "" -#: application/views/admin/survey/subview/tabNotification_view.php:135 +#: application/views/admin/survey/subview/tabNotification_view.php:73 msgid "Participant may save and resume later?" msgstr "" -#: application/views/admin/survey/subview/tabNotification_view.php:149 +#: application/views/admin/survey/subview/tabNotification_view.php:77 msgid "Google Analytics API key for this survey?" msgstr "" -#: application/views/admin/survey/subview/tabNotification_view.php:153 +#: application/views/admin/survey/subview/tabNotification_view.php:81 msgid "Google Analytics style for this survey?" msgstr "" -#: application/views/admin/survey/subview/tabNotification_view.php:159 +#: application/views/admin/survey/subview/tabNotification_view.php:82 msgid "Do not use Google Analytics" msgstr "" -#: application/views/admin/survey/subview/tabNotification_view.php:164 +#: application/views/admin/survey/subview/tabNotification_view.php:82 msgid "Default Google Analytics" msgstr "" -#: application/views/admin/survey/subview/tabNotification_view.php:169 +#: application/views/admin/survey/subview/tabNotification_view.php:82 msgid "Survey name-[SID]/Group name" msgstr "" @@ -13809,7 +13922,7 @@ msgid "Edit URL parameter" msgstr "" #: application/views/admin/survey/subview/tabPluginSettings_view.php:10 -#: application/views/plugins/configure.php:5 +#: application/views/plugins/configure.php:4 msgid "Settings for plugin %s" msgstr "" @@ -13999,43 +14112,55 @@ msgstr "" msgid "Import Resources ZIP Archive" msgstr "" +#: application/views/admin/survey/subview/tabTokens_view.php:2 +msgid "If you set 'Yes' then no link will exist between token table and survey responses table. You won't be able to identify responses by their token." +msgstr "" + #: application/views/admin/survey/subview/tabTokens_view.php:9 msgid "You can't use Anonymized responses when Token-based answers persistence is enabled." msgstr "" -#: application/views/admin/survey/subview/tabTokens_view.php:42 -msgid "With not anonymous survey: user can update his answer after completion, else user can add new answers without restriction." +#: application/views/admin/survey/subview/tabTokens_view.php:21 +msgid "If the option -Anonymized responses- is activated only a dummy date stamp (1980-01-01) will be used for all responses to ensure the anonymity of your participants." msgstr "" -#: application/views/admin/survey/subview/tabTokens_view.php:42 -msgid "Allow multiple responses or update responses with one token?" +#: application/views/admin/survey/subview/tabTokens_view.php:50 +msgid "With non-anonymized responses (and the token table field 'Uses left' set to 1) if the participant closes the survey and opens it again (by using the survey link) his previous answers will be reloaded." msgstr "" -#: application/views/admin/survey/subview/tabTokens_view.php:55 +#: application/views/admin/survey/subview/tabTokens_view.php:50 msgid "Enable token-based response persistence?" msgstr "" -#: application/views/admin/survey/subview/tabTokens_view.php:56 +#: application/views/admin/survey/subview/tabTokens_view.php:51 msgid "This option can't be set if the `Anonymized responses` option is active." msgstr "" -#: application/views/admin/survey/subview/tabTokens_view.php:68 +#: application/views/admin/survey/subview/tabTokens_view.php:66 +msgid "If token-based response persistence is enabled a participant can update his response after completion, else a participant can add new responses without restriction." +msgstr "" + +#: application/views/admin/survey/subview/tabTokens_view.php:66 +msgid "Allow multiple responses or update responses with one token?" +msgstr "" + +#: application/views/admin/survey/subview/tabTokens_view.php:79 msgid "Allow public registration?" msgstr "" -#: application/views/admin/survey/subview/tabTokens_view.php:84 +#: application/views/admin/survey/subview/tabTokens_view.php:95 msgid "Use HTML format for token emails?" msgstr "" -#: application/views/admin/survey/subview/tabTokens_view.php:85 +#: application/views/admin/survey/subview/tabTokens_view.php:96 msgid "If you switch email mode, you'll have to review your email templates to fit the new format" msgstr "" -#: application/views/admin/survey/subview/tabTokens_view.php:101 +#: application/views/admin/survey/subview/tabTokens_view.php:112 msgid "Send confirmation emails?" msgstr "" -#: application/views/admin/survey/subview/tabTokens_view.php:115 +#: application/views/admin/survey/subview/tabTokens_view.php:126 msgid "Set token length to:" msgstr "" @@ -14104,120 +14229,120 @@ msgstr "" msgid "Currently there are no conditions configured for this survey." msgstr "" -#: application/views/admin/survey/surveybar_view.php:138 +#: application/views/admin/survey/surveybar_view.php:141 msgid "By question group" msgstr "" -#: application/views/admin/survey/surveybar_view.php:148 +#: application/views/admin/survey/surveybar_view.php:153 msgid "Display / Export" msgstr "" -#: application/views/admin/survey/surveybar_view.php:152 +#: application/views/admin/survey/surveybar_view.php:157 msgid "Export..." msgstr "" -#: application/views/admin/survey/surveybar_view.php:157 +#: application/views/admin/survey/surveybar_view.php:162 msgid "Survey structure (.lss)" msgstr "" -#: application/views/admin/survey/surveybar_view.php:163 #: application/views/admin/survey/surveybar_view.php:168 +#: application/views/admin/survey/surveybar_view.php:173 msgid "Survey archive (.lsa)" msgstr "" -#: application/views/admin/survey/surveybar_view.php:167 +#: application/views/admin/survey/surveybar_view.php:172 msgid "You can only archive active surveys." msgstr "" -#: application/views/admin/survey/surveybar_view.php:173 +#: application/views/admin/survey/surveybar_view.php:178 msgid "queXML format (*.xml)" msgstr "" -#: application/views/admin/survey/surveybar_view.php:176 +#: application/views/admin/survey/surveybar_view.php:181 msgid "Tab-separated-values format (*.txt)" msgstr "" -#: application/views/admin/survey/surveybar_view.php:185 -#: application/views/admin/survey/surveybar_view.php:188 +#: application/views/admin/survey/surveybar_view.php:190 +#: application/views/admin/survey/surveybar_view.php:193 msgid "Printable version" msgstr "" -#: application/views/admin/survey/surveybar_view.php:199 -#: application/views/admin/survey/surveybar_view.php:202 +#: application/views/admin/survey/surveybar_view.php:204 +#: application/views/admin/survey/surveybar_view.php:207 msgid "QueXML export" msgstr "" -#: application/views/admin/survey/surveybar_view.php:220 -#: application/views/admin/survey/surveybar_view.php:223 +#: application/views/admin/survey/surveybar_view.php:225 +#: application/views/admin/survey/surveybar_view.php:228 msgid "Responses & statistics" msgstr "" -#: application/views/admin/survey/surveybar_view.php:222 +#: application/views/admin/survey/surveybar_view.php:227 msgid "This survey is not active - no responses are available." msgstr "" -#: application/views/admin/survey/surveybar_view.php:229 -#: application/views/admin/survey/surveybar_view.php:232 +#: application/views/admin/survey/surveybar_view.php:234 +#: application/views/admin/survey/surveybar_view.php:237 msgid "Data entry screen" msgstr "" -#: application/views/admin/survey/surveybar_view.php:231 +#: application/views/admin/survey/surveybar_view.php:236 msgid "This survey is not active, data entry is not allowed" msgstr "" -#: application/views/admin/survey/surveybar_view.php:238 -#: application/views/admin/survey/surveybar_view.php:241 +#: application/views/admin/survey/surveybar_view.php:243 +#: application/views/admin/survey/surveybar_view.php:246 msgid "Partial (saved) responses" msgstr "" -#: application/views/admin/survey/surveybar_view.php:240 +#: application/views/admin/survey/surveybar_view.php:245 msgid "This survey is not active - no responses are available" msgstr "" -#: application/views/admin/survey/surveybar_view.php:252 +#: application/views/admin/survey/surveybar_view.php:257 msgid "Question group/question organizer disabled" msgstr "" -#: application/views/admin/survey/surveybar_view.php:259 +#: application/views/admin/survey/surveybar_view.php:264 msgid "Reorder question groups / questions" msgstr "" -#: application/views/admin/survey/surveybar_view.php:265 +#: application/views/admin/survey/surveybar_view.php:270 msgid "Token management" msgstr "" -#: application/views/admin/survey/surveybar_view.php:273 +#: application/views/admin/survey/surveybar_view.php:278 msgid "Question groups:" msgstr "" -#: application/views/admin/survey/surveybar_view.php:283 +#: application/views/admin/survey/surveybar_view.php:288 msgid "Previous question group" msgstr "" -#: application/views/admin/survey/surveybar_view.php:287 +#: application/views/admin/survey/surveybar_view.php:292 msgid "No previous question group" msgstr "" -#: application/views/admin/survey/surveybar_view.php:296 +#: application/views/admin/survey/surveybar_view.php:301 msgid "Next question group" msgstr "" -#: application/views/admin/survey/surveybar_view.php:301 +#: application/views/admin/survey/surveybar_view.php:306 msgid "No next question group" msgstr "" -#: application/views/admin/survey/surveybar_view.php:324 -#: application/views/admin/survey/surveybar_view.php:325 +#: application/views/admin/survey/surveybar_view.php:329 +#: application/views/admin/survey/surveybar_view.php:330 msgid "Hide details of this Survey" msgstr "" -#: application/views/admin/survey/surveybar_view.php:327 -#: application/views/admin/survey/surveybar_view.php:328 +#: application/views/admin/survey/surveybar_view.php:332 +#: application/views/admin/survey/surveybar_view.php:333 msgid "Show details of this survey" msgstr "" -#: application/views/admin/survey/surveybar_view.php:331 -#: application/views/admin/survey/surveybar_view.php:332 +#: application/views/admin/survey/surveybar_view.php:336 +#: application/views/admin/survey/surveybar_view.php:337 msgid "Close this survey" msgstr "" @@ -14465,12 +14590,16 @@ msgstr "" msgid "Preview:" msgstr "" +#: application/views/admin/templates/templatesummary_view.php:109 +msgid "Mobile" +msgstr "" + #: application/views/admin/templates/templatesummary_view.php:122 msgid "Please change the directory permissions of the folder %s in order to preview templates." msgstr "" #: application/views/admin/token/actions.php:1 -#: application/views/admin/token/browse.php:83 +#: application/views/admin/token/browse.php:77 msgid "Are you sure you want to delete the selected entries?" msgstr "" @@ -14497,103 +14626,107 @@ msgstr "" msgid "Add new token entry" msgstr "" -#: application/views/admin/token/bounce.php:5 +#: application/views/admin/token/bounce.php:8 msgid "Survey bounce email:" msgstr "" -#: application/views/admin/token/bounce.php:7 +#: application/views/admin/token/bounce.php:10 msgid "Bounce settings to be used" msgstr "" -#: application/views/admin/token/bounce.php:20 +#: application/views/admin/token/bounce.php:23 msgid "Use settings below" msgstr "" -#: application/views/admin/token/bounce.php:26 +#: application/views/admin/token/bounce.php:29 msgid "Use global settings" msgstr "" -#: application/views/admin/token/browse.php:58 +#: application/views/admin/token/browse.php:52 msgid "Add participants to central database" msgstr "" -#: application/views/admin/token/browse.php:88 +#: application/views/admin/token/browse.php:82 msgid "Participant table is empty." msgstr "" -#: application/views/admin/token/browse.php:90 +#: application/views/admin/token/browse.php:84 msgid "Delete selected participant(s) from this survey" msgstr "" -#: application/views/admin/token/browse.php:91 +#: application/views/admin/token/browse.php:85 msgid "Reload participant list" msgstr "" -#: application/views/admin/token/browse.php:92 +#: application/views/admin/token/browse.php:86 msgid "No survey participants matching the search criteria" msgstr "" -#: application/views/admin/token/browse.php:96 +#: application/views/admin/token/browse.php:90 msgid "Send an invitation email to the selected entries (if they have not yet been sent an invitation email)" msgstr "" -#: application/views/admin/token/browse.php:97 +#: application/views/admin/token/browse.php:91 msgid "Send a reminder email to the selected entries (if they have already received the invitation email)" msgstr "" -#: application/views/admin/token/browse.php:109 +#: application/views/admin/token/browse.php:103 msgid "View participants of this survey in the central participant database panel" msgstr "" -#: application/views/admin/token/browse.php:111 +#: application/views/admin/token/browse.php:105 msgid "Start bounce processing" msgstr "" -#: application/views/admin/token/browse.php:116 -#: application/views/admin/token/browse.php:174 +#: application/views/admin/token/browse.php:110 +#: application/views/admin/token/browse.php:175 msgid "Not contains" msgstr "" -#: application/views/admin/token/browse.php:117 +#: application/views/admin/token/browse.php:111 #: application/views/admin/token/tokenform.php:79 msgid "Invitation sent?" msgstr "" -#: application/views/admin/token/browse.php:117 +#: application/views/admin/token/browse.php:111 #: application/views/admin/token/tokenform.php:91 msgid "Reminder sent?" msgstr "" -#: application/views/admin/token/browse.php:117 +#: application/views/admin/token/browse.php:111 msgid "Reminder count" msgstr "" -#: application/views/admin/token/browse.php:117 +#: application/views/admin/token/browse.php:111 #: application/views/admin/token/tokenform.php:109 msgid "Completed?" msgstr "" -#: application/views/admin/token/browse.php:139 +#: application/views/admin/token/browse.php:133 +msgid "Please enter a value for: " +msgstr "" + +#: application/views/admin/token/browse.php:140 msgid "Survey participants" msgstr "" -#: application/views/admin/token/browse.php:148 +#: application/views/admin/token/browse.php:149 msgid "Filter by" msgstr "" -#: application/views/admin/token/browse.php:183 +#: application/views/admin/token/browse.php:184 msgid "Add another search criteria" msgstr "" -#: application/views/admin/token/browse.php:190 +#: application/views/admin/token/browse.php:191 msgid "Please select the attributes that are to be added to the central database" msgstr "" -#: application/views/admin/token/browse.php:213 +#: application/views/admin/token/browse.php:214 msgid "Please select a field." msgstr "" -#: application/views/admin/token/browse.php:218 +#: application/views/admin/token/browse.php:219 msgid "Please select a condition." msgstr "" @@ -14628,6 +14761,7 @@ msgstr "" #: application/views/admin/token/csvpost.php:29 #: application/views/admin/token/csvpost.php:43 #: application/views/admin/token/csvpost.php:57 +#: application/views/admin/token/csvpost.php:70 #: application/views/admin/token/ldappost.php:14 #: application/views/admin/token/ldappost.php:22 msgid "List" @@ -14637,6 +14771,10 @@ msgstr "" msgid "%s lines had a mismatching number of fields." msgstr "" +#: application/views/admin/token/csvpost.php:69 +msgid "%s records with invalid information" +msgstr "" + #: application/views/admin/token/csvupload.php:9 msgid "Choose the CSV file to upload:" msgstr "" @@ -14705,21 +14843,25 @@ msgstr "" msgid "This survey is not yet activated and so your participants won't be able to fill out the survey." msgstr "" -#: application/views/admin/token/email.php:72 +#: application/views/admin/token/email.php:73 #: application/views/admin/token/remind.php:37 msgid "Subject" msgstr "" -#: application/views/admin/token/email.php:78 +#: application/views/admin/token/email.php:80 msgid "Invitation email:" msgstr "" -#: application/views/admin/token/email.php:85 +#: application/views/admin/token/email.php:90 +msgid "Send invitation email to token ID(s):" +msgstr "" + +#: application/views/admin/token/email.php:94 #: application/views/admin/token/remind.php:74 msgid "Bypass token with failing email addresses" msgstr "" -#: application/views/admin/token/email.php:92 +#: application/views/admin/token/email.php:98 msgid "Send Invitations" msgstr "" @@ -14797,6 +14939,10 @@ msgstr "" msgid "Filter by language" msgstr "" +#: application/views/admin/token/exportdialog.php:35 +msgid "Email address contains" +msgstr "" + #: application/views/admin/token/exportdialog.php:35 msgid "Filter by email address" msgstr "" @@ -14978,6 +15124,10 @@ msgstr "" msgid "Total opted out" msgstr "" +#: application/views/admin/token/tokensummary.php:40 +msgid "Total screened out" +msgstr "" + #: application/views/admin/token/tokenwarning.php:10 msgid "If you initialise tokens for this survey then this survey will only be accessible to users who provide a token either manually or by URL." msgstr "" @@ -15022,7 +15172,7 @@ msgstr "" msgid "Detailed Error" msgstr "" -#: application/views/admin/translate/translatetabs_view.php:8 +#: application/views/admin/translate/translatetabs_view.php:9 msgid "Auto Translate" msgstr "" @@ -15381,6 +15531,10 @@ msgstr "" msgid "Set this to the IP/net location of your database server. In most cases \"localhost\" will work. You can force Unix socket with complete socket path." msgstr "" +#: application/views/installer/dbconfig_view.php:25 +msgid "If your database is using a custom port attach it using a colon. Example: db.example.com:5431" +msgstr "" + #: application/views/installer/dbconfig_view.php:28 msgid "Database user" msgstr "" @@ -15582,7 +15736,11 @@ msgstr "" msgid "LimeSurvey installer" msgstr "" -#: application/views/plugins/configure.php:11 +#: application/views/plugins/configure.php:3 +msgid "Settings for plugin: %s" +msgstr "" + +#: application/views/plugins/configure.php:14 msgid "Save plugin settings" msgstr "" diff --git a/sources/locale/af/LC_MESSAGES/af.mo b/sources/locale/af/LC_MESSAGES/af.mo index dd83497..6a4c6f9 100644 Binary files a/sources/locale/af/LC_MESSAGES/af.mo and b/sources/locale/af/LC_MESSAGES/af.mo differ diff --git a/sources/locale/ar/LC_MESSAGES/ar.mo b/sources/locale/ar/LC_MESSAGES/ar.mo index fac7f5f..916290b 100644 Binary files a/sources/locale/ar/LC_MESSAGES/ar.mo and b/sources/locale/ar/LC_MESSAGES/ar.mo differ diff --git a/sources/locale/ca/LC_MESSAGES/ca.mo b/sources/locale/ca/LC_MESSAGES/ca.mo index 91dda3f..b00ff33 100644 Binary files a/sources/locale/ca/LC_MESSAGES/ca.mo and b/sources/locale/ca/LC_MESSAGES/ca.mo differ diff --git a/sources/locale/ckb/LC_MESSAGES/ckb.mo b/sources/locale/ckb/LC_MESSAGES/ckb.mo index 804dfe2..885a1a2 100644 Binary files a/sources/locale/ckb/LC_MESSAGES/ckb.mo and b/sources/locale/ckb/LC_MESSAGES/ckb.mo differ diff --git a/sources/locale/cs-informal/LC_MESSAGES/cs-informal.mo b/sources/locale/cs-informal/LC_MESSAGES/cs-informal.mo index f8d14ff..411b498 100644 Binary files a/sources/locale/cs-informal/LC_MESSAGES/cs-informal.mo and b/sources/locale/cs-informal/LC_MESSAGES/cs-informal.mo differ diff --git a/sources/locale/cs/LC_MESSAGES/cs.mo b/sources/locale/cs/LC_MESSAGES/cs.mo index f16760e..e4909ba 100644 Binary files a/sources/locale/cs/LC_MESSAGES/cs.mo and b/sources/locale/cs/LC_MESSAGES/cs.mo differ diff --git a/sources/locale/da/LC_MESSAGES/da.mo b/sources/locale/da/LC_MESSAGES/da.mo index 68e3eaf..6d0251d 100644 Binary files a/sources/locale/da/LC_MESSAGES/da.mo and b/sources/locale/da/LC_MESSAGES/da.mo differ diff --git a/sources/locale/de-informal/LC_MESSAGES/de-informal.mo b/sources/locale/de-informal/LC_MESSAGES/de-informal.mo index a0cb4a8..d9031c6 100644 Binary files a/sources/locale/de-informal/LC_MESSAGES/de-informal.mo and b/sources/locale/de-informal/LC_MESSAGES/de-informal.mo differ diff --git a/sources/locale/de/LC_MESSAGES/de.mo b/sources/locale/de/LC_MESSAGES/de.mo index 3671ef8..bbb29d8 100644 Binary files a/sources/locale/de/LC_MESSAGES/de.mo and b/sources/locale/de/LC_MESSAGES/de.mo differ diff --git a/sources/locale/el/LC_MESSAGES/el.mo b/sources/locale/el/LC_MESSAGES/el.mo index b0f09a6..e95b716 100644 Binary files a/sources/locale/el/LC_MESSAGES/el.mo and b/sources/locale/el/LC_MESSAGES/el.mo differ diff --git a/sources/locale/eo/LC_MESSAGES/eo.mo b/sources/locale/eo/LC_MESSAGES/eo.mo new file mode 100644 index 0000000..76b6306 Binary files /dev/null and b/sources/locale/eo/LC_MESSAGES/eo.mo differ diff --git a/sources/application/third_party/tcpdf/images/index.html b/sources/locale/eo/LC_MESSAGES/index.html similarity index 100% rename from sources/application/third_party/tcpdf/images/index.html rename to sources/locale/eo/LC_MESSAGES/index.html diff --git a/sources/locale/eo/index.html b/sources/locale/eo/index.html new file mode 100644 index 0000000..e69de29 diff --git a/sources/locale/es-CL/LC_MESSAGES/es-CL.mo b/sources/locale/es-CL/LC_MESSAGES/es-CL.mo index 722b702..8f4a32e 100644 Binary files a/sources/locale/es-CL/LC_MESSAGES/es-CL.mo and b/sources/locale/es-CL/LC_MESSAGES/es-CL.mo differ diff --git a/sources/locale/es-MX/LC_MESSAGES/es-MX.mo b/sources/locale/es-MX/LC_MESSAGES/es-MX.mo index 119ec8a..d6876dd 100644 Binary files a/sources/locale/es-MX/LC_MESSAGES/es-MX.mo and b/sources/locale/es-MX/LC_MESSAGES/es-MX.mo differ diff --git a/sources/locale/es/LC_MESSAGES/es.mo b/sources/locale/es/LC_MESSAGES/es.mo index 5bfb8f3..f3bf324 100644 Binary files a/sources/locale/es/LC_MESSAGES/es.mo and b/sources/locale/es/LC_MESSAGES/es.mo differ diff --git a/sources/locale/et/LC_MESSAGES/et.mo b/sources/locale/et/LC_MESSAGES/et.mo index 7645be2..36177ff 100644 Binary files a/sources/locale/et/LC_MESSAGES/et.mo and b/sources/locale/et/LC_MESSAGES/et.mo differ diff --git a/sources/locale/eu/LC_MESSAGES/eu.mo b/sources/locale/eu/LC_MESSAGES/eu.mo index af52b65..a544ad5 100644 Binary files a/sources/locale/eu/LC_MESSAGES/eu.mo and b/sources/locale/eu/LC_MESSAGES/eu.mo differ diff --git a/sources/locale/fa/LC_MESSAGES/fa.mo b/sources/locale/fa/LC_MESSAGES/fa.mo index b0de9be..b5bd737 100644 Binary files a/sources/locale/fa/LC_MESSAGES/fa.mo and b/sources/locale/fa/LC_MESSAGES/fa.mo differ diff --git a/sources/locale/fi/LC_MESSAGES/fi.mo b/sources/locale/fi/LC_MESSAGES/fi.mo index f59cb08..f782944 100644 Binary files a/sources/locale/fi/LC_MESSAGES/fi.mo and b/sources/locale/fi/LC_MESSAGES/fi.mo differ diff --git a/sources/locale/fr/LC_MESSAGES/fr.mo b/sources/locale/fr/LC_MESSAGES/fr.mo index 33731d3..8397343 100644 Binary files a/sources/locale/fr/LC_MESSAGES/fr.mo and b/sources/locale/fr/LC_MESSAGES/fr.mo differ diff --git a/sources/locale/gl/LC_MESSAGES/gl.mo b/sources/locale/gl/LC_MESSAGES/gl.mo index e7abe85..c380beb 100644 Binary files a/sources/locale/gl/LC_MESSAGES/gl.mo and b/sources/locale/gl/LC_MESSAGES/gl.mo differ diff --git a/sources/locale/hr/LC_MESSAGES/hr.mo b/sources/locale/hr/LC_MESSAGES/hr.mo index 0677f11..fe23001 100644 Binary files a/sources/locale/hr/LC_MESSAGES/hr.mo and b/sources/locale/hr/LC_MESSAGES/hr.mo differ diff --git a/sources/locale/hu/LC_MESSAGES/hu.mo b/sources/locale/hu/LC_MESSAGES/hu.mo index 182159b..8a8e866 100644 Binary files a/sources/locale/hu/LC_MESSAGES/hu.mo and b/sources/locale/hu/LC_MESSAGES/hu.mo differ diff --git a/sources/locale/id/LC_MESSAGES/id.mo b/sources/locale/id/LC_MESSAGES/id.mo index 20917c1..011c309 100644 Binary files a/sources/locale/id/LC_MESSAGES/id.mo and b/sources/locale/id/LC_MESSAGES/id.mo differ diff --git a/sources/locale/is/LC_MESSAGES/is.mo b/sources/locale/is/LC_MESSAGES/is.mo index 511f586..089f980 100644 Binary files a/sources/locale/is/LC_MESSAGES/is.mo and b/sources/locale/is/LC_MESSAGES/is.mo differ diff --git a/sources/locale/it-informal/LC_MESSAGES/it-informal.mo b/sources/locale/it-informal/LC_MESSAGES/it-informal.mo index 5ab1dee..4c9bdb0 100644 Binary files a/sources/locale/it-informal/LC_MESSAGES/it-informal.mo and b/sources/locale/it-informal/LC_MESSAGES/it-informal.mo differ diff --git a/sources/locale/it/LC_MESSAGES/it.mo b/sources/locale/it/LC_MESSAGES/it.mo index 9d12c4e..6ce78ed 100644 Binary files a/sources/locale/it/LC_MESSAGES/it.mo and b/sources/locale/it/LC_MESSAGES/it.mo differ diff --git a/sources/locale/ja/LC_MESSAGES/ja.mo b/sources/locale/ja/LC_MESSAGES/ja.mo index 3638612..58a6b48 100644 Binary files a/sources/locale/ja/LC_MESSAGES/ja.mo and b/sources/locale/ja/LC_MESSAGES/ja.mo differ diff --git a/sources/locale/ka/LC_MESSAGES/ka.mo b/sources/locale/ka/LC_MESSAGES/ka.mo index 1ed1822..2b85c1e 100644 Binary files a/sources/locale/ka/LC_MESSAGES/ka.mo and b/sources/locale/ka/LC_MESSAGES/ka.mo differ diff --git a/sources/locale/kk/LC_MESSAGES/index.html b/sources/locale/kk/LC_MESSAGES/index.html new file mode 100644 index 0000000..e69de29 diff --git a/sources/locale/kk/LC_MESSAGES/kk.mo b/sources/locale/kk/LC_MESSAGES/kk.mo new file mode 100644 index 0000000..9e07f78 Binary files /dev/null and b/sources/locale/kk/LC_MESSAGES/kk.mo differ diff --git a/sources/locale/kk/index.html b/sources/locale/kk/index.html new file mode 100644 index 0000000..e69de29 diff --git a/sources/locale/ko/LC_MESSAGES/ko.mo b/sources/locale/ko/LC_MESSAGES/ko.mo index 49ad4ee..db1cae6 100644 Binary files a/sources/locale/ko/LC_MESSAGES/ko.mo and b/sources/locale/ko/LC_MESSAGES/ko.mo differ diff --git a/sources/locale/ky/LC_MESSAGES/index.html b/sources/locale/ky/LC_MESSAGES/index.html new file mode 100644 index 0000000..e69de29 diff --git a/sources/locale/ky/LC_MESSAGES/ky.mo b/sources/locale/ky/LC_MESSAGES/ky.mo new file mode 100644 index 0000000..b10f054 Binary files /dev/null and b/sources/locale/ky/LC_MESSAGES/ky.mo differ diff --git a/sources/locale/ky/index.html b/sources/locale/ky/index.html new file mode 100644 index 0000000..e69de29 diff --git a/sources/locale/lt/LC_MESSAGES/lt.mo b/sources/locale/lt/LC_MESSAGES/lt.mo index faf49cf..12ffb99 100644 Binary files a/sources/locale/lt/LC_MESSAGES/lt.mo and b/sources/locale/lt/LC_MESSAGES/lt.mo differ diff --git a/sources/locale/lv/LC_MESSAGES/lv.mo b/sources/locale/lv/LC_MESSAGES/lv.mo index e5ed7f5..4d6c933 100644 Binary files a/sources/locale/lv/LC_MESSAGES/lv.mo and b/sources/locale/lv/LC_MESSAGES/lv.mo differ diff --git a/sources/locale/mn/LC_MESSAGES/mn.mo b/sources/locale/mn/LC_MESSAGES/mn.mo index b58b961..3a15381 100644 Binary files a/sources/locale/mn/LC_MESSAGES/mn.mo and b/sources/locale/mn/LC_MESSAGES/mn.mo differ diff --git a/sources/locale/ms/LC_MESSAGES/ms.mo b/sources/locale/ms/LC_MESSAGES/ms.mo index 1772194..7e899ec 100644 Binary files a/sources/locale/ms/LC_MESSAGES/ms.mo and b/sources/locale/ms/LC_MESSAGES/ms.mo differ diff --git a/sources/locale/nb/LC_MESSAGES/nb.mo b/sources/locale/nb/LC_MESSAGES/nb.mo index 413db6b..de6957f 100644 Binary files a/sources/locale/nb/LC_MESSAGES/nb.mo and b/sources/locale/nb/LC_MESSAGES/nb.mo differ diff --git a/sources/locale/nl-informal/LC_MESSAGES/nl-informal.mo b/sources/locale/nl-informal/LC_MESSAGES/nl-informal.mo index 8058565..f4187fc 100644 Binary files a/sources/locale/nl-informal/LC_MESSAGES/nl-informal.mo and b/sources/locale/nl-informal/LC_MESSAGES/nl-informal.mo differ diff --git a/sources/locale/nl/LC_MESSAGES/nl.mo b/sources/locale/nl/LC_MESSAGES/nl.mo index 7732479..0d92b5c 100644 Binary files a/sources/locale/nl/LC_MESSAGES/nl.mo and b/sources/locale/nl/LC_MESSAGES/nl.mo differ diff --git a/sources/locale/nn/LC_MESSAGES/nn.mo b/sources/locale/nn/LC_MESSAGES/nn.mo index 9e399d5..f9cce8d 100644 Binary files a/sources/locale/nn/LC_MESSAGES/nn.mo and b/sources/locale/nn/LC_MESSAGES/nn.mo differ diff --git a/sources/locale/pl-informal/LC_MESSAGES/index.html b/sources/locale/pl-informal/LC_MESSAGES/index.html new file mode 100644 index 0000000..e69de29 diff --git a/sources/locale/pl-informal/LC_MESSAGES/pl-informal.mo b/sources/locale/pl-informal/LC_MESSAGES/pl-informal.mo new file mode 100644 index 0000000..e575e74 Binary files /dev/null and b/sources/locale/pl-informal/LC_MESSAGES/pl-informal.mo differ diff --git a/sources/locale/pl-informal/index.html b/sources/locale/pl-informal/index.html new file mode 100644 index 0000000..e69de29 diff --git a/sources/locale/pl/LC_MESSAGES/pl.mo b/sources/locale/pl/LC_MESSAGES/pl.mo index 983474e..029569a 100644 Binary files a/sources/locale/pl/LC_MESSAGES/pl.mo and b/sources/locale/pl/LC_MESSAGES/pl.mo differ diff --git a/sources/locale/pt-BR/LC_MESSAGES/pt-BR.mo b/sources/locale/pt-BR/LC_MESSAGES/pt-BR.mo index 985cff5..5979d73 100644 Binary files a/sources/locale/pt-BR/LC_MESSAGES/pt-BR.mo and b/sources/locale/pt-BR/LC_MESSAGES/pt-BR.mo differ diff --git a/sources/locale/pt/LC_MESSAGES/pt.mo b/sources/locale/pt/LC_MESSAGES/pt.mo index 5b61fc3..4b73304 100644 Binary files a/sources/locale/pt/LC_MESSAGES/pt.mo and b/sources/locale/pt/LC_MESSAGES/pt.mo differ diff --git a/sources/locale/ro/LC_MESSAGES/ro.mo b/sources/locale/ro/LC_MESSAGES/ro.mo index 21932f6..a571176 100644 Binary files a/sources/locale/ro/LC_MESSAGES/ro.mo and b/sources/locale/ro/LC_MESSAGES/ro.mo differ diff --git a/sources/locale/ru/LC_MESSAGES/ru.mo b/sources/locale/ru/LC_MESSAGES/ru.mo index e76fd91..81d018f 100644 Binary files a/sources/locale/ru/LC_MESSAGES/ru.mo and b/sources/locale/ru/LC_MESSAGES/ru.mo differ diff --git a/sources/locale/sk/LC_MESSAGES/sk.mo b/sources/locale/sk/LC_MESSAGES/sk.mo index e8954d5..d4f3d1f 100644 Binary files a/sources/locale/sk/LC_MESSAGES/sk.mo and b/sources/locale/sk/LC_MESSAGES/sk.mo differ diff --git a/sources/locale/sl/LC_MESSAGES/sl.mo b/sources/locale/sl/LC_MESSAGES/sl.mo index b9f2088..0198420 100644 Binary files a/sources/locale/sl/LC_MESSAGES/sl.mo and b/sources/locale/sl/LC_MESSAGES/sl.mo differ diff --git a/sources/locale/sq/LC_MESSAGES/sq.mo b/sources/locale/sq/LC_MESSAGES/sq.mo index 5dafd8f..f92151d 100644 Binary files a/sources/locale/sq/LC_MESSAGES/sq.mo and b/sources/locale/sq/LC_MESSAGES/sq.mo differ diff --git a/sources/locale/sr/LC_MESSAGES/sr.mo b/sources/locale/sr/LC_MESSAGES/sr.mo index 1c367d0..322997f 100644 Binary files a/sources/locale/sr/LC_MESSAGES/sr.mo and b/sources/locale/sr/LC_MESSAGES/sr.mo differ diff --git a/sources/locale/sv/LC_MESSAGES/sv.mo b/sources/locale/sv/LC_MESSAGES/sv.mo index 68cf215..7cceaf3 100644 Binary files a/sources/locale/sv/LC_MESSAGES/sv.mo and b/sources/locale/sv/LC_MESSAGES/sv.mo differ diff --git a/sources/locale/ta/LC_MESSAGES/ta.mo b/sources/locale/ta/LC_MESSAGES/ta.mo index aa3858e..4855c86 100644 Binary files a/sources/locale/ta/LC_MESSAGES/ta.mo and b/sources/locale/ta/LC_MESSAGES/ta.mo differ diff --git a/sources/locale/th/LC_MESSAGES/th.mo b/sources/locale/th/LC_MESSAGES/th.mo index 593e7d0..a5aba8d 100644 Binary files a/sources/locale/th/LC_MESSAGES/th.mo and b/sources/locale/th/LC_MESSAGES/th.mo differ diff --git a/sources/locale/tr/LC_MESSAGES/tr.mo b/sources/locale/tr/LC_MESSAGES/tr.mo index 0cef090..4fbb78a 100644 Binary files a/sources/locale/tr/LC_MESSAGES/tr.mo and b/sources/locale/tr/LC_MESSAGES/tr.mo differ diff --git a/sources/locale/uk/LC_MESSAGES/uk.mo b/sources/locale/uk/LC_MESSAGES/uk.mo index e5ad965..723d462 100644 Binary files a/sources/locale/uk/LC_MESSAGES/uk.mo and b/sources/locale/uk/LC_MESSAGES/uk.mo differ diff --git a/sources/locale/zh-Hans/LC_MESSAGES/zh-Hans.mo b/sources/locale/zh-Hans/LC_MESSAGES/zh-Hans.mo index 6077f29..c0d6647 100644 Binary files a/sources/locale/zh-Hans/LC_MESSAGES/zh-Hans.mo and b/sources/locale/zh-Hans/LC_MESSAGES/zh-Hans.mo differ diff --git a/sources/locale/zh-Hant-HK/LC_MESSAGES/zh-Hant-HK.mo b/sources/locale/zh-Hant-HK/LC_MESSAGES/zh-Hant-HK.mo index 64c8846..78b5470 100644 Binary files a/sources/locale/zh-Hant-HK/LC_MESSAGES/zh-Hant-HK.mo and b/sources/locale/zh-Hant-HK/LC_MESSAGES/zh-Hant-HK.mo differ diff --git a/sources/locale/zh-Hant-TW/LC_MESSAGES/zh-Hant-TW.mo b/sources/locale/zh-Hant-TW/LC_MESSAGES/zh-Hant-TW.mo index fe6c401..4f70669 100644 Binary files a/sources/locale/zh-Hant-TW/LC_MESSAGES/zh-Hant-TW.mo and b/sources/locale/zh-Hant-TW/LC_MESSAGES/zh-Hant-TW.mo differ diff --git a/sources/plugins/AuditLog/AuditLog.php b/sources/plugins/AuditLog/AuditLog.php index 501f8e7..3fa15c7 100644 --- a/sources/plugins/AuditLog/AuditLog.php +++ b/sources/plugins/AuditLog/AuditLog.php @@ -17,6 +17,59 @@ $this->subscribe('beforePermissionSetSave'); $this->subscribe('beforeParticipantSave'); $this->subscribe('beforeParticipantDelete'); + $this->subscribe('beforeLogout'); + $this->subscribe('afterSuccessfulLogin'); + $this->subscribe('afterFailedLoginAttempt'); + } + + /** + * User logout to the audit log + * @return unknown_type + */ + public function beforeLogout() + { + $oUser = $this->api->getCurrentUser(); + if ($oUser != false) + { + $iUserID = $oUser->uid; + $oAutoLog = $this->api->newModel($this, 'log'); + $oAutoLog->uid=$iUserID; + $oAutoLog->entity='user'; + $oAutoLog->entityid=$iUserID; + $oAutoLog->action='beforeLogout'; + $oAutoLog->save(); + } + } + + /** + * Successfull login to the audit log + * @return unknown_type + */ + public function afterSuccessfulLogin() + { + $iUserID=$this->api->getCurrentUser()->uid; + $oAutoLog = $this->api->newModel($this, 'log'); + $oAutoLog->uid=$iUserID; + $oAutoLog->entity='user'; + $oAutoLog->entityid=$iUserID; + $oAutoLog->action='afterSuccessfulLogin'; + $oAutoLog->save(); + } + + /** + * Failed login attempt to the audit log + * @return unknown_type + */ + public function afterFailedLoginAttempt() + { + $event = $this->getEvent(); + $identity = $event->get('identity'); + $oAutoLog = $this->api->newModel($this, 'log'); + $oAutoLog->entity='user'; + $oAutoLog->action='afterFailedLoginAttempt'; + $aUsername['username'] = $identity->username; + $oAutoLog->newvalues = json_encode($aUsername); + $oAutoLog->save(); } /** @@ -113,7 +166,7 @@ $sAction='create'; $aOldValues=array(); // Indicate the password has changed but assign fake hash - $aNewValues['password']=hash('md5','67890'); + $aNewValues['password']='*MASKED*PASSWORD*'; } else { @@ -121,11 +174,16 @@ $sAction='update'; $aOldValues=$oOldUser->getAttributes(); + // Postgres delivers bytea fields as streams + if (gettype($aOldValues['password'])=='resource') + { + $aOldValues['password'] = stream_get_contents($aOldValues['password']); + } // If the password has changed then indicate that it has changed but assign fake hashes if ($aNewValues['password']!=$aOldValues['password']) { - $aOldValues['password']=hash('md5','12345'); - $aNewValues['password']=hash('md5','67890'); + $aOldValues['password']='*MASKED*OLD*PASSWORD*'; + $aNewValues['password']='*MASKED*NEW*PASSWORD*'; }; } diff --git a/sources/scripts/admin/admin_core.js b/sources/scripts/admin/admin_core.js index 16d53cf..9966983 100644 --- a/sources/scripts/admin/admin_core.js +++ b/sources/scripts/admin/admin_core.js @@ -253,28 +253,32 @@ function doToolTip() at: "top right" } }); + $(this).children("a").children("img").removeAttr('title'); } }); - $(".sf-menu a > img[alt]").removeAttr("alt"); + $(".sf-menu a > img[alt]").data("hasqtip", true ).parent("a").data("hasqtip", true ); $("a").each(function() { - tipcontent=$(this).children("img").attr('alt'); - if(!tipcontent){tipcontent=htmlEncode($(this).attr('title'));} - if(tipcontent && tipcontent!=""){ - $(this).qtip({ - content: { - text: tipcontent - }, - style: { - classes: "qtip-light qtip-rounded" - }, - position: { - viewport: $(window), - at: 'bottom right' - } - }); + if(!$(this).data("hasqtip"))// data-hasqtip not in DOM, then need to be tested directly (:not([data-hasqtip]) don't work) + { + tipcontent=$(this).children("img").attr('alt'); + if(!tipcontent){tipcontent=htmlEncode($(this).attr('title'));} + if(tipcontent && tipcontent!=""){ + $(this).qtip({ + content: { + text: tipcontent + }, + style: { + classes: "qtip-light qtip-rounded" + }, + position: { + viewport: $(window), + at: 'bottom right' + } + }); + } } }); - $("a > img[alt]").removeAttr("alt"); + $("a > img[alt]").data("hasqtip", true ).removeAttr('title'); // Call the popuptip hover rel attribute $('.popuptip').each(function(){ @@ -299,13 +303,13 @@ function doToolTip() event: "mouseout" } }); - $("#"+$(this).attr('rel')).find("img").removeAttr("alt"); // Remove children img attr alt, the default tooltip can apply. + $("#"+$(this).attr('rel')).find("img").data("hasqtip", true ).removeAttr('title'); } }); // On label $('label[title]').each(function() { if($(this).attr('title') != '') - { + { $(this).qtip({ style: { classes: "qtip-cream qtip-rounded" @@ -318,8 +322,22 @@ function doToolTip() } }); // Loads the tooltips on image - $('img[alt],input[src]').each(function() { - if($(this).attr('alt') != ''){ + $('img[title]').each(function() { + if($(this).attr('title') != '') + { + $(this).qtip({ + style: { + classes: "qtip-light qtip-rounded" + }, + position: { + viewport: $(window), + at: "bottom right" + } + }); + } + }); + $('img[alt]:not([title]),input[src]').each(function() { + if($(this).attr('alt') != '' && !$(this).data("hasqtip")){ $(this).qtip({ content: { attr: "alt" diff --git a/sources/scripts/admin/answers.js b/sources/scripts/admin/answers.js index 45bc3a0..22057b4 100644 --- a/sources/scripts/admin/answers.js +++ b/sources/scripts/admin/answers.js @@ -427,18 +427,20 @@ function lspreview() if (lsrows[z].title==null) { lsrows[z].title=''; } - tabbody=tabbody+'>'+lsrows[z].code+''; - if (assessmentvisible) + tabbody=tabbody+'>'+lsrows[z].code+''+lsrows[z].assessment_value+''; - } - tabbody=tabbody+''+lsrows[z].title+''; + tabbody=tabbody+' style="display:none;"'; + } + tabbody=tabbody+'>'+lsrows[z].assessment_value+''; + tabbody=tabbody+''+htmlspecialchars(lsrows[z].title)+''; } - tabbody=tabbody+''+strcode+''; - if (assessmentvisible) + tabbody=tabbody+''+strcode+''+sAssessmentValue+''; - } + tabbody=tabbody+' style="display:none;"'; + } + tabbody=tabbody+'>'+sAssessmentValue+''; tabbody=tabbody+''+strlabel+''; } } @@ -737,22 +739,27 @@ function savelabel() } else { - $('#dialog-confirm-replace').dialog({ - resizable: false, - height: 160, - modal: true, - buttons: [{ - text: ok, - click: function() { - $(this).dialog("close"); - ajaxreqsave(); - }},{ - text: cancel, - click: function() { - check = false; - $(this).dialog("close"); - }} - ] + aLanguages = langs.split(';'); + $.post(sCheckLabelURL, { languages: aLanguages, lid: lid}, function(data) { + $('#strReplaceMessage').html(data); + $('#dialog-confirm-replace').dialog({ + resizable: false, + height: 200, + width:350, + modal: true, + buttons: [{ + text: ok, + click: function() { + $(this).dialog("close"); + ajaxreqsave(); + }},{ + text: cancel, + click: function() { + check = false; + $(this).dialog("close"); + }} + ] + }); }); } } @@ -791,6 +798,13 @@ function ajaxreqsave() { code.push($(this).val()); }); + // get assessment values for the current scale + var assessmentvalues = new Array(); + $('.assessment').each(function(index) { + if($(this).attr('id').substr(-1) === scale_id) + assessmentvalues.push($(this).val()); + }); + answers = new Object(); languages = langs.split(';'); @@ -804,7 +818,7 @@ function ajaxreqsave() { } - $.post(lasaveurl, { laname: $('#laname').val(), lid: lid, code: code, answers: answers, }, function(data) { + $.post(lasaveurl, { laname: $('#laname').val(), lid: lid, code: code, answers: answers, assessmentvalues:assessmentvalues }, function(data) { $("#saveaslabel").dialog('close'); if(jQuery.parseJSON(data) == "ok") { diff --git a/sources/scripts/admin/attributeControl.js b/sources/scripts/admin/attributeControl.js index a852f47..a8918ff 100644 --- a/sources/scripts/admin/attributeControl.js +++ b/sources/scripts/admin/attributeControl.js @@ -34,6 +34,19 @@ $(document).ready(function() { pager: "#pager", pgtext: pagerMsg, emptyrecords: emptyRecordsTxt, + gridComplete: function() { + // Disable "Add" button if more than 59 attributes + if($('#attributeControl').jqGrid('getGridParam', 'records') > 59) { + var newCell = $('#add_attributeControl').clone(); + $('#add_attributeControl').hide().before(newCell); + $('#add_attributeControl:eq(0)').attr('id', 'add_attributeControl_new').attr('title', addDisabledCaption); + $('#add_attributeControl_new .ui-icon').addClass('ui-state-disabled'); + } + else { + $('#add_attributeControl').show(); + $('#add_attributeControl_new').remove(); + } + }, recordtext: viewRecordTxt }); diff --git a/sources/scripts/admin/ckeditor-config.js b/sources/scripts/admin/ckeditor-config.js index 2bd062f..7aec03e 100644 --- a/sources/scripts/admin/ckeditor-config.js +++ b/sources/scripts/admin/ckeditor-config.js @@ -14,11 +14,11 @@ CKEDITOR.editorConfig = function( config ) config.toolbarCanCollapse = false; config.resize_enabled = false; config.autoParagraph = false; - config.entities = false; - - if($('html').attr('dir') == 'rtl') { - config.contentsLangDirection = 'rtl'; - } + config.basicEntities = false; // For <, >, & ( and nbsp) + config.entities = false; // For ' ( and a lot of other but not <>&) + if($('html').attr('dir') == 'rtl') { + config.contentsLangDirection = 'rtl'; + } config.toolbar_popup = [ @@ -37,7 +37,6 @@ CKEDITOR.editorConfig = function( config ) ['TextColor','BGColor'], [ 'ShowBlocks','Templates'] ]; - config.toolbar_inline = [ ['Maximize','Createlimereplacementfields'], @@ -55,10 +54,6 @@ CKEDITOR.editorConfig = function( config ) ['TextColor','BGColor'], [ 'ShowBlocks','Templates'], ]; - - - - config.toolbar_inline2 = [ ['Maximize','Createlimereplacementfields'], @@ -68,12 +63,7 @@ CKEDITOR.editorConfig = function( config ) ['Link','Unlink','Image'], ['Source'] ]; - - config.extraPlugins = "ajax,limereplacementfields"; - - - }; (function () { diff --git a/sources/scripts/admin/labels.js b/sources/scripts/admin/labels.js index 845e9de..7104db7 100644 --- a/sources/scripts/admin/labels.js +++ b/sources/scripts/admin/labels.js @@ -9,6 +9,16 @@ * other free or open source software licenses. * See COPYRIGHT.php for copyright notices and details. */ + +/** +* delete button +*/ +$(document).on('click','[data-action="deletelabelset"]',function(event){ + event.preventDefault(); + if(confirm($(this).data('confirm'))){ + sendPost($(this).data('url'),'',['action','lid'],[$(this).data('action'),$('[name="lid"]').val()]); + } +}); $(document).ready(function(){ $('#btnDumpLabelSets').click(function(){ if ($('#labelsets > option:selected').size()==0) diff --git a/sources/scripts/admin/listsurvey.js b/sources/scripts/admin/listsurvey.js index e0c29a5..4865ee3 100644 --- a/sources/scripts/admin/listsurvey.js +++ b/sources/scripts/admin/listsurvey.js @@ -129,7 +129,7 @@ $(document).ready(function(){ $('#displaysurveys tbody').hide(); }, loadComplete: function(data){ - // Need this for vertical scrollbar + // Need this for vertical scrollbar $('#displaysurveys').setGridWidth($(window).width()-4); $('.wrapper').width($('#displaysurveys').width()+4); $('.footer').outerWidth($('#displaysurveys').outerWidth()+4).css({ 'margin':'0 auto' }); @@ -141,11 +141,11 @@ $(document).ready(function(){ } } }); - + // Inject the translations into jqGrid - $.extend($.jgrid,{ + $.extend($.jgrid,{ del:{ - msg:delmsg, + msg:delmsg, bSubmit: sDelCaption, caption: sDelCaption, bCancel: sCancel @@ -156,30 +156,39 @@ $(document).ready(function(){ Find : sFind, Reset: sReset, } - }); - - jQuery("#displaysurveys").jqGrid('navGrid','#pager',{ - deltitle: sDelTitle, + }); + + jQuery("#displaysurveys").jqGrid('navGrid','#pager',{ + deltitle: sDelTitle, searchtitle: sSearchTitle, refreshtitle: sRefreshTitle, - alertcap: sWarningMsg, alerttext: sSelectRowMsg, + alertcap: sWarningMsg, + alerttext: sSelectRowMsg, add:false, del:true, edit:false, refresh: true, search: true - },{},{},{ + },{},{},{ width : 450, afterShowForm: function(form) { form.closest('div.ui-jqdialog').center(); }, + beforeSubmit: function(postdata, formid) { + var gridIdAsSelector = $.jgrid.jqID(this.id); + $("#delmod" + gridIdAsSelector).hide(); + $("#load_" + gridIdAsSelector).show().center(); + return [true]; + }, afterSubmit: function(response, postdata) { + var gridIdAsSelector = $.jgrid.jqID(this.id); + $("#load_" + gridIdAsSelector).hide() if (postdata.oper=='del') { // Remove surveys from dropdown, too aSurveyIDs=postdata.id.split(","); $.each(aSurveyIDs,function(iIndex, iSurveyID){ - $("#surveylist option[value='"+iSurveyID+"']").remove(); + $("#surveylist option[value='"+iSurveyID+"']").remove(); }) }; return [true]; @@ -213,7 +222,7 @@ $(document).ready(function(){ $('.wrapper').width($('#displaysurveys').width()+4); $('.footer').outerWidth($('#displaysurveys').outerWidth()+4).css({ 'margin':'0 auto' }); - + $(window).bind('resize', function() { $('#displaysurveys').setGridWidth($(window).width()-4); $('.wrapper').width($('#displaysurveys').width()+4); diff --git a/sources/scripts/admin/participantdisplay.js b/sources/scripts/admin/participantdisplay.js index 0b287fa..b0815f3 100644 --- a/sources/scripts/admin/participantdisplay.js +++ b/sources/scripts/admin/participantdisplay.js @@ -116,7 +116,6 @@ $(document).ready(function() { viewrecords : true, rowList: [25,50,100,250,500,1000,2500,5000], multiselect: true, - loadonce : false, loadComplete : function() { /* Sneaky way of adding custom icons to jqGrid pager buttons */ $("#pager").find(".ui-share-icon") @@ -308,26 +307,21 @@ $(document).ready(function() { dialog.offset(selRowCoordinates); }, beforeSubmit : function(postdata, formid) { - if(!$('#selectable .ui-selected').attr('id')) { + if(!$('#deleteMode input[type=\'radio\']:checked').val()) { alert(nooptionselected); message = "dummy"; } else { $.post(delparticipantUrl, { participant_id : postdata, - selectedoption : $('#selectable .ui-selected').attr('id') + selectedoption : $('#deleteMode input[type=\'radio\']:checked' ).val() }, function(data) { }); success = "dummy"; message = "dummy"; return[success,message]; } - }, beforeShowForm:function(form) { - $('#selectable').bind("mousedown", function (e) { - e.metaKey = false; - }).selectable({ - tolerance: 'fit' - }) - }}, + } + }, {multipleSearch:true, multipleGroup:true} ); diff --git a/sources/scripts/admin/subquestions.js b/sources/scripts/admin/subquestions.js index fe3f2d4..afc9843 100644 --- a/sources/scripts/admin/subquestions.js +++ b/sources/scripts/admin/subquestions.js @@ -1,4 +1,19 @@ -// $Id: subquestions.js 9692 2011-01-15 21:31:10Z c_schmitz $ +/* + * JavaScript functions for LimeSurvey administrator + * + * This file is part of LimeSurvey + * Copyright (C) 2007-2015 The LimeSurvey Project Team / Carsten Schmitz + * All rights reserved. + * License: GNU/GPL License v2 or later, see LICENSE.php + * LimeSurvey is free software. This version may have been modified pursuant + * to the GNU General Public License, and as distributed it includes or + * is derivative of works licensed under the GNU General Public License or + * other free or open source software licenses. + * See COPYRIGHT.php for copyright notices and details. + */ + +// @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GNU/GPL License v2 or later + var labelcache=[]; $(document).ready(function(){ removeCSRFDivs(); @@ -18,7 +33,7 @@ $(document).ready(function(){ modal: true, width:800, title: lsbrowsertitle}); - $('#quickadd').dialog({ + $('#quickadd').dialog({ autoOpen: false, modal: true, width:600, @@ -348,7 +363,7 @@ function lspreview() { lsrows[z].title=''; } - tabbody=tabbody+'>'+lsrows[z].code+''+lsrows[z].title+''; + tabbody=tabbody+'>'+lsrows[z].code+''+htmlspecialchars(lsrows[z].title)+''; } tabbody=tabbody+''+strcode+''+strlabel+''; } @@ -558,11 +573,11 @@ function quickaddlabels() } if (x==0) { - tablerows=tablerows+'' + tablerows=tablerows+'' } else { - tablerows=tablerows+'   ' + tablerows=tablerows+'   ' } } if (lsreplace) { @@ -637,22 +652,27 @@ function savelabel() } else { - $('#dialog-confirm-replace').dialog({ - resizable: false, - height: 160, - modal: true, - buttons: [{ - text: ok, - click: function() { - $(this).dialog("close"); - ajaxreqsave(); - }},{ - text: cancel, - click: function() { - check = false; - $(this).dialog("close"); - }} - ] + aLanguages = langs.split(';'); + $.post(sCheckLabelURL, { languages: aLanguages, lid: lid, bCheckAssessments:1 }, function(data) { + $('#strReplaceMessage').html(data); + $('#dialog-confirm-replace').dialog({ + resizable: false, + height: 260, + width: 420, + modal: true, + buttons: [{ + text: ok, + click: function() { + $(this).dialog("close"); + ajaxreqsave(); + }},{ + text: cancel, + click: function() { + check = false; + $(this).dialog("close"); + }} + ] + }); }); } } @@ -718,7 +738,7 @@ function ajaxreqsave() { { $("#dialog-result").html(lasuccess); $('#dialog-result').dialog({ - height: 160, + height: 200, width: 250, buttons: [{ text: ok, diff --git a/sources/scripts/admin/surveysettings.js b/sources/scripts/admin/surveysettings.js index 20ec4d1..ffcf71c 100644 --- a/sources/scripts/admin/surveysettings.js +++ b/sources/scripts/admin/surveysettings.js @@ -1,6 +1,12 @@ // $Id: surveysettings.js 9757 2011-02-09 20:52:33Z c_schmitz $ - +$(document).on('click',"[data-copy] :submit",function(){ + $("form :input[value='"+$(this).val()+"']").click(); +}); $(document).ready(function(){ + + $("[data-copy]").each(function(){ + $(this).html($("#"+$(this).data('copy')).html()); + }); $("#template").change(templatechange); $("#template").keyup(templatechange); $("#copysurveyform").submit(copysurvey); @@ -23,6 +29,7 @@ $(document).ready(function(){ pginput: false, pgbuttons: false, viewrecords: true, + rowNum: 100, sortorder: "asc", editurl: jsonUrl, // this is dummy existing url emptyrecords : sNoParametersDefined, @@ -69,7 +76,7 @@ function PostParameterGrid() if (($('#allowregister').val()=='Y' || $.trim($('#emailresponseto').val())!='' || $.trim($('#emailnotificationto').val())!='')&& $.trim($('#adminemail').val())=='') { alert (sAdminEmailAddressNeeded); - $("#tabs").tabs("select", 0); + $("#tabs").tabs("select", 0); $('#adminemail').focus(); return false; } diff --git a/sources/scripts/admin/tokenbounce.js b/sources/scripts/admin/tokenbounce.js index 3ee6d86..a371f75 100644 --- a/sources/scripts/admin/tokenbounce.js +++ b/sources/scripts/admin/tokenbounce.js @@ -1,22 +1,14 @@ -// $Id: tokens.js 8633 2010-04-25 12:57:33Z c_schmitz - - -$(document).ready(function() { - $("#bounceprocessing").change(turnoff); - turnoff(); +$(document).on("change","#bounceprocessing",function(){ + hideShowParameters(); }); - - - -function turnoff(ui,evt) { - bounce_disabled=($("#bounceprocessing").val()=='N' || $("#bounceprocessing").val()=='G'); - if (bounce_disabled==true) {bounce_disabled='disabled';} - else {bounce_disabled='';} - $("#bounceaccounttype").attr('disabled',bounce_disabled); - $("#bounceaccounthost").attr('disabled',bounce_disabled); - $("#bounceaccountuser").attr('disabled',bounce_disabled); - $("#bounceaccountpass").attr('disabled',bounce_disabled); - $("#bounceencryption").attr('disabled',bounce_disabled); - $("#bounceaccountencryption").attr('disabled',bounce_disabled); -}; - \ No newline at end of file +$(document).ready(function() { + hideShowParameters(); +}); +function hideShowParameters(){ + var disabled=$("#bounceprocessing").val()!="L"; + $("#bounceaccounttype").prop("disabled",disabled); + $("#bounceaccounthost").prop("disabled",disabled); + $("#bounceaccountuser").prop("disabled",disabled); + $("#bounceaccountpass").prop("disabled",disabled); + $("#bounceaccountencryption").prop("disabled",disabled); +} diff --git a/sources/scripts/admin/tokens.js b/sources/scripts/admin/tokens.js index 9b01fda..55477f7 100644 --- a/sources/scripts/admin/tokens.js +++ b/sources/scripts/admin/tokens.js @@ -55,8 +55,8 @@ function addSelectedParticipantsToCPDB() $("#addcpdb").load(postUrl, { participantid:token},function(){ $(location).attr('href',attMapUrl+'/'+survey_id); - }); - } + }); + } /*$(":checked").each(function() { token.push($(this).attr('name')); @@ -184,8 +184,7 @@ $(document).ready(function() { .appendTo(jQuery(this).parent().parent()) .click(function() { - jQuery('#displaytokens').saveRow(row.attr('id')); - func(); + jQuery('#displaytokens').saveRow(row.attr('id'), null, null, {}, function(){func();}); }); }); updatePageAfterGrid(); @@ -331,8 +330,16 @@ $(document).ready(function() { alert(sSelectRowMsg ); } else - { - window.open(inviteurl+$("#displaytokens").getGridParam("selarrrow").join("|"), "_blank") + { + var newForm = jQuery('
        ', { + 'action': inviteurl, + 'target': '_blank' + }).append(jQuery('', { + 'name': 'tokenids', + 'value': $("#displaytokens").getGridParam("selarrrow").join("|"), + 'type': 'hidden' + })).appendTo('body'); + newForm.submit(); } } }); @@ -349,7 +356,15 @@ $(document).ready(function() { } else { - window.open(remindurl+$("#displaytokens").getGridParam("selarrrow").join("|"), "_blank") + var newForm = jQuery('', { + 'action': remindurl, + 'target': '_blank' + }).append(jQuery('', { + 'name': 'tokenids', + 'value': $("#displaytokens").getGridParam("selarrrow").join("|"), + 'type': 'hidden' + })).appendTo('body'); + newForm.submit(); } } }); @@ -375,7 +390,7 @@ $(document).ready(function() { } if (bParticipantPanelPermission==true) { - $("#displaytokens").navSeparatorAdd("#pager",{}); + $("#displaytokens").navSeparatorAdd("#pager",{}); $("#displaytokens").navButtonAdd('#pager', { caption:"", title:viewParticipantsLink, @@ -394,13 +409,14 @@ $(document).ready(function() { if(sSearchString != ""){ var aSearchConditions=new Array; for(col in colInformation){ - if(colInformation[col]['quickfilter']) - aSearchConditions.push(col+"||contains||"+sSearchString); + if(colInformation[col]['quickfilter']){ + aSearchConditions.push(col);aSearchConditions.push('contains');aSearchConditions.push(sSearchString);aSearchConditions.push("or"); + } } - var sSearchConditions=aSearchConditions.join("||or||"); - oGrid.jqGrid('setGridParam', {url: jsonSearchUrl+"/"+sSearchConditions}).trigger('reloadGrid', [{current: true, page: 1}]); + aSearchConditions.pop();// remove last 'or' + oGrid.jqGrid('setGridParam', {url: jsonUrl, postData: { searcharray: aSearchConditions} }).trigger('reloadGrid', [{current: true, page: 1}]); }else{ - oGrid.jqGrid('setGridParam', {url: jsonUrl}).trigger('reloadGrid', [{current: true, page: 1}]); + oGrid.jqGrid('setGridParam', {url: jsonUrl, postData: { }}).trigger('reloadGrid', [{current: true, page: 1}]); } }, 500); @@ -409,8 +425,19 @@ $(document).ready(function() { reloadAfterSubmit: true, closeOnEspace:true }); + + // Center modal dialogs + $.jgrid.jqModal = $.extend($.jgrid.jqModal || {}, { + beforeOpen: centerInfoDialog + }); }); +function centerInfoDialog() { + var infoDialog = $("#info_dialog"); + var dialogparent = infoDialog.parent(); + infoDialog.css({ 'left': Math.round((dialogparent.width() - infoDialog.width()) / 2)+'px' }); +} + function updatePageAfterGrid(){ var oGrid=$("#displaytokens"); var iLastPage=parseInt(oGrid.jqGrid('getGridParam', 'lastpage')); diff --git a/sources/scripts/admin/translation.js b/sources/scripts/admin/translation.js index 9eeceb1..ec90b79 100644 --- a/sources/scripts/admin/translation.js +++ b/sources/scripts/admin/translation.js @@ -91,11 +91,11 @@ function fDoTranslateAjax(sBaseLang,sToLang,sToConvert,sId) $('.ajax-loader').css('display','inline'); iRunningThreads++; $.ajax({ - url:'admin.php', + url: translateJsonUrl, datatype: 'json', async: true, + type: 'POST', data:{ - action: 'ajaxtranslategoogleapi', baselang:sBaseLang, tolang:sToLang, text:sToConvert @@ -114,7 +114,7 @@ function fDoTranslateAjax(sBaseLang,sToLang,sToConvert,sId) } else if (!aData.error) { - $("[name="+sId+"]").html(aData.converted); + $("textarea[name="+sId+"]").val(aData.converted); var oMyEditor = CKEDITOR.instances[sId]; diff --git a/sources/scripts/expressions/em_javascript.js b/sources/scripts/expressions/em_javascript.js index 3965cef..ac27eb2 100644 --- a/sources/scripts/expressions/em_javascript.js +++ b/sources/scripts/expressions/em_javascript.js @@ -13,8 +13,9 @@ * @author Thomas M. White (TMSWhite) * @author Denis Chenu (Shnoulle) * - * Portion from php.js is copyright 2012 Kevin van Zonneveld. - * php.js is dual licensed under the MIT licenses. + * Portion from php.js licensed under the MIT licenses. + * Copyright (c) 2013 Kevin van Zonneveld (http://kvz.io) + * and Contributors (http://phpjs.org/authors) */ function LEMcount() @@ -191,6 +192,53 @@ function LEMis_string(a) return isNaN(a); } +/** + * Find the closest matching numerical input values in a list an replace it by the + * corresponding value within another list + * + * @author Johannes Weberhofer, 2013 + * + * @param numeric fValueToReplace + * @param numeric iStrict - 1 for exact matches only otherwise interpolation the + * closest value should be returned + * @param string sTranslateFromList - comma seperated list of values to translate from + * @param string sTranslateToList - comma seperated list of values to translate to + * @return numeric + */ +function LEMconvert_value( fValueToReplace, iStrict, sTranslateFromList, sTranslateToList) +{ + if ( isNaN(fValueToReplace) || (iStrict==null) || (sTranslateFromList==null) || (sTranslateToList==null) ) + { + return null; + } + aFromValues = sTranslateFromList.split(","); + aToValues = sTranslateToList.split(","); + if ( (aFromValues.length > 0) && (aFromValues.length == aToValues.length) ) + { + fMinimumDiff = null; + iNearestIndex = 0; + for ( i = 0; i < aFromValues.length; i++) { + if ( isNaN(aFromValues[i]) ) { + // break processing when non-numeric variables are about to be processed + return null; + } + fCurrentDiff = Math.abs(aFromValues[i] - fValueToReplace); + if (fCurrentDiff === 0) { + return aToValues[i]; + } else if (i === 0) { + fMinimumDiff = fCurrentDiff; + } else if ( fMinimumDiff > fCurrentDiff ) { + fMinimumDiff = fCurrentDiff; + iNearestIndex = i; + } + } + if ( iStrict !== 1 ) { + return aToValues[iNearestIndex]; + } + } + return null; +} + function LEMif(a,b,c) { // implements conditional logic. Note double negation of a to ensure it is cast to Boolean @@ -1369,29 +1417,28 @@ function ltrim (str, charlist) { return (str + '').replace(re, ''); } -function nl2br (str, is_xhtml) { - // Converts newlines to HTML line breaks - // - // version: 1107.2516 - // discuss at: http://phpjs.org/functions/nl2br - // + original by: Kevin van Zonneveld (http://kevin.vanzonneveld.net) - // + improved by: Philip Peterson - // + improved by: Onno Marsman - // + improved by: Atli Þór - // + bugfixed by: Onno Marsman - // + input by: Brett Zamir (http://brett-zamir.me) - // + bugfixed by: Kevin van Zonneveld (http://kevin.vanzonneveld.net) - // + improved by: Brett Zamir (http://brett-zamir.me) - // + improved by: Maximusya - // * example 1: nl2br('Kevin\nvan\nZonneveld'); - // * returns 1: 'Kevin\nvan\nZonneveld' - // * example 2: nl2br("\nOne\nTwo\n\nThree\n", false); - // * returns 2: '
        \nOne
        \nTwo
        \n
        \nThree
        \n' - // * example 3: nl2br("\nOne\nTwo\n\nThree\n", true); - // * returns 3: '\nOne\nTwo\n\nThree\n' - var breakTag = (is_xhtml || typeof is_xhtml === 'undefined') ? '' : '
        '; +function nl2br(str, is_xhtml) { + // discuss at: http://phpjs.org/functions/nl2br/ + // original by: Kevin van Zonneveld (http://kevin.vanzonneveld.net) + // improved by: Philip Peterson + // improved by: Onno Marsman + // improved by: Atli Þór + // improved by: Brett Zamir (http://brett-zamir.me) + // improved by: Maximusya + // bugfixed by: Onno Marsman + // bugfixed by: Kevin van Zonneveld (http://kevin.vanzonneveld.net) + // input by: Brett Zamir (http://brett-zamir.me) + // example 1: nl2br('Kevin\nvan\nZonneveld'); + // returns 1: 'Kevin
        \nvan
        \nZonneveld' + // example 2: nl2br("\nOne\nTwo\n\nThree\n", false); + // returns 2: '
        \nOne
        \nTwo
        \n
        \nThree
        \n' + // example 3: nl2br("\nOne\nTwo\n\nThree\n", true); + // returns 3: '
        \nOne
        \nTwo
        \n
        \nThree
        \n' - return (str + '').replace(/([^>\r\n]?)(\r\n|\n\r|\r|\n)/g, '$1' + breakTag + '$2'); + var breakTag = (is_xhtml || typeof is_xhtml === 'undefined') ? '
        ' : '
        '; // Adjust comment to avoid issue on phpjs.org display + + return (str + '') + .replace(/([^>\r\n]?)(\r\n|\n\r|\r|\n)/g, '$1' + breakTag + '$2'); } function number_format (number, decimals, dec_point, thousands_sep) { diff --git a/sources/scripts/modaldialog.js b/sources/scripts/modaldialog.js index 819cad1..8c40a50 100644 --- a/sources/scripts/modaldialog.js +++ b/sources/scripts/modaldialog.js @@ -1,63 +1,79 @@ -$(document).ready(function() { - // $('#basic').hide(); - // var jsonstring = $('#".$ia[1]."').val(); - // var filecount = $('#".$ia[1]."_filecount').val(); - // displayUploadedFiles(jsonstring, filecount, fieldname, show_title, show_comment, pos); +$(function() { + openUploadModalDialog(); +}); - $(function() { - $('.upload').click(function(e) { - e.preventDefault(); - var $this = $(this); +function openUploadModalDialog(){ + $('.upload').click(function(e) { + e.preventDefault(); + var $this = $(this); - var show_title = getQueryVariable('show_title', this.href); - var show_comment = getQueryVariable('show_comment', this.href); - var pos = getQueryVariable('pos', this.href); - var fieldname = getQueryVariable('fieldname', this.href); - var buttonsOpts = {}; - buttonsOpts[translt.returnTxt] = function() { - $(this).dialog("close"); - }; + var show_title = getQueryVariable('show_title', this.href); + var show_comment = getQueryVariable('show_comment', this.href); + var pos = getQueryVariable('pos', this.href); + var fieldname = getQueryVariable('fieldname', this.href); + var buttonsOpts = {}; + buttonsOpts[translt.returnTxt] = function() { + $(this).dialog("close"); + }; + var windowwidth = $(window).width()-30; + var dialogwidth= Math.min(windowwidth, 940); - var horizontalPadding = 30; - var verticalPadding = 20; - $('#uploader').dialog('destroy').remove(); // destroy the old modal dialog - $('