Plugin Directory

Changeset 2662955


Ignore:
Timestamp:
01/24/2022 09:27:06 AM (4 years ago)
Author:
BrainCert
Message:

tagging version 1.26

Location:
html5-virtual-classroom
Files:
90 added
8 edited

Legend:

Unmodified
Added
Removed
  • html5-virtual-classroom/trunk/readme.txt

    r2656587 r2662955  
    33Tags: braincert, virtual classroom, html5, webrtc, whiteboard, screen sharing, video conference, audio conference, chat, annotate, wolfram alpha, latex, conference, meeting, webinar, live class, share screen, video player, line tools, blended learning, video chat
    44Requires at least: 4.5
    5 Tested up to: 5.8.1
    6 Stable tag: 1.25
     5Tested up to: 4.9
     6Stable tag: 1.16
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    8080
    8181== Upgrade Notice ==
    82 = 1.25 =
    83 * Added DatePicker and Time picker while scheduling the live class
    84 * Added search button in the frontend
    85 * Added filter option to filter the live class with class id
    86 * Added live class description
    87 * Fixed minor design issues with the latest WordPress version 5.8.1
    88 * Fixed Fusion theme class conflicts with the launch button.
    89 * Fixed the playing issues on some of the live class recordings.
    90 * Fixed the navigation issue on the frontend
    91 
    92 = 1.24 =
     82= 1.26 =
     83* Added search and filter option in change user while scheduling the live class from the backend
     84
     85= 1.25 =
    9386* Added DatePicker and Time picker while scheduling the live class
    9487* Added search button in the frontend
  • html5-virtual-classroom/trunk/vlcr_action_task.php

    r2656587 r2662955  
    77 * @category Action task
    88 * @package  virtual-classroom
    9  * @since    1.25
     9 * @since    1.24
    1010 */
    1111
  • html5-virtual-classroom/trunk/vlcr_admin_class_function.php

    r2604584 r2662955  
    4444      global $wpdb;
    4545    $groups = $wpdb->get_results($wpdb->prepare('SELECT * FROM '.$wpdb->prefix . 'groups_group',''));
     46    return $groups;
     47
     48    }
     49     function vlcr_get_class_groups($class_id){
     50      global $wpdb;
     51    $groups = $wpdb->get_results($wpdb->prepare('SELECT * FROM '.$wpdb->prefix . 'virtualclassroom_user_assign_group WHERE class_id ="'.$class_id.'"',''));
    4652    return $groups;
    4753
     
    120126      return $result;
    121127   }
     128   function vlcr_get_class_search_teacher(){
     129        ob_clean();
     130        global $wpdb;
     131        $p_data = $_POST;
     132        $user_list = $this->vlcr_teacherlist($p_data['search_txt'],1000000,$p_data['search_type']);
     133        ?>
     134        <thead>
     135            <tr>
     136                <th>ID</th>
     137                <th>Name</th>
     138                <th>Email</th>
     139                <th>Role</th>
     140            </tr>
     141        </thead>
     142        <tfoot>   
     143            <tr>
     144                <td colspan="12">
     145                </td>
     146            </tr>
     147        </tfoot>
     148        <tbody>   
     149       <?php  $i=0;
     150         foreach ( $user_list as $user ) { $i++ ?>
     151              <tr class="row<?php echo $i % 2; ?>">
     152                  <td><input name="chooseselector" name='user_id' type='radio' value='<?php echo esc_html( $user->ID ) ?>'> </td>
     153                      <td class='name' id='name_<?php echo esc_html( $user->ID ) ?>' ><?php echo esc_html( $user->user_nicename ) ?></td>
     154                      <td class='email' id='email_<?php echo $i;?>' ><?php echo esc_html( $user->user_email ) ?><input type="hidden" id="thumb_<?php echo esc_html( $user->ID ) ?>" value="<?php echo $exist_avatar_fun==1 ? esc_url(get_avatar_url($user->ID)) : $default_path;?>" /></td>
     155                      <td><?php echo $user->is_teacher==1 ? "Teacher" : "Student"; ?></td>
     156                  </tr>
     157          <?php }
     158         ?>
     159      </tbody>
     160        <?php       
     161        exit;
     162       
     163   }
    122164    function vlcr_get_groupsdata($data){
    123165      $gid = implode(',', $data['gid']);
    124166   
    125167      global $wpdb;
     168
     169
     170      $class_id = $data['id'];
     171      $wpdb->query($wpdb->prepare("DELETE FROM ".$wpdb->prefix."virtualclassroom_user_assign_group WHERE `class_id` = '".$class_id."'",''));
     172      foreach ($data['gid'] as $key => $value) {
     173          if($value>0 && $class_id>0){
     174            $qry="INSERT INTO ".$wpdb->prefix."virtualclassroom_user_assign_group (class_id,  group_id) VALUES ('".$class_id."','".$value."')";
     175            $wpdb->query($wpdb->prepare($qry,''));
     176          }
     177      }
     178
    126179    $groups = $wpdb->get_results($wpdb->prepare('SELECT * FROM '.$wpdb->prefix . 'groups_user_group WHERE group_id IN('.$gid.')',''));
    127180   
    128181   
     182
    129183    $email=array();
    130184    foreach ($groups as $user) {
     
    240294              }
    241295}
    242 
     296 
     297      function vlcr_get_user_info($id) {
     298        global $wpdb;
     299        $row = $wpdb->get_row($wpdb->prepare('SELECT * FROM '.$wpdb->prefix . 'users WHERE ID='.$id.'',''));
     300        return $row;
     301    }
    243302    function vlcr_instructorPreview($id){
    244303
     
    471530exit;
    472531    }
    473     function vlcr_teacherlist($filter,$limit){
     532    function vlcr_teacherlist($filter,$limit,$search_type=''){
    474533        global $wpdb;
    475534
     
    480539            $start = 0;
    481540
    482         $query = "SELECT users.ID,users.user_nicename,users.user_login,users.user_email,tchr.is_teacher FROM ".$wpdb->prefix."users as users LEFT JOIN ".$wpdb->prefix."virtualclassroom_teacher as tchr ON tchr.user_id = users.id WHERE ( user_login like '%" . $filter . "%' OR user_email like '%" . $filter . "%' OR user_nicename like '%" . $filter . "%' ) GROUP BY users.id LIMIT $start, $limit";
    483 
     541        if($search_type==0 && $search_type!=""){
     542          $whr = " AND tchr.is_teacher=0";
     543        }
     544        if($search_type==1){
     545          $whr = " AND tchr.is_teacher=1";
     546        } 
     547        $query = "SELECT users.ID,users.user_nicename,users.user_login,users.user_email,tchr.is_teacher FROM ".$wpdb->prefix."users as users LEFT JOIN ".$wpdb->prefix."virtualclassroom_teacher as tchr ON tchr.user_id = users.id WHERE ( user_login like '%" . $filter . "%' OR user_email like '%" . $filter . "%' OR user_nicename like '%" . $filter . "%' ) ".$whr." GROUP BY users.id LIMIT $start, $limit";
     548        echo $whr;
    484549        $list_users  = $wpdb->get_results($query);
    485550        return $list_users;
  • html5-virtual-classroom/trunk/vlcr_attendance_report.php

    r2604584 r2662955  
    1818    return;
    1919}
     20
    2021$id=$_REQUEST['id'];
    2122$result=$vc_obj->vlcr_attendanceReport($id);
     
    2627?>
    2728<div class="wrap">
    28     <div class="panel-heading"><h3 class="panel-title">Class Attendees</h3>
    29        
    30     </div>
    31 <?php   if($result['Report']){
    32     echo '<div class="update-nag">'.$result['Report'].'</div>';
    33     return;
     29  <div class="panel-heading"><h3 class="panel-title">Class Attendees</h3>
     30   
     31  </div>
     32<?php if($result['Report']){
     33  echo '<div class="update-nag">'.$result['Report'].'</div>';
     34  return;
    3435}
    3536if(isset($result['status']) && $result['status']=='error'){
     
    5051<?php }?>
    5152<table class="wp-list-table widefat striped">
    52     <thead>
    53         <tr class="filters">
    54         <th style="width: 2%">ID</th>
    55             <th style="width: 20%">Name</th>
    56             <th style="width: 18%">Duration</th>
    57             <th style="width: 15%">Time in</th>
    58             <th style="width: 15%">Time out</th>
    59             <th style="width: 15%">Attendence</th>
    60         </tr>
    61     </thead>
     53  <thead>
     54    <tr class="filters">
     55    <th style="width: 2%">ID</th>
     56      <th style="width: 20%">Name</th>
     57      <th style="width: 18%">Duration</th>
     58      <th style="width: 15%">Time in</th>
     59      <th style="width: 15%">Time out</th>
     60      <th style="width: 15%">Attendence</th>
     61    </tr>
     62  </thead>
    6263 <tbody>
    6364 <?php
     
    6566 $grapharray_teacher = array();
    6667 foreach($result as $data){
    67     if($data['userId'] !=0){
    68     $user = get_userdata($data['userId']);
    69  }
     68  $user_info="";
     69  if($data['userId'] !=0){
     70    $user_info = $vc_obj->vlcr_get_user_info($data['userId']);
     71    $grapharray_teacher[$i]['email']= $user_info->user_email;
     72  }
    7073  $spent_time = strtotime($data['duration']) - strtotime('TODAY');
    71   $grapharray_teacher[$i]->spent_time= intval($spent_time / 60);
    72   $grapharray_teacher[$i]->email= $user->data->user_email;
    73     //echo "<pre>";print_r($user->data);echo "</pre>"; ?>
    74    
     74  $grapharray_teacher[$i]['spent_time']= intval($spent_time / 60);
     75  ?>
     76 
    7577 <tr>
    76     <td width="5%"><b><?php echo $i;?></b></td>
    77     <td>
    78     <?php if($data['userId'] !=0){ ?>
    79     <b><?php echo $user->data->user_nicename;?></b><br><span style="font-size: 12px;">(<?php echo $user->data->user_email;?>)</span> <?php } ?></td>
    80     <td><?php echo $data['duration']."(".$data['percentage'].")";?> </td>
    81     <td style="font-size: 13px;">
    82         <?php
    83         $spent_time='';
    84         foreach ($data['session'] as $time) {
     78  <td width="5%"><b><?php echo $i;?></b></td>
     79  <td>
     80  <?php if($data['userId']!=0){ ?>
     81  <b><?php echo $user_info->display_name;?></b><br><span style="font-size: 12px;">(<?php echo $user_info->user_email;?>)</span> <?php } ?></td>
     82  <td><?php echo $data['duration']."(".$data['percentage'].")";?> </td>
     83  <td style="font-size: 13px;">
     84    <?php foreach ($data['session'] as $time) {?>
     85        <i class="icon icon-calendar"></i>  <?php echo $time['time_in'];?><br>
     86    <?php } ?>
     87  </td>
    8588
    86          $start_time_str = strtotime(str_replace('&nbsp;', ' ', $time['time_in']));
    87          $end_time_str = strtotime(str_replace('&nbsp;', ' ', $time['time_out']));
    88 
    89           $start_time .= '<i class="fa fa-calendar"></i> '.date('M j, Y',$start_time_str).'&nbsp;<br><i class="fa fa-clock-o"></i> '.date('h:i:s A',$start_time_str).'<br>';
    90 
    91           $end_time .= '<i class="fa fa-calendar"></i> '.date('M j, Y',$end_time_str).'&nbsp;<br><i class="fa fa-clock-o"></i> '.date('h:i:s A',$end_time_str).'<br>';
    92 
    93           $differenceInSeconds = $end_time_str - $start_time_str;
    94 
    95           $spent_time = $spent_time + $differenceInSeconds;
    96            
    97        
    98 
    99           ?>
    100                 <i class="icon icon-calendar"></i>  <?php echo $time['time_in'];?><br>
    101         <?php } ?>
    102     </td>
    103 
    104     <td style="font-size: 13px;">
    105         <?php foreach ($data['session'] as $time) { ?>
    106                 <i class="icon icon-calendar"></i>  <?php echo $time['time_out'];?><br>
    107         <?php } ?>
    108     </td>
    109        
    110     <td><span class="label label-success"><i class="fa fa-ok"></i> <?php echo $data['attendance'];?></span></td>
     89  <td style="font-size: 13px;">
     90    <?php foreach ($data['session'] as $time) { ?>
     91        <i class="icon icon-calendar"></i>  <?php echo $time['time_out'];?><br>
     92    <?php } ?>
     93  </td>
     94   
     95  <td><span class="label label-success"><i class="fa fa-ok"></i> <?php echo $data['attendance'];?></span></td>
    11196 </tr>
    11297 <?php $i++; } ?>
     
    132117var ctx = document.getElementById("myChart").getContext('2d');
    133118var barChartData = {
    134             labels: [<?php for ($i = 1; $i < $count; $i++) {?>'<?php echo $i*5;?>-<?php echo $i*5+5;?>'<?php if($i!=$count){ ?>,<?php }} ?>],
     119            labels: [<?php for ($i = 0; $i <= $count; $i++) {?>'<?php echo $i*5;?>-<?php echo $i*5+5;?>'<?php if($i!=$count){ ?>,<?php }} ?>],
    135120            datasets: [
    136121
     
    138123            $m=0;
    139124             foreach ($grapharray_teacher as $key => $value){
    140               $spenttime = floor($value->spent_time / 5);
     125              $spenttime = floor($value['spent_time'] / 5);
    141126              ?>
    142127            {
    143                 label: "<?php echo $value->email;?>",
     128                label: "<?php echo $value['email'];?>",
    144129                backgroundColor: '<?php echo $color_array[$key]?>',
    145130                borderColor: '<?php echo $color_array[$key]?>',
    146131                borderWidth: 1,
    147132                data: [
    148                     <?php for ($i = 1; $i < $count; $i++){?><?php echo ($i==$spenttime) ? $value->spent_time : '""';?><?php if($i!=$count){?>,<?php }?><?php } ?>
     133                    <?php for ($i = 0; $i <= $count; $i++){?><?php echo ($i==$spenttime) ? $value['spent_time'] : '""';?><?php if($i!=$count){?>,<?php }?><?php } ?>
    149134                ]
    150135            },
     
    178163</script>
    179164
    180    
     165 
  • html5-virtual-classroom/trunk/vlcr_class_listing_edit.php

    r2604584 r2662955  
    2727$plan = (object)$vc_obj->vlcr_getplan();
    2828$getservers = $vc_obj->vlcr_getservers();
    29 $instructor_list = get_users();
     29$instructor_list = $vc_obj->vlcr_teacherlist($filter,1000000);
    3030$timezoneList = (object)$vc_obj->vlcr_timezoneList();
    31 
     31if($_REQUEST['task']=="search_teacher"){
     32    $vc_obj->vlcr_get_class_search_teacher();
     33}
    3234
    3335$cid = '';
     
    4951}
    5052$default_path = "http://0.gravatar.com/avatar/ad516503a11cd5ca435acc9bb6523536";
     53
     54$submenu_base_url = get_permalink($post->ID).'&type=classList';
     55if(strpos(get_permalink($post->ID),'?')===false){
     56    $submenu_base_url = get_permalink($post->ID).'?&type=classList';
     57}
    5158 ?>
    5259<h3>Schedule</h3>
     
    351358                    <?php wp_editor( $description, "description"); ?>
    352359            </div>
    353         </div>   
     360        </div>
     361
    354362        <div class="control-group">
    355363            <label class="span1 hasTip" title="Record Class">Classroom type:</label>
     
    441449        <input type="hidden"  id="cid" name="cid" value="<?php echo $cid?>"/>
    442450        <input type="hidden" name="task" value="saveClass" />
    443         <input type="submit" class="button button-primary button-large" name="apply-submit" value="Save" />
     451        <input type="submit" class="button button-primary button-large" id="submit_btn" name="apply-submit" value="Save" />
     452        <input type="submit" class="button button-primary button-large" id="submit_btn_disable" style="display: none;"  value="Save" disabled/>
    444453        </div>
    445454
    446455
    447456    </form>
     457
    448458<script type="text/javascript">
    449459
     
    458468    jQuery(document).ready(function(){
    459469
    460         jQuery("#myTags").tagit({
    461             singleField: true,
    462             singleFieldNode: jQuery('#keyword')
    463         });
     470       
    464471
    465472        jQuery('#btnselectuser').on("click", function() { 
     
    513520        <div class="modal-content" style="overflow: hidden;width: 60%;">
    514521        <span style="font-size: 16px;"><b>Class instructor</b></span>
     522            <input type="text" placeholder="Search..." name="search" id="search" value="<?php echo isset($_REQUEST['search']) ? $_REQUEST['search'] : '';?>" class="text_area" title="Filter by Title">
     523            <input type="button" name="go_search" id="go_search" class="button button-primary" value="Go" />
     524            <label style="margin: 0 10px 0 20px;cursor: text;">User type : </label>
     525            <select style="width:100px;" id="search_type" name="search_type">
     526              <option value="">-- select --</option>
     527              <option value="1">Teacher</option>
     528              <option value="0">Student</option>
     529            </select>
     530
     531           
    515532        <span class="close">&times;</span>
    516         <table class="wp-list-table widefat striped" style="margin-top:15px;margin-bottom: 15px; ">
     533        <table class="wp-list-table widefat striped" id="instructor_table" style="margin-top:15px;margin-bottom: 15px; ">
    517534        <thead>
    518535            <tr>
     
    520537                <th>Name</th>
    521538                <th>Email</th>
     539                <th>Role</th>
    522540            </tr>
    523541        </thead>
     
    533551            <tr class="row<?php echo $i % 2; ?>">
    534552                <td><input name="chooseselector" name='user_id' type='radio' value='<?php echo esc_html( $user->ID ) ?>'> </td>
    535                     <td class='name' id='name_<?php echo esc_html( $user->ID ) ?>' ><?php echo esc_html( $user->display_name ) ?></td>
     553                    <td class='name' id='name_<?php echo esc_html( $user->ID ) ?>' ><?php echo esc_html( $user->user_nicename ) ?></td>
    536554                    <td class='email' id='email_<?php echo $i;?>' ><?php echo esc_html( $user->user_email ) ?><input type="hidden" id="thumb_<?php echo esc_html( $user->ID ) ?>" value="<?php echo $exist_avatar_fun==1 ? esc_url(get_avatar_url($user->ID)) : $default_path;?>" /></td>
     555                    <td><?php echo $user->is_teacher==1 ? "Teacher" : "Student"; ?></td>
    537556                </tr>
    538557        <?php }
     
    546565        </div>
    547566</div>
     567<script type="text/javascript">
     568    function search_by_type_keyword(){
     569        var search_txt = jQuery("#search").val();
     570        var search_type = jQuery("#search_type").val();
     571        jQuery.ajax({
     572            url: "admin.php?page=<?php echo VC_FOLDER;?>/vlcr_setup.php/ClassList&action=search_teacher",
     573            type: "POST",
     574            data: {search_txt: search_txt,search_type: search_type},
     575            success: function(res_response) {
     576                jQuery("#instructor_table").html(res_response);
     577            }
     578        });
     579    }
     580  jQuery(document).ready(function(){ 
     581    jQuery("body").on('click',"#go_search",   function() {
     582        search_by_type_keyword();
     583     });
     584    jQuery("body").on('change',"#search_type",   function() {
     585         search_by_type_keyword();
     586    });
     587    jQuery("#submit_btn").click(function () {
     588        jQuery("#submit_btn_disable").show();
     589        jQuery("#submit_btn").hide();
     590    });
     591    jQuery("#myTags").tagit({
     592            singleField: true,
     593            singleFieldNode: jQuery('#keyword')
     594        });
     595  });
     596</script>
  • html5-virtual-classroom/trunk/vlcr_invite_user_group.php

    r2604584 r2662955  
    3232$users= get_users();
    3333if (isset($_POST['invitegroup'])){
    34    
    35     $data =$_POST;
     34 
     35  $data =$_POST;
    3636  $result=$vc_obj->vlcr_get_groupsdata($data);
    3737}
    3838$groups=$vc_obj->vlcr_get_usergroups();
    39 
    40 
    41 
     39$assigned_groups=$vc_obj->vlcr_get_class_groups($id);
     40$selcted_grps=array();
     41foreach ($assigned_groups as $key => $assigned_grp) {
     42  if($assigned_grp->group_id>0){
     43    $selcted_grps[] = $assigned_grp->group_id;
     44  }
     45}
    4246echo "<h1>Invite users of selected groups</h1>";
    4347
     
    4650   <table class="wp-list-table widefat striped">
    4751   <tr>
    48        <th>#</th>
    49        <th>Name</th>
    50        
     52     <th>#</th>
     53     <th>Name</th>
     54     
    5155   </tr>
    5256      <?php foreach($groups as $group){
     
    5660      <tr>
    5761         <td>
    58             <input type='checkbox' name='gid[]' value='<?php echo $group->group_id;?>' />
     62            <input type='checkbox' name='gid[]' value='<?php echo $group->group_id;?>' <?php echo  in_array($group->group_id, $selcted_grps) ? "checked" : ""; ?>/>
    5963         </td>
    6064     
     
    6771      <?php } ?>
    6872      <tr>
    69         <td colspan="2">
     73        <td colspan="2">
    7074        <input type="hidden" name="id" value="<?php echo $_REQUEST['id'];?>">
    71             <input id="save" type="submit" class="button button-primary" value="Save Changes" name="invitegroup"></td></tr>
     75          <input id="save" type="submit" class="button button-primary" value="Save Changes" name="invitegroup"></td></tr>
    7276   </table>
    7377</form>
  • html5-virtual-classroom/trunk/vlcr_setup.php

    r2604584 r2662955  
    614614        }
    615615                ?>
    616 
     616<style type="text/css">
     617.components-notice.is-error.is-dismissible { display: none;}
     618</style>
    617619<div id="modal-content-cancelclass" class="modal">
    618620    <div class="modal-content" style="overflow: hidden;padding: 0;">
     
    676678                       
    677679                    if(is_plugin_active('groups/groups.php' ) && !current_user_can( 'manage_options' ) && !$isteacher && $m==0){
    678 
    679                         if (is_array($allowClass_list) && !in_array($item['id'], $allowClass_list)){continue;}
     680                        if ( (is_array($allowClass_list) && !in_array($item['id'], $allowClass_list)) || empty($allowClass_list)){continue;}
    680681                    }   
    681682                   
    682                      
     683                    if($isteacher && $is_super_admin==0){
     684                        if($current_user->ID!=$item['instructor_id']){
     685                            continue;   
     686                        }
     687                    }
     688
    683689                    $query = "SELECT is_teacher FROM ".$wpdb->prefix."virtualclassroom_teacher WHERE user_id='".$current_user->ID."'";
    684690                    $is_tchr  = $wpdb->get_var($wpdb->prepare($query,''));
     
    991997            $_REQUEST['task'] = 'deleteClass';
    992998            include 'vlcr_classlist_admin.php';
     999            break;
     1000        case 'search_teacher':
     1001            $vc_obj->vlcr_get_class_search_teacher();
    9931002            break;
    9941003        default:
  • html5-virtual-classroom/trunk/vlcr_site_class_detail.php

    r2604584 r2662955  
    671671        $has_access=1;
    672672    }
    673     //$item['record'] == 1 && ($this -> isSharedUser ||  $this->enrolled || $this->class['user_id'] == $user->id)
     673   
    674674    if($item['record'] != 0 && $has_access==1){?>
    675675    <br>
Note: See TracChangeset for help on using the changeset viewer.