Changeset 2662955
- Timestamp:
- 01/24/2022 09:27:06 AM (4 years ago)
- Location:
- html5-virtual-classroom
- Files:
-
- 90 added
- 8 edited
-
tags/1.26 (added)
-
tags/1.26/css (added)
-
tags/1.26/css/font-awesome.min.css (added)
-
tags/1.26/css/jquery.tagit.css (added)
-
tags/1.26/css/jquery.timepicker.css (added)
-
tags/1.26/css/vlcr-calendar.css (added)
-
tags/1.26/css/vlcr_style.css (added)
-
tags/1.26/css/vlcr_video-js.css (added)
-
tags/1.26/font (added)
-
tags/1.26/font/FontAwesome.otf (added)
-
tags/1.26/font/fontawesome-webfont.eot (added)
-
tags/1.26/font/fontawesome-webfont.svg (added)
-
tags/1.26/font/fontawesome-webfont.ttf (added)
-
tags/1.26/font/fontawesome-webfont.ttf_v=3.2.1 (added)
-
tags/1.26/font/fontawesome-webfont.woff (added)
-
tags/1.26/font/index.html (added)
-
tags/1.26/images (added)
-
tags/1.26/images/38ntfuDc_400x400.png (added)
-
tags/1.26/images/Price_list_money.png (added)
-
tags/1.26/images/Website_lock.png (added)
-
tags/1.26/images/badges.png (added)
-
tags/1.26/images/bag.png (added)
-
tags/1.26/images/basic1-072_tag_discount_sale-48.png (added)
-
tags/1.26/images/camcorder_camcoder_camera-48.png (added)
-
tags/1.26/images/class_list.png (added)
-
tags/1.26/images/coupon-24.png (added)
-
tags/1.26/images/download-24.png (added)
-
tags/1.26/images/grey_new_seo3-08-48.png (added)
-
tags/1.26/images/icon-48-acylist.png (added)
-
tags/1.26/images/icon-48-campaign.png (added)
-
tags/1.26/images/icon-48-user.png (added)
-
tags/1.26/images/icon-conf.png (added)
-
tags/1.26/images/icon-coupons.png (added)
-
tags/1.26/images/icon-media-web-player.png (added)
-
tags/1.26/images/icon-shopping-cart.png (added)
-
tags/1.26/images/index.html (added)
-
tags/1.26/images/integrations.png (added)
-
tags/1.26/images/l_com_myevent.png (added)
-
tags/1.26/images/l_events.png (added)
-
tags/1.26/images/layout_add.png (added)
-
tags/1.26/images/logo.png (added)
-
tags/1.26/images/logo_bc.png (added)
-
tags/1.26/images/payments.png (added)
-
tags/1.26/images/publish_x.png (added)
-
tags/1.26/images/question-type-one-correct1.png (added)
-
tags/1.26/images/recording.png (added)
-
tags/1.26/images/s_com_myevent.png (added)
-
tags/1.26/images/s_com_virtualclassroom.png (added)
-
tags/1.26/images/s_events.png (added)
-
tags/1.26/images/secured-by-paypal.jpg (added)
-
tags/1.26/images/tick.png (added)
-
tags/1.26/images/ui-icons_222222_256x240.png (added)
-
tags/1.26/images/users.png (added)
-
tags/1.26/js (added)
-
tags/1.26/js/jquery.timepicker.js (added)
-
tags/1.26/js/tag-it.js (added)
-
tags/1.26/js/vlcr.chart.bundle.js (added)
-
tags/1.26/js/vlcr_countdown.js (added)
-
tags/1.26/js/vlcr_script.js (added)
-
tags/1.26/js/vlcr_video.js (added)
-
tags/1.26/readme.txt (added)
-
tags/1.26/vlcr_action_task.php (added)
-
tags/1.26/vlcr_admin.php (added)
-
tags/1.26/vlcr_admin_class_function.php (added)
-
tags/1.26/vlcr_attendance_report.php (added)
-
tags/1.26/vlcr_class_listing_edit.php (added)
-
tags/1.26/vlcr_class_schedule.php (added)
-
tags/1.26/vlcr_classlist_admin.php (added)
-
tags/1.26/vlcr_discount_edit_front.php (added)
-
tags/1.26/vlcr_discount_listing_edit.php (added)
-
tags/1.26/vlcr_discountlist_admin.php (added)
-
tags/1.26/vlcr_discountlist_front.php (added)
-
tags/1.26/vlcr_email_template.php (added)
-
tags/1.26/vlcr_instructor_preview.php (added)
-
tags/1.26/vlcr_invite_by_email.php (added)
-
tags/1.26/vlcr_invite_user.php (added)
-
tags/1.26/vlcr_invite_user_group.php (added)
-
tags/1.26/vlcr_learner_preview.php (added)
-
tags/1.26/vlcr_paymentlist_admin.php (added)
-
tags/1.26/vlcr_price_edit_front.php (added)
-
tags/1.26/vlcr_price_listing_edit.php (added)
-
tags/1.26/vlcr_pricelist_admin.php (added)
-
tags/1.26/vlcr_pricelist_front.php (added)
-
tags/1.26/vlcr_recordinglist_admin.php (added)
-
tags/1.26/vlcr_recordinglist_front.php (added)
-
tags/1.26/vlcr_setup.php (added)
-
tags/1.26/vlcr_site_class_detail.php (added)
-
tags/1.26/vlcr_teacherlist_admin.php (added)
-
tags/1.26/vlcr_user_group_capabilities.php (added)
-
tags/1.26/vlcr_view_recording_admin.php (added)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/vlcr_action_task.php (modified) (1 diff)
-
trunk/vlcr_admin_class_function.php (modified) (5 diffs)
-
trunk/vlcr_attendance_report.php (modified) (7 diffs)
-
trunk/vlcr_class_listing_edit.php (modified) (9 diffs)
-
trunk/vlcr_invite_user_group.php (modified) (4 diffs)
-
trunk/vlcr_setup.php (modified) (3 diffs)
-
trunk/vlcr_site_class_detail.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
html5-virtual-classroom/trunk/readme.txt
r2656587 r2662955 3 3 Tags: 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 4 4 Requires at least: 4.5 5 Tested up to: 5.8.16 Stable tag: 1. 255 Tested up to: 4.9 6 Stable tag: 1.16 7 7 License: GPLv2 or later 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 80 80 81 81 == 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 = 93 86 * Added DatePicker and Time picker while scheduling the live class 94 87 * Added search button in the frontend -
html5-virtual-classroom/trunk/vlcr_action_task.php
r2656587 r2662955 7 7 * @category Action task 8 8 * @package virtual-classroom 9 * @since 1.2 59 * @since 1.24 10 10 */ 11 11 -
html5-virtual-classroom/trunk/vlcr_admin_class_function.php
r2604584 r2662955 44 44 global $wpdb; 45 45 $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.'"','')); 46 52 return $groups; 47 53 … … 120 126 return $result; 121 127 } 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 } 122 164 function vlcr_get_groupsdata($data){ 123 165 $gid = implode(',', $data['gid']); 124 166 125 167 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 126 179 $groups = $wpdb->get_results($wpdb->prepare('SELECT * FROM '.$wpdb->prefix . 'groups_user_group WHERE group_id IN('.$gid.')','')); 127 180 128 181 182 129 183 $email=array(); 130 184 foreach ($groups as $user) { … … 240 294 } 241 295 } 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 } 243 302 function vlcr_instructorPreview($id){ 244 303 … … 471 530 exit; 472 531 } 473 function vlcr_teacherlist($filter,$limit ){532 function vlcr_teacherlist($filter,$limit,$search_type=''){ 474 533 global $wpdb; 475 534 … … 480 539 $start = 0; 481 540 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; 484 549 $list_users = $wpdb->get_results($query); 485 550 return $list_users; -
html5-virtual-classroom/trunk/vlcr_attendance_report.php
r2604584 r2662955 18 18 return; 19 19 } 20 20 21 $id=$_REQUEST['id']; 21 22 $result=$vc_obj->vlcr_attendanceReport($id); … … 26 27 ?> 27 28 <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; 34 35 } 35 36 if(isset($result['status']) && $result['status']=='error'){ … … 50 51 <?php }?> 51 52 <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> 62 63 <tbody> 63 64 <?php … … 65 66 $grapharray_teacher = array(); 66 67 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 } 70 73 $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 75 77 <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> 85 88 86 $start_time_str = strtotime(str_replace(' ', ' ', $time['time_in'])); 87 $end_time_str = strtotime(str_replace(' ', ' ', $time['time_out'])); 88 89 $start_time .= '<i class="fa fa-calendar"></i> '.date('M j, Y',$start_time_str).' <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).' <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> 111 96 </tr> 112 97 <?php $i++; } ?> … … 132 117 var ctx = document.getElementById("myChart").getContext('2d'); 133 118 var 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 }} ?>], 135 120 datasets: [ 136 121 … … 138 123 $m=0; 139 124 foreach ($grapharray_teacher as $key => $value){ 140 $spenttime = floor($value ->spent_time/ 5);125 $spenttime = floor($value['spent_time'] / 5); 141 126 ?> 142 127 { 143 label: "<?php echo $value ->email;?>",128 label: "<?php echo $value['email'];?>", 144 129 backgroundColor: '<?php echo $color_array[$key]?>', 145 130 borderColor: '<?php echo $color_array[$key]?>', 146 131 borderWidth: 1, 147 132 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 } ?> 149 134 ] 150 135 }, … … 178 163 </script> 179 164 180 165 -
html5-virtual-classroom/trunk/vlcr_class_listing_edit.php
r2604584 r2662955 27 27 $plan = (object)$vc_obj->vlcr_getplan(); 28 28 $getservers = $vc_obj->vlcr_getservers(); 29 $instructor_list = get_users();29 $instructor_list = $vc_obj->vlcr_teacherlist($filter,1000000); 30 30 $timezoneList = (object)$vc_obj->vlcr_timezoneList(); 31 31 if($_REQUEST['task']=="search_teacher"){ 32 $vc_obj->vlcr_get_class_search_teacher(); 33 } 32 34 33 35 $cid = ''; … … 49 51 } 50 52 $default_path = "http://0.gravatar.com/avatar/ad516503a11cd5ca435acc9bb6523536"; 53 54 $submenu_base_url = get_permalink($post->ID).'&type=classList'; 55 if(strpos(get_permalink($post->ID),'?')===false){ 56 $submenu_base_url = get_permalink($post->ID).'?&type=classList'; 57 } 51 58 ?> 52 59 <h3>Schedule</h3> … … 351 358 <?php wp_editor( $description, "description"); ?> 352 359 </div> 353 </div> 360 </div> 361 354 362 <div class="control-group"> 355 363 <label class="span1 hasTip" title="Record Class">Classroom type:</label> … … 441 449 <input type="hidden" id="cid" name="cid" value="<?php echo $cid?>"/> 442 450 <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/> 444 453 </div> 445 454 446 455 447 456 </form> 457 448 458 <script type="text/javascript"> 449 459 … … 458 468 jQuery(document).ready(function(){ 459 469 460 jQuery("#myTags").tagit({ 461 singleField: true, 462 singleFieldNode: jQuery('#keyword') 463 }); 470 464 471 465 472 jQuery('#btnselectuser').on("click", function() { … … 513 520 <div class="modal-content" style="overflow: hidden;width: 60%;"> 514 521 <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 515 532 <span class="close">×</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; "> 517 534 <thead> 518 535 <tr> … … 520 537 <th>Name</th> 521 538 <th>Email</th> 539 <th>Role</th> 522 540 </tr> 523 541 </thead> … … 533 551 <tr class="row<?php echo $i % 2; ?>"> 534 552 <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> 536 554 <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> 537 556 </tr> 538 557 <?php } … … 546 565 </div> 547 566 </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 32 32 $users= get_users(); 33 33 if (isset($_POST['invitegroup'])){ 34 35 $data =$_POST;34 35 $data =$_POST; 36 36 $result=$vc_obj->vlcr_get_groupsdata($data); 37 37 } 38 38 $groups=$vc_obj->vlcr_get_usergroups(); 39 40 41 39 $assigned_groups=$vc_obj->vlcr_get_class_groups($id); 40 $selcted_grps=array(); 41 foreach ($assigned_groups as $key => $assigned_grp) { 42 if($assigned_grp->group_id>0){ 43 $selcted_grps[] = $assigned_grp->group_id; 44 } 45 } 42 46 echo "<h1>Invite users of selected groups</h1>"; 43 47 … … 46 50 <table class="wp-list-table widefat striped"> 47 51 <tr> 48 <th>#</th>49 <th>Name</th>50 52 <th>#</th> 53 <th>Name</th> 54 51 55 </tr> 52 56 <?php foreach($groups as $group){ … … 56 60 <tr> 57 61 <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" : ""; ?>/> 59 63 </td> 60 64 … … 67 71 <?php } ?> 68 72 <tr> 69 <td colspan="2">73 <td colspan="2"> 70 74 <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> 72 76 </table> 73 77 </form> -
html5-virtual-classroom/trunk/vlcr_setup.php
r2604584 r2662955 614 614 } 615 615 ?> 616 616 <style type="text/css"> 617 .components-notice.is-error.is-dismissible { display: none;} 618 </style> 617 619 <div id="modal-content-cancelclass" class="modal"> 618 620 <div class="modal-content" style="overflow: hidden;padding: 0;"> … … 676 678 677 679 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;} 680 681 } 681 682 682 683 if($isteacher && $is_super_admin==0){ 684 if($current_user->ID!=$item['instructor_id']){ 685 continue; 686 } 687 } 688 683 689 $query = "SELECT is_teacher FROM ".$wpdb->prefix."virtualclassroom_teacher WHERE user_id='".$current_user->ID."'"; 684 690 $is_tchr = $wpdb->get_var($wpdb->prepare($query,'')); … … 991 997 $_REQUEST['task'] = 'deleteClass'; 992 998 include 'vlcr_classlist_admin.php'; 999 break; 1000 case 'search_teacher': 1001 $vc_obj->vlcr_get_class_search_teacher(); 993 1002 break; 994 1003 default: -
html5-virtual-classroom/trunk/vlcr_site_class_detail.php
r2604584 r2662955 671 671 $has_access=1; 672 672 } 673 //$item['record'] == 1 && ($this -> isSharedUser || $this->enrolled || $this->class['user_id'] == $user->id)673 674 674 if($item['record'] != 0 && $has_access==1){?> 675 675 <br>
Note: See TracChangeset
for help on using the changeset viewer.