Skip to content

Commit

Permalink
Dev: Include surveyid in some more quickmenu links
Browse files Browse the repository at this point in the history
  • Loading branch information
olleharstedt committed Oct 13, 2017
1 parent 20969e5 commit 08b4309
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
2 changes: 1 addition & 1 deletion application/config/version.php
Expand Up @@ -14,7 +14,7 @@

$config['versionnumber'] = '3.0.0-beta.3'; //The current version of this branch
$config['masterversion'] = '2.67.3'; //The current masters version merged into this branch
$config['dbversionnumber'] = 320;
$config['dbversionnumber'] = 321;
$config['buildnumber'] = '';
$config['updatable'] = true;
$config['assetsversionnumber'] = '2903';
Expand Down
10 changes: 10 additions & 0 deletions application/helpers/update/updatedb_helper.php
Expand Up @@ -501,6 +501,16 @@ function db_upgrade_all($iOldDBVersion, $bSilent=false) {
$oTransaction->commit();
}

if ($iOldDBVersion < 321) {
$oTransaction = $oDB->beginTransaction();
$oDB->createCommand()->update(
'{{surveymenu_entries}}',
array('data' => '{"render": {"isActive": true, "link": {"data": {"surveyid": ["survey", "sid"]}}}}'),
"name = 'statistics' OR name = 'responses'"
);
$oDB->createCommand()->update('{{settings_global}}',array('stg_value'=>321),"stg_name='DBVersion'");
$oTransaction->commit();
}

}
catch(Exception $e)
Expand Down
6 changes: 3 additions & 3 deletions installer/php/create-database.php
Expand Up @@ -5,7 +5,7 @@ function createDatabase($oDB){
*/

////// Current database version: //////
$databaseCurrentVersion = "320";
$databaseCurrentVersion = "321";
///////////////////////////////////////

Yii::app()->loadHelper('database');
Expand Down Expand Up @@ -511,8 +511,8 @@ function createDatabase($oDB){
[2,NULL,11,'surveyLogicFile','Survey logic file','Survey logic file','Survey logic file','sitemap','fontawesome','','admin/expressions/sa/survey_logic_file/','','','','','surveycontent','read','{\"render\": { \"link\": {\"data\": {\"surveyid\": [\"survey\",\"sid\"]}}}}','','en-GB',1, date('Y-m-d H:i:s'),0,date('Y-m-d H:i:s'),0],
[2,NULL,12,'tokens','Token handling','Participant tokens','Define how tokens should be treated or generated','user','fontawesome','','','updatesurveylocalesettings','editLocalSettings_main_view','/admin/survey/subview/accordion/_tokens_panel','','surveylocale','read','{\"render\": { \"link\": {\"data\": {\"surveyid\": [\"survey\",\"sid\"]}}}}','_tabTokens','en-GB',1, date('Y-m-d H:i:s'),0,date('Y-m-d H:i:s'),0],
[2,NULL,13,'cpdb','Central participant database','Central participant database','Central participant database','users','fontawesome','','admin/participants/sa/displayParticipants','','','','','tokens','read','{render\: {\"link\"\: {}}','','en-GB',1, date('Y-m-d H:i:s'),0,date('Y-m-d H:i:s'),0],
[2,NULL,14,'responses','Responses','Responses','Responses','icon-browse','iconclass','','admin/responses/sa/browse/','','','','','responses','read','{\"render\"\: {\"isActive\"\: true}}','','en-GB',1, date('Y-m-d H:i:s'),0,date('Y-m-d H:i:s'),0],
[2,NULL,15,'statistics','Statistics','Statistics','Statistics','bar-chart','fontawesome','','admin/statistics/sa/index/','','','','','statistics','read','{\"render\"\: {\"isActive\"\: true}}','','en-GB',1, date('Y-m-d H:i:s'),0,date('Y-m-d H:i:s'),0],
[2,NULL,14,'responses','Responses','Responses','Responses','icon-browse','iconclass','','admin/responses/sa/browse/','','','','','responses','read','{"render": {"isActive": true, "link": {"data": {"surveyid": ["survey", "sid"]}}}}','','en-GB',1, date('Y-m-d H:i:s'),0,date('Y-m-d H:i:s'),0],
[2,NULL,15,'statistics','Statistics','Statistics','Statistics','bar-chart','fontawesome','','admin/statistics/sa/index/','','','','','statistics','read','{"render": {"isActive": true, "link": {"data": {"surveyid": ["survey", "sid"]}}}}','','en-GB',1, date('Y-m-d H:i:s'),0,date('Y-m-d H:i:s'),0],
[2,NULL,16,'reorder','Reorder questions/question groups','Reorder questions/question groups','Reorder questions/question groups','icon-organize','iconclass','','admin/survey/sa/organize/','','','','','surveycontent','update','{\"render\": {\"isActive\": false, \"link\": {\"data\": {\"surveyid\": [\"survey\",\"sid\"]}}}}','','en-GB',1, date('Y-m-d H:i:s'),0,date('Y-m-d H:i:s'),0],
];

Expand Down

0 comments on commit 08b4309

Please sign in to comment.