/home/activity/domains/activities.rwb.ac.th/public_html/framework/db/ar/CActiveFinder.php(1307)
1295 1296 private function queryOneMany() 1297 { 1298 $relation=$this->relation; 1299 $model=CActiveRecord::model($relation->className); 1300 $builder=$model->getCommandBuilder(); 1301 $schema=$builder->getSchema(); 1302 $table=$model->getTableSchema(); 1303 $parent=$this->_parent; 1304 $pkTable=$parent->model->getTableSchema(); 1305 1306 $fks=preg_split('/\s*,\s*/',$relation->foreignKey,-1,PREG_SPLIT_NO_EMPTY); 1307 if(count($fks)!==count($pkTable->primaryKey)) 1308 throw new CDbException(Yii::t('yii','The relation "{relation}" in active record class "{class}" is specified with an invalid foreign key. The columns in the key must match the primary keys of the table "{table}".', 1309 array('{class}'=>get_class($parent->model), '{relation}'=>$relation->name, '{table}'=>$pkTable->name))); 1310 1311 // set up mapping between fk and pk columns 1312 $map=array(); // pk=>fk 1313 foreach($fks as $i=>$fk) 1314 { 1315 if(!isset($table->columns[$fk])) 1316 throw new CDbException(Yii::t('yii','The relation "{relation}" in active record class "{class}" is specified with an invalid foreign key "{key}". There is no such column in the table "{table}".', 1317 array('{class}'=>get_class($parent->model), '{relation}'=>$relation->name, '{key}'=>$fk, '{table}'=>$table->name))); 1318 1319 if(isset($table->foreignKeys[$fk]))
#0 |
+
–
/home/activity/domains/activities.rwb.ac.th/public_html/framework/db/ar/CActiveFinder.php(1293): CStatElement->queryOneMany() 1288 public function query() 1289 { 1290 if(preg_match('/^\s*(.*?)\((.*)\)\s*$/',$this->relation->foreignKey,$matches)) 1291 $this->queryManyMany($matches[1],$matches[2]); 1292 else 1293 $this->queryOneMany(); 1294 } 1295 1296 private function queryOneMany() 1297 { 1298 $relation=$this->relation; |
#1 |
+
–
/home/activity/domains/activities.rwb.ac.th/public_html/framework/db/ar/CActiveFinder.php(430): CStatElement->query() 425 $pk[$name]=$baseRecord->$name; 426 $this->records[serialize($pk)]=$baseRecord; 427 } 428 429 foreach($this->stats as $stat) 430 $stat->query(); 431 432 if(empty($this->children)) 433 return; 434 435 $child=reset($this->children); |
#2 |
+
–
/home/activity/domains/activities.rwb.ac.th/public_html/framework/db/ar/CActiveFinder.php(166): CJoinElement->lazyFind(Student) 161 * This method is internally invoked by {@link CActiveRecord} to support lazy loading. 162 * @param CActiveRecord $baseRecord the base record whose related objects are to be loaded 163 */ 164 public function lazyFind($baseRecord) 165 { 166 $this->_joinTree->lazyFind($baseRecord); 167 if(!empty($this->_joinTree->children)) 168 { 169 $child=reset($this->_joinTree->children); 170 $child->afterFind(); 171 } |
#3 |
+
–
/home/activity/domains/activities.rwb.ac.th/public_html/framework/db/ar/CActiveRecord.php(240): CActiveFinder->lazyFind(Student) 235 else 236 $r=$name; 237 unset($this->_related[$name]); 238 239 $finder=new CActiveFinder($this,$r); 240 $finder->lazyFind($this); 241 242 if(!isset($this->_related[$name])) 243 { 244 if($relation instanceof CHasManyRelation) 245 $this->_related[$name]=array(); |
#4 |
+
–
/home/activity/domains/activities.rwb.ac.th/public_html/framework/db/ar/CActiveRecord.php(108): CActiveRecord->getRelated("numAbsences") 103 else if(isset($this->getMetaData()->columns[$name])) 104 return null; 105 else if(isset($this->_related[$name])) 106 return $this->_related[$name]; 107 else if(isset($this->getMetaData()->relations[$name])) 108 return $this->getRelated($name); 109 else 110 return parent::__get($name); 111 } 112 113 /** |
#5 |
+
–
/home/activity/domains/activities.rwb.ac.th/public_html/protected/widgets/TimecheckView.php(162): CActiveRecord->__get("numAbsences") 157 <td class="pre"></td>'; 158 $this->renderCells('cellAttendance', 'td', array( 159 'student' => $student 160 )); 161 echo ' 162 <td class="total">' . (Yii::app()->params['numPeriods'] - $student->numAbsences) . '</td> 163 <td class="eval-pass' . $this->check($this->getEvaluation($student) == 1) . '"></td> 164 <td class="eval-fail' . $this->check($this->getEvaluation($student) == -1) . '"></td> 165 </tr>'; 166 } 167 protected function cellAttendance($i, $data, &$attr) { |
#6 |
+
–
/home/activity/domains/activities.rwb.ac.th/public_html/protected/widgets/TimecheckView.php(129): TimecheckView->renderStudentRow(1, Student) 124 </tr>'; 125 } 126 protected function renderBody() { 127 $index = 0; 128 foreach ($this->students as $student) { 129 $this->renderStudentRow(++$index, $student); 130 } 131 } 132 protected function check($cond) { 133 return $cond ? ' check' : ''; 134 } |
#7 |
+
–
/home/activity/domains/activities.rwb.ac.th/public_html/protected/widgets/TimecheckView.php(34): TimecheckView->renderBody() 29 <thead>'; 30 $this->renderHeader(); 31 echo ' 32 </thead> 33 <tbody>'; 34 $this->renderBody(); 35 echo ' 36 </tbody> 37 </table> 38 </div>'; 39 if ($this->editable) { |
#8 |
+
–
/home/activity/domains/activities.rwb.ac.th/public_html/framework/web/CBaseController.php(166): TimecheckView->run() 161 return ob_get_clean(); 162 } 163 else 164 { 165 $widget=$this->createWidget($className,$properties); 166 $widget->run(); 167 return $widget; 168 } 169 } 170 171 /** |
#9 |
+
–
/home/activity/domains/activities.rwb.ac.th/public_html/protected/views/timecheck/view.php(15): CBaseController->widget("TimecheckView", array(array(Student, Student, Student, Student, ...), "changes", false)) 10 echo CHtml::form(); 11 } 12 $widget = $this->widget('TimecheckView', array( 13 'students' => $activity->students, 14 'name' => 'changes', 15 'editable' => $editable, 16 )); 17 if ($editable) { 18 echo CHtml::endForm(); 19 } 20 ?> |
#10 |
+
–
/home/activity/domains/activities.rwb.ac.th/public_html/framework/web/CBaseController.php(119): require("/home/activity/domains/activities.rwb.ac.th/public_html/protecte...") 114 $data=$_data_; 115 if($_return_) 116 { 117 ob_start(); 118 ob_implicit_flush(false); 119 require($_viewFile_); 120 return ob_get_clean(); 121 } 122 else 123 require($_viewFile_); 124 } |
#11 |
+
–
/home/activity/domains/activities.rwb.ac.th/public_html/framework/web/CBaseController.php(88): CBaseController->renderInternal("/home/activity/domains/activities.rwb.ac.th/public_html/protecte...", array(Activity, false), true) 83 { 84 $widgetCount=count($this->_widgetStack); 85 if(($renderer=Yii::app()->getViewRenderer())!==null && $renderer->fileExtension==='.'.CFileHelper::getExtension($viewFile)) 86 $content=$renderer->renderFile($this,$viewFile,$data,$return); 87 else 88 $content=$this->renderInternal($viewFile,$data,$return); 89 if(count($this->_widgetStack)===$widgetCount) 90 return $content; 91 else 92 { 93 $widget=end($this->_widgetStack); |
#12 |
+
–
/home/activity/domains/activities.rwb.ac.th/public_html/framework/web/CController.php(833): CBaseController->renderFile("/home/activity/domains/activities.rwb.ac.th/public_html/protecte...", array(Activity, false), true) 828 */ 829 public function renderPartial($view,$data=null,$return=false,$processOutput=false) 830 { 831 if(($viewFile=$this->getViewFile($view))!==false) 832 { 833 $output=$this->renderFile($viewFile,$data,true); 834 if($processOutput) 835 $output=$this->processOutput($output); 836 if($return) 837 return $output; 838 else |
#13 |
+
–
/home/activity/domains/activities.rwb.ac.th/public_html/framework/web/CController.php(746): CController->renderPartial("view", array(Activity, false), true) 741 */ 742 public function render($view,$data=null,$return=false) 743 { 744 if($this->beforeRender($view)) 745 { 746 $output=$this->renderPartial($view,$data,true); 747 if(($layoutFile=$this->getLayoutFile($this->layout))!==false) 748 $output=$this->renderFile($layoutFile,array('content'=>$output),true); 749 750 $this->afterRender($view,$output); 751 |
#14 |
+
–
/home/activity/domains/activities.rwb.ac.th/public_html/protected/controllers/TimecheckController.php(92): CController->render("view", array(Activity, false)) 87 $this->message(Yii::t('timecheck', 'A report has been sent.')); 88 } else { 89 $this->message(Yii::t('timecheck', 'Gradebook saved successfully.')); 90 } 91 } 92 $this->render('view', compact('activity', 'editable')); 93 } 94 95 public function getActivity() { 96 $model = Activity::model()->findByPk($_GET['id']); 97 if (!$model) { |
#15 |
+
–
/home/activity/domains/activities.rwb.ac.th/public_html/framework/web/actions/CInlineAction.php(57): TimecheckController->actionView() 52 throw new CHttpException(400,Yii::t('yii','Your request is invalid.')); 53 } 54 $method->invokeArgs($controller,$params); 55 } 56 else 57 $controller->$methodName(); 58 } 59 } |
#16 |
+
–
/home/activity/domains/activities.rwb.ac.th/public_html/framework/web/CController.php(300): CInlineAction->run() 295 { 296 $priorAction=$this->_action; 297 $this->_action=$action; 298 if($this->beforeAction($action)) 299 { 300 $action->run(); 301 $this->afterAction($action); 302 } 303 $this->_action=$priorAction; 304 } 305 |
#17 |
+
–
/home/activity/domains/activities.rwb.ac.th/public_html/framework/web/CController.php(278): CController->runAction(CInlineAction) 273 * @see runAction 274 */ 275 public function runActionWithFilters($action,$filters) 276 { 277 if(empty($filters)) 278 $this->runAction($action); 279 else 280 { 281 $priorAction=$this->_action; 282 $this->_action=$action; 283 CFilterChain::create($this,$action,$filters)->run(); |
#18 |
+
–
/home/activity/domains/activities.rwb.ac.th/public_html/framework/web/CController.php(257): CController->runActionWithFilters(CInlineAction, array()) 252 { 253 if(($parent=$this->getModule())===null) 254 $parent=Yii::app(); 255 if($parent->beforeControllerAction($this,$action)) 256 { 257 $this->runActionWithFilters($action,$this->filters()); 258 $parent->afterControllerAction($this,$action); 259 } 260 } 261 else 262 $this->missingAction($actionID); |
#19 |
+
–
/home/activity/domains/activities.rwb.ac.th/public_html/framework/web/CWebApplication.php(328): CController->run("view") 323 { 324 list($controller,$actionID)=$ca; 325 $oldController=$this->_controller; 326 $this->_controller=$controller; 327 $controller->init(); 328 $controller->run($actionID); 329 $this->_controller=$oldController; 330 } 331 else 332 throw new CHttpException(404,Yii::t('yii','Unable to resolve the request "{route}".', 333 array('{route}'=>$route===''?$this->defaultController:$route))); |
#20 |
+
–
/home/activity/domains/activities.rwb.ac.th/public_html/framework/web/CWebApplication.php(121): CWebApplication->runController("timecheck/view") 116 foreach(array_splice($this->catchAllRequest,1) as $name=>$value) 117 $_GET[$name]=$value; 118 } 119 else 120 $route=$this->getUrlManager()->parseUrl($this->getRequest()); 121 $this->runController($route); 122 } 123 124 /** 125 * Registers the core application components. 126 * This method overrides the parent implementation by registering additional core components. |
#21 |
+
–
/home/activity/domains/activities.rwb.ac.th/public_html/framework/base/CApplication.php(155): CWebApplication->processRequest() 150 */ 151 public function run() 152 { 153 if($this->hasEventHandler('onBeginRequest')) 154 $this->onBeginRequest(new CEvent($this)); 155 $this->processRequest(); 156 if($this->hasEventHandler('onEndRequest')) 157 $this->onEndRequest(new CEvent($this)); 158 } 159 160 /** |
#22 |
+
–
/home/activity/domains/activities.rwb.ac.th/public_html/index.php(13): CApplication->run() 08 defined('YII_DEBUG') or define('YII_DEBUG',true); 09 // specify how many levels of call stack should be shown in each log message 10 defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3); 11 12 require_once($yii); 13 Yii::createWebApplication($config)->run(); |