function translate_attention_status($s_object) { // Seminar Object $status_code = 0; $start_date = strtotime(reFormatDate($s_object->seminar->start_date) . " " . $s_object->seminar->from_time); $now = time(); if ($s_object->attended == 1) { $status_code = 1; } elseif ($start_date > $now) { $status_code = -1; } $status = array("未受講", "受講済み"); $status[-1] = "申し込み中"; return $status[$status_code]; }
</td> <td class="col-center"> <button class="btn action-btn btn-primary" data-action="1" data-row="register-row" name="register">新規登録</button> </td> </tr> <?php foreach ($tests as $test): ?> <tr id="<?php echo $test->id ?>"> <td> <?php echo $form->hiddenField($model, 'id', array('value' => $test->id)); ?> <?php echo $form->textField($model, 'title', array('value' => $test->title)); ?> </td> <td> <?php echo $form->textField($model, 'date1', array('class'=>'ime-disabled datepicker span12', 'data-date' => '2015/01/01', 'data-date-format' => 'yyyy/mm/dd', 'value' => reFormatDate($test->date1))); ?> </td> <td> <?php echo $form->textField($model, 'date2', array('class'=>'ime-disabled datepicker span12', 'data-date' => '2015/01/01', 'data-date-format' => 'yyyy/mm/dd', 'value' => reFormatDate($test->date2))); ?> </td> <td> <?php echo $form->numberField($model, 'am', array( 'class'=>'ime-disabled span12', 'value' => $test->am )); ?> </td> <td> <?php echo $form->numberField($model, 'point', array( 'class'=>'ime-disabled span12', 'value' => $test->point )); ?> </td> <td class="col-center"> <?php $checked = $test->flag == "1" ? "checked" : null; echo $form->checkBox($model, 'flag', array('value' => 1,'uncheckValue' => 0, $checked => $checked)); ?> </td> <td name="remark"> <?php echo $test->remark ?> </td>
<div class="widget-box"> <div class="widget-content nopadding"> <table class="table table-bordered table-striped"> <thead> <tr> <th>実施日</th> <th>問題数</th> <th>正解数</th> <th>合否</th> </tr> </thead> <tbody> <?php foreach ($testHistory as $history): ?> <tr class="odd gradeX"> <td style="text-align: center"><?php echo reFormatDate($history->date) ?></td> <td style="text-align: center"><?php echo $history->am ?></td> <td style="text-align: center"><?php echo $history->point ?></td> <td style="text-align: center"><?php if($history->pof == 0){echo "不合格";}elseif($history->pof == 1){echo "合格";}?></td> </tr> <?php endforeach ?> </tbody> </table> <div style="float: right"> <?php $this->widget('customPager', array( 'pages' => $pages, 'jsCallback' => 'showPage' )); ?> </div> </div> </div>
</div> <div class="span4"> <small class="control-label span5">メールアドレス</small> <strong class="span7" name="lbl_p_email"><?php echo $student->email ?></strong> </div> </div> </div> <table class="table table-bordered"> <thead> <tr> <th>開催日時</th> <th>セミナー名称</th> <th>開催場所</th> <th>受講状況</th> </tr> </thead> <tbody> <?php foreach ($seminars as $s): ?> <tr> <td class="col-center"><?php echo reFormatDate($s->seminar->start_date) ?> <br /> <?php echo $s->seminar->from_time."~".$s->seminar->to_time ?></td> <td><?php echo $s->seminar->name ?></td> <td class="col-center"><?php echo $s->seminar->location ?></td> <td class="col-center"><?php echo translate_attention_status($s); ?></td> </tr> <?php endforeach ?> </tbody> </table> <!-- pager --> <?php $this->widget('customPager', array( 'pages' => $pages, 'jsCallback' => 'showPage' ));
<table class="table table-bordered table-striped"> <thead> <tr> <th>実施日</th> <th>問題数</th> <th>正解数</th> <th>合否</th> </tr> </thead> <tbody> <?php if(isset($list_test)) { foreach($list_test as $value) { $fof = Yii::app()->params['pof_values'][$value->pof]; echo '<tr class="odd gradeX">'; echo '<td>'.reFormatDate($value->date).'</td>'; echo '<td>'.$value->am.'</td>'; echo '<td>'.$value->point.'</td>'; echo '<td>'.$fof.'</td>'; } } ?> </tbody> </table> <?php $this->widget('customPager', array( 'pages' => $pages, 'jsCallback' => 'showPage' )) ?> <div class="control-group right"> <button type="button" name="hide" class="btn btn-success right">戻る</button> </div> </div>
<p>受講者一覧を表示するセミナーの「表示」ボタンをクリックしてください。</p> <div class="widget-box"> <div class="widget-content nopadding"> <table class="table table-bordered table-striped td1-center td3-center td4-center"> <thead> <tr> <th>開催日時</th> <th>セミナー名称</th> <th>開催場所</th> <th>受講者一覧</th> </tr> </thead> <tbody> <?php foreach ($seminars as $s): ?> <tr class="odd gradeX"> <td><?php echo reFormatDate($s->start_date) ?> <br /> <?php echo $s->from_time."~".$s->to_time ?></td> <td><?php echo $s->name ?></td> <td class="col-center"><?php echo $s->location ?></td> <td class="col-center"><button class="btn view-st-list" data-s-id="<?php echo $s->id ?>">表示</button></td> </tr> <?php endforeach ?> </tbody> </table> </div> </div> <!-- pager --> <?php $this->widget('customPager', array( 'pages' => $pages )); ?> <div class="modal fade autoModal" id="stListModal" tabindex="-1" role="dialog" aria-labelledby="modalLabel" aria-hidden="true"> <div class="modal-dialog">
<th nowrap="nowrap" style = "width : 15%">講師</th> <th nowrap="nowrap"style = "width : 25%">開催場所</th> <th nowrap="nowrap">詳細</th> <th nowrap="nowrap">申告</th> </tr> </thead> <tbody> <?php foreach ($seminars as $seminar): ?> <!-- Seminar Apply --> <?php $applyCode = ""; $attented = ""; $fromDate = reFormatDate($seminar->apply_from_date); $toDate = reFormatDate($seminar->apply_to_date); $dateTime = reFormatDate($seminar->start_date).' '.$seminar->to_time.':00'; $nowDate = date("Y/m/d H:i:s"); if(isset($seminar->seminarStudents[0])){ $seminarStudent = $seminar->seminarStudents[0]; $applyCode = $seminarStudent->apply_code; $attented = $seminarStudent->attended; } ?> <tr class="odd gradeX " > <td class="col-center" nowrap="nowrap"><?php echo formatDateToJP($seminar->start_date,2); ?> <br /><?php echo $seminar->from_time."~".$seminar->to_time ?></td> <td><?php echo $seminar->name ?></td> <td><?php echo $seminar->lecturer?></td> <td class="col-center"> <?php if($seminar->location_url) { ?> <a target ="_blank" href="<?php echo $seminar->location_url?>"><?php echo $seminar->location ?></a> <?php } else { echo $seminar->location;}?>
<thead> <tr> <th nowrap="nowrap">開催日時</th> <th nowrap="nowrap">セミナー名称</th> <th nowrap="nowrap">講師</th> <th nowrap="nowrap">開催場所</th> <th nowrap="nowrap">詳細</th> <th nowrap="nowrap">申し込み</th> </tr> </thead> <tbody> <?php foreach ($listAttended as $seminar): $fromDate = reFormatDate($seminar['apply_from_date']); $toDate = reFormatDate($seminar['apply_to_date']); $dateTime = reFormatDate($seminar['start_date']).' '.$seminar['to_time'].':00'; $nowDate = date("Y/m/d H:i:s"); $applyCode = $seminar['apply_code']; $attented = $seminar['attended']; $tr_class = 'odd gradeX'; $td_html = '<td nowrap="nowrap" class="col-center">受講済み<div class="id-issued">受付番号:'.$applyCode.'</div></td>'; ?> <tr <?php echo 'class="'.$tr_class.'"' ?>> <td class="col-center" nowrap="nowrap"> <?php echo formatDateToJP($seminar['start_date'],2); ?> <br /><?php echo $seminar['from_time']."~".$seminar['to_time'] ?> </td> <td><?php echo $seminar['name']?></td> <td><?php echo $seminar['lecturer']?></td> <td class="col-center"> <?php if($seminar['location_url']) { ?>
$attented = $seminarStudent->attended; } $td_html = '<td class = "col-center"> </td>'; $tr_class = 'odd gradeX'; if($fromDate <= $toDate && $toDate <= reFormatDate($dateTime) ){ if($nowDate < $fromDate){ $td_html = '<td nowrap="nowrap" class="col-center"> 申し込み期間は</br>'. reFormatDate($seminar->apply_from_date).'~'.reFormatDate($seminar->apply_to_date).'です </td>'; } else{ if($applyCode == ""){ if( $fromDate <= reFormatDate($nowDate) && reFormatDate($nowDate) <= $toDate && $nowDate <= $dateTime){ $td_html = '<td nowrap="nowrap" class="col-center"> <button name="seminar-btn" data-student-id="'.$student_id.'" data-s-id="'.$seminar->id.'" class="btn btn-success seminar-btn"> 申し込み </button> </td>'; $tr_class = 'odd gradeX serminar-interms-tr'; } elseif($seminar->apply_to_date < $nowDate) $td_html = '<td nowrap="nowrap" class="col-center">未申し込み</td>'; } else {