예제 #1
0
$teacher_vn = array();
foreach ($list_teacher as $teacher) {
    array_push($teacher_am, $teacher->id);
}
foreach ($list_teacher_vn as $teacher) {
    array_push($teacher_vn, $teacher->id);
}
$popup_vcr_detail = $CFG->wwwroot . "/local/tpebbb/manager/vcr_detail.php";
// init table column
$list_th = array('ID', get_string('created_class_table_head_level', 'local_tpebbb'), get_string('student_type', 'local_tpebbb'), get_string('created_class_table_head_time', 'local_tpebbb'), get_string('created_class_table_head_class_type', 'local_tpebbb'), get_string('created_class_table_head_teacher', 'local_tpebbb'), get_string('created_class_table_head_assistant', 'local_tpebbb'), get_string('povh', 'local_tpebbb'), get_string('created_class_table_head_total_student', 'local_tpebbb'), get_string('created_class_table_head_total_student_joined', 'local_tpebbb'), get_string('created_class_table_head_action', 'local_tpebbb'), 'STT');
$ls_class = array();
$status = array("teacher", "no_teacher", "wrong_teacher");
$room_not_teacher = 0;
$room_not_assistant = 0;
// get real running class from bbb server
$obj_bbb = new TpeBigBlueButton();
$class_data = $obj_bbb->getMeetingsWithXmlResponseArray();
$class_vcr = array();
if ($class_data['returncode'] == 'SUCCESS') {
    $class_vcr = $class_data['meetings'];
}
// merge list of class in db and from bbb server
$vcr_ids = array();
foreach ($class_info as $key => $value) {
    $vcr_ids[] = $value->bbb_id;
}
foreach ($class_vcr as $class) {
    $vcr_ids[] = $class['meetingId'];
}
// merge class info ========== giangdv Xóa đoạn code này đi vẫn chạy bình thường
// $vcr_ids = array_unique($vcr_ids);
예제 #2
0
 /**
  * Hàm xử lý dữ liệu của 1 lớp bbb
  * @global type $CFG
  * @param type $bbb_info
  * @return type
  */
 function _process_info_bbb($bbb_info)
 {
     global $CFG, $USER;
     if (count($bbb_info)) {
         $tpeBBB = new TpeBigBlueButton();
         $settings = $tpeBBB->TpeSettings;
         foreach ($bbb_info as $item) {
             $value_time_change_btn = $settings->DefaultTimeOpenBefore * 60;
             $item->time_now = time();
             $item->value_time_change_btn = $value_time_change_btn;
             /**
              * 14.10.2015
              * TungTB: Fix loai HV thai vao truoc 5 phut
              */
             if ($USER->profile["packageparent"] == 'THAI') {
                 $item->timeavailable = $item->timeavailable - 5 * 60;
             }
             /**
              * End TungTB
              */
             $item->timeavailable_late = $item->timeavailable + $value_time_change_btn;
             $item->time_countdown = intval($item->timeavailable) - time();
             $item->link_down_document = $item->class_outline != '0' ? $item->fileurl . $item->class_outline : "#";
             $item->link_down_homework = $item->outline_homework != null ? $item->fileurl . $item->outline_homework : "#";
             $item->link_down_plan = $item->lesson_plan != '0' ? $item->fileurl . $item->lesson_plan : "#";
             $item->link_video_warmup = $item->video_warmup != '0' ? $item->fileurl . $item->video_warmup : "#";
             $item->link_img = $item->background ? $item->fileurl . $item->background : $CFG->wwwroot . '/local/tpelearning/pix/no_live_session.png';
             $item->link_join_class = $tpeBBB->getLinkVcr("LMS", $item->type_class, 0, 'TechTest') . '&joinbbbid=' . $item->bbb_id;
             $item->link_join_class_povh = $tpeBBB->getLinkVcr("LMS", $item->type_class, $item->bbb_id);
             $item->link_join_class_teacher = $tpeBBB->getLinkVcr("LMS", $item->type_class, 0, 'TechTestTeacher') . '&joinbbbid=' . $item->bbb_id;
             $item->link_log = $CFG->wwwroot . '/local/tpelearning/save_log.php';
             $item->testpre_vcr = 'http://qlhl.topicanative.edu.vn/previewPI.html?subject_code=' . $item->subject_code;
             //$item->testpre_vcr = 'http://qlhl.topmito.edu.vn/previewPI.html?subject_code=20141019LSIO';
         }
     }
     return $bbb_info;
 }
예제 #3
0
    /**
     * Hiển thị giao diện các nút chức năng bổ trợ cho lớp BBB (xem hướng dẫn, các lỗi thường gặp, tải teamviwer)
     * @global type $CFG
     * @return type
     */
    function view_support_bbb()
    {
        global $CFG, $USER, $SESSION;
        $tpeBBB = new TpeBigBlueButton();
        $support_info = array('link_tech_support' => $tpeBBB->getLinkVcr("LMS", 'OTHER', 0, 'TechSupportNewbie'), 'link_faq_vcr' => $CFG->wwwroot . '/local/tpelearning/faqs_vcr.php', 'link_guide_vcr' => $CFG->wwwroot . '/local/tpelearning/guide_vcr.php', 'link_down_teamviewer' => 'http://download.teamviewer.com/download/TeamViewerQS_vi.exe');
        ob_start();
        ?>
        <ul class="action_livesession action_livesession_<?php 
        echo isset($SESSION->lang) ? $SESSION->lang : $USER->lang;
        ?>
">
            <li>
                <a href="<?php 
        echo $support_info['link_tech_support'];
        ?>
"><?php 
        echo get_string("room_tech_support", "local_tpelearning");
        ?>
</a>
            </li><li class="e_popup" href="<?php 
        echo $support_info['link_guide_vcr'];
        ?>
">
                <a>
        <?php 
        echo get_string("guide_vcr", "local_tpelearning");
        ?>
                </a>
            </li><li class="e_popup" href="<?php 
        echo $support_info['link_faq_vcr'];
        ?>
">
                <a>
        <?php 
        echo get_string("faqs_vcr", "local_tpelearning");
        ?>
                </a>
            </li><li>
                <a href="<?php 
        echo $support_info['link_down_teamviewer'];
        ?>
" target="_blank">
        <?php 
        echo get_string("down_teamviewer", "local_tpelearning");
        ?>
                </a>
            </li>
        </ul>
        <?php 
        $string = ob_get_clean();
        return $string;
    }