Ejemplo n.º 1
0
 /**
  * Creates data provider instance with search query applied
  *
  * @param array $params
  *
  * @return ActiveDataProvider
  */
 public function search($params)
 {
     $query = SubjectSection::find();
     $dataProvider = new ActiveDataProvider(['query' => $query]);
     if (!($this->load($params) && $this->validate())) {
         return $dataProvider;
     }
     $query->andFilterWhere(['SubjectSectionId' => $this->SubjectSectionId, 'SectionType' => $this->SectionType, 'SectionName' => $this->SectionName, 'SubjectId' => $this->SubjectId]);
     return $dataProvider;
 }
Ejemplo n.º 2
0
?>

    <?php 
echo $form->field($model, 'MaxScore')->textInput(['type' => 'number']);
?>
    
    <?php 
echo $form->field($model, 'NumQuestions')->textInput(['type' => 'number']);
?>

    <?php 
echo $form->field($model, 'IsActive')->textInput(['type' => 'number']);
?>
    
    <?php 
$sections = SubjectSection::find()->where(['SectionType' => 'Laboratory'])->all();
$items = array();
foreach ($sections as $section) {
    $items[$section->SubjectSectionId . ''] = $section->SectionName;
}
?>
    
    
    <?php 
echo $form->field($model, 'SubjectSectionId')->dropDownList($items);
?>
    
    

    <div class="form-group">
        <?php