コード例 #1
0
                        <th><?php 
echo Yii::t('parentportal', 'Remarks');
?>
</th>
                        <th><?php 
echo Yii::t('parentportal', 'Result');
?>
</th>
                    </tr>
                    <?php 
if ($electives == NULL) {
    echo '<tr><td align="center" colspan="4"><i>' . Yii::t('studentportal', 'No Assessments') . '</i></td></tr>';
} else {
    $displayed_flag = '';
    foreach ($electives as $elective) {
        $exm = ElectiveExams::model()->findByAttributes(array('id' => $elective->exam_id));
        $group = ExamGroups::model()->findByAttributes(array('id' => $exm->exam_group_id, 'result_published' => 1));
        if ($group != NULL and count($group) > 0) {
            echo '<tr>';
            if ($exm != NULL) {
                $displayed_flag = 1;
                //$group=ExamGroups::model()->findByAttributes(array('id'=>$exm->exam_group_id));
                echo '<td>' . $group->name . '</td>';
                $sub = ElectiveGroups::model()->findByAttributes(array('id' => $exm->elective_id));
                echo '<td>' . $sub->name . '</td>';
                echo '<td>' . $elective->marks . '</td>';
                echo '<td>';
                if ($elective->remarks != NULL) {
                    echo $elective->remarks;
                } else {
                    echo '-';
コード例 #2
0
 /**
  * Returns the data model based on the primary key given in the GET variable.
  * If the data model is not found, an HTTP exception will be raised.
  * @param integer the ID of the model to be loaded
  */
 public function loadModel($id)
 {
     $model = ElectiveExams::model()->findByPk($id);
     if ($model === null) {
         throw new CHttpException(404, 'The requested page does not exist.');
     }
     return $model;
 }
コード例 #3
0
          <?php 
    $this->widget('zii.widgets.grid.CGridView', array('id' => 'exams-grid', 'dataProvider' => $model1->search(), 'pager' => array('cssFile' => Yii::app()->baseUrl . '/css/formstyle.css'), 'cssFile' => Yii::app()->baseUrl . '/css/formstyle.css', 'columns' => array(array('name' => 'subject_id', 'value' => array($model, 'subjectname')), 'start_time', 'end_time', 'maximum_marks', array('class' => 'CButtonColumn', 'buttons' => array('update' => array('label' => 'update', 'url' => 'Yii::app()->createUrl("examination/exams/update", array("sid"=>$data->id,"exam_group_id"=>$data->exam_group_id,"id"=>$_REQUEST["id"]))')), 'template' => '{update} {delete}', 'afterDelete' => 'function(){window.location.reload();}'), array('class' => 'CButtonColumn', 'buttons' => array('add' => array('label' => 'Exam Score', 'url' => 'Yii::app()->createUrl("examination/examScores/create", array("examid"=>$data->id,"id"=>$_REQUEST["id"]))')), 'template' => '{add}', 'header' => 'Manage', 'htmlOptions' => array('style' => 'width:17%'), 'headerHtmlOptions' => array('style' => 'color:#FF6600')))));
    echo '</div></div>';
} else {
    echo '<div class="notifications nt_red">' . Yii::t('examination', '<i>Nothing Scheduled</i>') . '</div>';
}
?>

<br />
  <?php 
$model3 = new ElectiveGroups();
$checkelective = ElectiveExams::model()->findByAttributes(array('exam_group_id' => $_REQUEST['exam_group_id']));
if ($checkelective != NULL) {
    ?>
    <div >
    <div >
    <?php 
    $model2 = new ElectiveExams('search');
    $model2->unsetAttributes();
    // clear any default values
    if (isset($_GET['exam_group_id'])) {
        $model2->id = $checkelective->id;
    }
    ?>
          <h3> Scheduled Electives</h3>
          <?php 
    $this->widget('zii.widgets.grid.CGridView', array('id' => 'elective-exams-grid', 'dataProvider' => $model2->search(), 'pager' => array('cssFile' => Yii::app()->baseUrl . '/css/formstyle.css'), 'cssFile' => Yii::app()->baseUrl . '/css/formstyle.css', 'columns' => array(array('name' => 'elective_id', 'value' => array($model, 'electivename')), 'start_time', 'end_time', 'maximum_marks', array('class' => 'CButtonColumn', 'template' => '{update} {delete}', 'afterDelete' => 'function(){window.location.reload();}', 'buttons' => array('update' => array('label' => 'update', 'url' => 'Yii::app()->createUrl("examination/electiveExams/update", array("sid"=>$data->id,"exam_group_id"=>$data->exam_group_id,"id"=>$_REQUEST["id"]))'), 'delete' => array('label' => 'delete', 'url' => 'Yii::app()->createUrl("examination/electiveExams/delete", array("elective_id"=>$data->id,"exam_group_id"=>$data->exam_group_id,"id"=>$_REQUEST["id"]))'))), array('class' => 'CButtonColumn', 'buttons' => array('add' => array('label' => 'Exam Score', 'url' => 'Yii::app()->createUrl("examination/electiveScores/create", array("examid"=>$data->id,"id"=>$_REQUEST["id"],elective=>$data->elective_id))')), 'template' => '{add}', 'header' => 'Manage', 'htmlOptions' => array('style' => 'width:17%'), 'headerHtmlOptions' => array('style' => 'color:#FF6600')))));
    echo '</div></div>';
} else {
    echo '<div class="notifications nt_red">' . Yii::t('examination', '<i>Nothing Scheduled</i>') . '</div>';
}