예제 #1
0
 /**
  * Returns the static model of the specified AR class.
  * Please note that you should have this exact method in all your CActiveRecord descendants!
  * @param string $className active record class name.
  * @return WTestCat the static model class
  */
 public static function model($className = __CLASS__)
 {
     return parent::model($className);
 }
예제 #2
0
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                <h4 class="modal-title" id="title_box_pretest">Setup Pre-Test in Course</h4>
                <input type="hidden" id="indexLecture">
                <input type="hidden" id="kind_of_test" value="0">
            </div>
            <!--form search-->
            <div class="modal-body" >
                <div style="width:100%;float: left; margin-bottom: 5px;">
                    <label class="sr-only">Search</label>
                    <input type="text" id="test_name" class="form-control" placeholder="Name Test" style="width: 180px;float: left;">
                    <select id="dataListTestCat" style='width:215px;float:left;margin-left:10px' class="form-control">
                        <option selected="selected" value="">Chọn danh mục Test</option>
                        <?php 
$TestCat = TestCat::model()->findAll();
?>
                        <?php 
if (!empty($TestCat)) {
    ?>
                            <?php 
    foreach ($TestCat as $item_cate) {
        ?>
                            <option value="<?php 
        echo $item_cate['id'];
        ?>
"><?php 
        echo $item_cate['test_cat'];
        ?>
</option>
                            <?php