/media/shnoulle/data/www/master/application/models/Question.php(887)
875 ); 876 } 877 878 /** 879 * Return if question has managed subquestions 880 * usage in rules : allow set other even if existing subquestions 'other' exist (but deleted after) 881 * @return boolean 882 */ 883 public function getAllowSubquestions() 884 { 885 return ( 886 !$this->parent_qid 887 && $this->getQuestionType()->subquestions 888 ); 889 } 890 891 /** 892 * Return true if the question type supports answer options 893 * @return boolean 894 */ 895 public function getAllowAnswerOptions() 896 { 897 return ( 898 !$this->parent_qid 899 && $this->getQuestionType()->answerscales > 0
| #0 |
+
–
/media/shnoulle/data/www/master/application/models/Question.php(1507): Question->getAllowSubquestions() 1502 * Check if this question have subquestion with other code 1503 * @return boolean 1504 */ 1505 public function getHasOtherSubquestions() 1506 { 1507 if (!$this->getAllowSubquestions()) { 1508 return false; 1509 } 1510 $otherSubQuestionCount = Question::model()->count( 1511 "parent_qid=:parent_qid and LOWER(title)='other'", 1512 array("parent_qid" => $this->qid) |
| #1 |
+
–
/media/shnoulle/data/www/master/application/models/Question.php(237): Question->getHasOtherSubquestions() 232 if ($oParentQuestion->type == "P") { 233 $aRules[] = array('title', 'match', 'pattern' => '/comment$/', 'not' => true, 'message' => gT("'comment' suffix can not be used with multiple choice with comments.")); 234 } 235 } else { 236 /* Question specific rules*/ 237 if ($this->getHasOtherSubquestions()) { 238 // Disallow other if sub question have 'other' for title 239 $aRules[] = array('other', 'compare', 'compareValue' => 'Y', 'operator' => '!=', 'message' => sprintf(gT("'%s' can not be used if the 'Other' option for this question is activated."), 'other')); 240 } 241 } 242 if (!empty($this->survey) && $this->survey->isActive) { |
| #2 |
+
–
/media/shnoulle/data/www/master/vendor/yiisoft/yii/framework/base/CModel.php(284): Question->rules() 279 * @return CList validators built based on {@link rules()}. 280 */ 281 public function createValidators() 282 { 283 $validators=new CList; 284 foreach($this->rules() as $rule) 285 { 286 if(isset($rule[0],$rule[1])) // attributes, validator name 287 $validators->add(CValidator::createValidator($rule[1],$this,$rule[0],array_slice($rule,2))); 288 else 289 throw new CException(Yii::t('yii','{class} has an invalid validation rule. The rule must specify attributes to be validated and the validator name.', |
| #3 |
+
–
/media/shnoulle/data/www/master/vendor/yiisoft/yii/framework/base/CModel.php(260): CModel->createValidators() 255 * @return array the validators applicable to the current {@link scenario}. 256 */ 257 public function getValidators($attribute=null) 258 { 259 if($this->_validators===null) 260 $this->_validators=$this->createValidators(); 261 262 $validators=array(); 263 $scenario=$this->getScenario(); 264 foreach($this->_validators as $validator) 265 { |
| #4 |
+
–
/media/shnoulle/data/www/master/vendor/yiisoft/yii/framework/base/CModel.php(158): CModel->getValidators() 153 { 154 if($clearErrors) 155 $this->clearErrors(); 156 if($this->beforeValidate()) 157 { 158 foreach($this->getValidators() as $validator) 159 $validator->validate($this,$attributes); 160 $this->afterValidate(); 161 return !$this->hasErrors(); 162 } 163 else |
| #5 |
+
–
/media/shnoulle/data/www/master/vendor/yiisoft/yii/framework/db/ar/CActiveRecord.php(810): CModel->validate(null) 805 * meaning all attributes that are loaded from DB will be saved. 806 * @return boolean whether the saving succeeds 807 */ 808 public function save($runValidation=true,$attributes=null) 809 { 810 if(!$runValidation || $this->validate($attributes)) 811 return $this->getIsNewRecord() ? $this->insert($attributes) : $this->update($attributes); 812 else 813 return false; 814 } 815 |
| #6 |
+
–
/media/shnoulle/data/www/master/application/models/services/CopyQuestion.php(137): CActiveRecord->save() 132 } else { 133 $this->newQuestion->sid = $this->copyQuestionValues->getOSurvey()->sid; 134 } 135 136 137 return $this->newQuestion->save(); 138 } 139 140 /** 141 * Copies the languages of a question. 142 * |
| #7 |
+
–
/media/shnoulle/data/www/master/application/models/services/CopyQuestion.php(70): LimeSurvey\Models\Services\CopyQuestion->createNewCopiedQuestion("S3", 129, Question, 454111) 65 * 66 * @return boolean True if new copied question could be saved, false otherwise 67 */ 68 public function copyQuestion($surveyId = null) 69 { 70 $copySuccessful = $this->createNewCopiedQuestion( 71 $this->copyQuestionValues->getQuestionCode(), 72 $this->copyQuestionValues->getQuestionGroupId(), 73 $this->copyQuestionValues->getQuestiontoCopy(), 74 $surveyId 75 ); |
| #8 |
+
–
/media/shnoulle/data/www/master/application/models/services/CopySurvey.php(475): LimeSurvey\Models\Services\CopyQuestion->copyQuestion(454111) 470 $optionsCopyQuestion['copyAnswerOptions'] = $this->options->isAnswerOptions(); 471 $optionsCopyQuestion['copyDefaultAnswers'] = false; //we have to do it separately here (id-mapping) 472 $optionsCopyQuestion['copySettings'] = true; 473 $optionsCopyQuestion['adjustLinks'] = $this->options->isResourcesAndLinks(); 474 $copyQuestion = new CopyQuestion($copyQuestionValues, $optionsCopyQuestion); 475 if ($copyQuestion->copyQuestion($destinationSurvey->sid)) { 476 foreach ($copyQuestion->getCopyErrors() as $copyError) { 477 $copyResults->setWarnings(sprintf( 478 gT("Question '%s': %s"), 479 \CHtml::encode($question->title), 480 $copyError |
| #9 |
+
–
/media/shnoulle/data/www/master/application/models/services/CopySurvey.php(119): LimeSurvey\Models\Services\CopySurvey->copyGroupsAndQuestions(LimeSurvey\Models\Services\CopySurveyResult, Survey) 114 $destinationSurvey->currentLanguageSettings->surveyls_title = $newTitle; 115 } else { 116 $destinationSurvey->currentLanguageSettings->surveyls_title = sprintf(gT('%s - Copy', 'unescaped', $this->sourceSurvey->language), $this->sourceSurvey->currentLanguageSettings->surveyls_title); 117 } 118 $destinationSurvey->currentLanguageSettings->save(); 119 $mappingGroupIdsAndQuestionIds = $this->copyGroupsAndQuestions($copySurveyResult, $destinationSurvey); 120 $this->copySurveyAssessments($copySurveyResult, $destinationSurvey, $mappingGroupIdsAndQuestionIds['questionGroupIds']); 121 if ($this->options->isUrlParameters()) { 122 $this->copySurveyUrlParameters( 123 $copySurveyResult, 124 $destinationSurvey, |
| #10 |
+
–
/media/shnoulle/data/www/master/application/controllers/SurveyAdministrationController.php(2489): LimeSurvey\Models\Services\CopySurvey->copy() 2484 $sourceSurvey, 2485 $options, 2486 $newSurveyId, 2487 ); 2488 2489 $copyResults = $copySurveyService->copy(); 2490 2491 $copiedSurvey = $copyResults->getCopiedSurvey(); 2492 if ($copiedSurvey !== null) { 2493 $groupList = QuestionGroup::model()->findAllByAttributes(['sid' => $copiedSurvey->sid]); 2494 $this->resetExpressionManager($copiedSurvey, $groupList); |
| #11 |
+
–
/media/shnoulle/data/www/master/vendor/yiisoft/yii/framework/web/actions/CInlineAction.php(49): SurveyAdministrationController->actionCopy() 44 $controller=$this->getController(); 45 $method=new ReflectionMethod($controller, $methodName); 46 if($method->getNumberOfParameters()>0) 47 return $this->runWithParamsInternal($controller, $method, $params); 48 49 $controller->$methodName(); 50 return true; 51 } 52 } |
| #12 |
+
–
/media/shnoulle/data/www/master/vendor/yiisoft/yii/framework/web/CController.php(308): CInlineAction->runWithParams(array()) 303 { 304 $priorAction=$this->_action; 305 $this->_action=$action; 306 if($this->beforeAction($action)) 307 { 308 if($action->runWithParams($this->getActionParams())===false) 309 $this->invalidActionParams($action); 310 else 311 $this->afterAction($action); 312 } 313 $this->_action=$priorAction; |
| #13 |
+
–
/media/shnoulle/data/www/master/vendor/yiisoft/yii/framework/web/filters/CFilterChain.php(134): CController->runAction(CInlineAction) 129 $filter=$this->itemAt($this->filterIndex++); 130 Yii::trace('Running filter '.($filter instanceof CInlineFilter ? get_class($this->controller).'.filter'.$filter->name.'()':get_class($filter).'.filter()'),'system.web.filters.CFilterChain'); 131 $filter->filter($this); 132 } 133 else 134 $this->controller->runAction($this->action); 135 } 136 } |
| #14 |
+
–
/media/shnoulle/data/www/master/vendor/yiisoft/yii/framework/web/CController.php(1119): CFilterChain->run() 1114 * @throws CHttpException if the current request is not a POST request 1115 */ 1116 public function filterPostOnly($filterChain) 1117 { 1118 if(Yii::app()->getRequest()->getIsPostRequest()) 1119 $filterChain->run(); 1120 else 1121 throw new CHttpException(400,Yii::t('yii','Your request is invalid.')); 1122 } 1123 1124 /** |
| #15 |
+
–
/media/shnoulle/data/www/master/vendor/yiisoft/yii/framework/web/filters/CInlineFilter.php(58): CController->filterPostOnly(CFilterChain) 53 * @param CFilterChain $filterChain the filter chain that the filter is on. 54 */ 55 public function filter($filterChain) 56 { 57 $method='filter'.$this->name; 58 $filterChain->controller->$method($filterChain); 59 } 60 } |
| #16 |
+
–
/media/shnoulle/data/www/master/vendor/yiisoft/yii/framework/web/filters/CFilterChain.php(131): CInlineFilter->filter(CFilterChain) 126 { 127 if($this->offsetExists($this->filterIndex)) 128 { 129 $filter=$this->itemAt($this->filterIndex++); 130 Yii::trace('Running filter '.($filter instanceof CInlineFilter ? get_class($this->controller).'.filter'.$filter->name.'()':get_class($filter).'.filter()'),'system.web.filters.CFilterChain'); 131 $filter->filter($this); 132 } 133 else 134 $this->controller->runAction($this->action); 135 } 136 } |
| #17 |
+
–
/media/shnoulle/data/www/master/vendor/yiisoft/yii/framework/web/CController.php(291): CFilterChain->run() 286 $this->runAction($action); 287 else 288 { 289 $priorAction=$this->_action; 290 $this->_action=$action; 291 CFilterChain::create($this,$action,$filters)->run(); 292 $this->_action=$priorAction; 293 } 294 } 295 296 /** |
| #18 |
+
–
/media/shnoulle/data/www/master/vendor/yiisoft/yii/framework/web/CController.php(265): CController->runActionWithFilters(CInlineAction, array("postOnly + copy, fixNumbering")) 260 { 261 if(($parent=$this->getModule())===null) 262 $parent=Yii::app(); 263 if($parent->beforeControllerAction($this,$action)) 264 { 265 $this->runActionWithFilters($action,$this->filters()); 266 $parent->afterControllerAction($this,$action); 267 } 268 } 269 else 270 $this->missingAction($actionID); |
| #19 |
+
–
/media/shnoulle/data/www/master/application/controllers/LSBaseController.php(148): CController->run("copy") 143 $this->redirect(array('/admin/authentication/sa/login')); 144 } 145 } 146 } 147 148 parent::run($action); 149 } 150 151 /** 152 * Load and set session vars 153 * |
| #20 |
+
–
/media/shnoulle/data/www/master/vendor/yiisoft/yii/framework/web/CWebApplication.php(282): LSBaseController->run("copy") 277 { 278 list($controller,$actionID)=$ca; 279 $oldController=$this->_controller; 280 $this->_controller=$controller; 281 $controller->init(); 282 $controller->run($actionID); 283 $this->_controller=$oldController; 284 } 285 else 286 throw new CHttpException(404,Yii::t('yii','Unable to resolve the request "{route}".', 287 array('{route}'=>$route===''?$this->defaultController:$route))); |
| #21 |
+
–
/media/shnoulle/data/www/master/vendor/yiisoft/yii/framework/web/CWebApplication.php(141): CWebApplication->runController("surveyAdministration/copy") 136 foreach(array_splice($this->catchAllRequest,1) as $name=>$value) 137 $_GET[$name]=$value; 138 } 139 else 140 $route=$this->getUrlManager()->parseUrl($this->getRequest()); 141 $this->runController($route); 142 } 143 144 /** 145 * Registers the core application components. 146 * This method overrides the parent implementation by registering additional core components. |
| #22 |
+
–
/media/shnoulle/data/www/master/vendor/yiisoft/yii/framework/base/CApplication.php(185): CWebApplication->processRequest() 180 public function run() 181 { 182 if($this->hasEventHandler('onBeginRequest')) 183 $this->onBeginRequest(new CEvent($this)); 184 register_shutdown_function(array($this,'end'),0,false); 185 $this->processRequest(); 186 if($this->hasEventHandler('onEndRequest')) 187 $this->onEndRequest(new CEvent($this)); 188 } 189 190 /** |
| #23 |
+
–
/media/shnoulle/data/www/master/index.php(164): CApplication->run() 159 require_once APPPATH . 'core/LSYii_Application' . EXT; 160 161 $config = require_once(APPPATH . 'config/internal' . EXT); 162 163 Yii::$enableIncludePath = false; 164 Yii::createApplication('LSYii_Application', $config)->run(); 165 166 /* End of file index.php */ 167 /* Location: ./index.php */ |