Skip to content

Commit

Permalink
A new survey can be made now! Few minor issues in common_helper and f…
Browse files Browse the repository at this point in the history
…ew html errors now fixed!

git-svn-id: file:///Users/Shitiz/Downloads/lssvn/source/limesurvey_ci@10328 b72ed6b6-b9f8-46b5-92b4-906544132732
  • Loading branch information
sachdeva-shubham committed Jun 22, 2011
1 parent d4b8434 commit 1466830
Show file tree
Hide file tree
Showing 7 changed files with 271 additions and 130 deletions.
251 changes: 199 additions & 52 deletions application/controllers/admin/database.php

Large diffs are not rendered by default.

7 changes: 6 additions & 1 deletion application/controllers/admin/survey.php
Expand Up @@ -688,12 +688,17 @@ function _tabPresentationNavigation($esrow)
$esrow['navigationdelay']=0;
}

$shownoanswer = isset($shownoanswer)?$shownoanswer:'Y';
$this->load->helper('globalsettings');

$shownoanswer = getGlobalSetting('shownoanswer')?getGlobalSetting('shownoanswer'):'Y';

$data['clang'] = $clang;
$data['esrow'] = $esrow;
//$data['surveyid'] = $surveyid;
$data['shownoanswer'] = $shownoanswer;
$data['showXquestions'] = $showXquestions;
$data['showgroupinfo'] = $showgroupinfo;
$data['showqnumcode'] = $showqnumcode;
return $this->load->view('admin/survey/superview/SuperPresentation_view',$data, true);

}
Expand Down
6 changes: 5 additions & 1 deletion application/helpers/common_helper.php
Expand Up @@ -27,7 +27,10 @@

function aGetBaseSurveyPermissions()
{
global $clang;
//global $clang;
$CI =& get_instance();
$clang = $CI->limesurvey_lang;

$aPermissions=array(
'assessments'=>array('create'=>true,'read'=>true,'update'=>true,'delete'=>true,'import'=>false,'export'=>false,'title'=>$clang->gT("Assessments"),'description'=>$clang->gT("Permission to create/view/update/delete assessments rules for a survey"),'img'=>'assessments'), // Checked
'quotas'=>array('create'=>true,'read'=>true,'update'=>true,'delete'=>true,'import'=>false,'export'=>false,'title'=>$clang->gT("Quotas"),'description'=>$clang->gT("Permission to create/view/update/delete quota rules for a survey"),'img'=>'quota'), // Checked
Expand All @@ -42,6 +45,7 @@ function aGetBaseSurveyPermissions()
'tokens'=>array('create'=>true,'read'=>true,'update'=>true,'delete'=>true,'import'=>true,'export'=>true,'title'=>$clang->gT("Tokens"),'description'=>$clang->gT("Permission to create/update/delete/import/export token entries"),'img'=>'tokens'),
'translations'=>array('create'=>false,'read'=>true,'update'=>true,'delete'=>false,'import'=>false,'export'=>false,'title'=>$clang->gT("Quick translation"),'description'=>$clang->gT("Permission to view & update the translations using the quick-translation feature"),'img'=>'translate')
);

uasort($aPermissions,"aComparePermission");
return $aPermissions;
}
Expand Down
10 changes: 10 additions & 0 deletions application/models/survey_permissions_model.php
Expand Up @@ -29,5 +29,15 @@ function getSomeRecords($fields,$condition=FALSE)

return $data;
}

function deleteSomeRecords($condition)
{
$this->db->delete('survey_permissions', $condition);
}

function insertSomeRecords($data)
{
$this->db->insert('survey_permissions', $data);
}

}
2 changes: 1 addition & 1 deletion application/models/surveys_languagesettings_model.php
Expand Up @@ -73,7 +73,7 @@ function getAllData($sid,$lcode)

function insertNewSurvey($data)
{
$this->db->insert('surveys', $data);
$this->db->insert('surveys_languagesettings', $data);
}

}
2 changes: 1 addition & 1 deletion application/views/admin/Survey/subview/tab_view.php
Expand Up @@ -8,7 +8,7 @@
<li><a href='#import'><?php echo $clang->gT("Import"); ?></a></li>
<li><a href='#copy'><?php echo $clang->gT("Copy"); ?></a></li>
</ul>
<form class='form30' name='addnewsurvey' id='addnewsurvey' action='../index' method='post' onsubmit="alert('hi');return isEmpty(document.getElementById('surveyls_title'), '<?php echo $clang->gT("Error: You have to enter a title for this survey.", 'js'); ?> ');" >
<form class='form30' name='addnewsurvey' id='addnewsurvey' action='<?php echo site_url("admin/database/index/insertsurvey"); ?>' method='post' onsubmit="alert('hi');return isEmpty(document.getElementById('surveyls_title'), '<?php echo $clang->gT("Error: You have to enter a title for this survey.", 'js'); ?> ');" >
<div id='general'>
<ul><li>

Expand Down

0 comments on commit 1466830

Please sign in to comment.