Changeset 3284398
- Timestamp:
- 04/29/2025 09:27:00 PM (11 months ago)
- Location:
- video-conferencing-with-bbb/trunk
- Files:
-
- 3 edited
-
README.md (modified) (2 diffs)
-
public/helpers/class-bigbluebutton-tokens-helper.php (modified) (5 diffs)
-
video-conferencing-with-bbb.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
video-conferencing-with-bbb/trunk/README.md
r3259705 r3284398 5 5 Tags: virtual classroom, video conference, BigBlueButton, BBB, online meeting, web conferencing, online teaching, learning management system, LMS, online session, live training, video conferencing, video conference, meetings, virtual meetings 6 6 Requires at least: 5.1 7 Tested up to: 6. 7.27 Tested up to: 6.8 8 8 Requires PHP: 7.2 9 Stable tag: 2. 4.39 Stable tag: 2.5.0 10 10 License: GPLv2 or later 11 11 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 175 175 176 176 ## Changelog ## 177 ### 2.5.0 ### 178 * Added: Allow LearnDash Instructors and Group Leaders to embed room shortcode 179 177 180 ### 2.4.3 ### 178 181 * Fixed: Access code not updates are not applied for the room -
video-conferencing-with-bbb/trunk/public/helpers/class-bigbluebutton-tokens-helper.php
r2849433 r3284398 44 44 } 45 45 $tokens_string .= $param; 46 } else { 47 if ( 'token' == substr( $param, 0, 5 ) ) { 46 } elseif ( 'token' == substr( $param, 0, 5 ) ) { 48 47 $param = substr( $param, 5 ); 49 48 $tokens_string .= ',' . $param; 50 }51 49 } 52 50 } … … 156 154 157 155 /** 156 * Check if the current user has any of the allowed roles. 157 * 158 * @param array $allowed_roles Array of allowed user role slugs. 159 * @return bool True if user has any allowed role, false otherwise. 160 */ 161 public static function is_current_user_in_allowed_roles( $author ) { 162 163 $allowed_roles = array( 'administrator', 'bbb-moderator', 'ld-instructor', 'wdm_instructor', 'group_leader' ); 164 165 $current_user = get_user( $author ); 166 167 if ( empty( $current_user->roles ) || empty( $allowed_roles ) ) { 168 return false; 169 } 170 171 return (bool) array_intersect( $allowed_roles, (array) $current_user->roles ); 172 } 173 174 /** 158 175 * Get room from token. 159 176 * … … 166 183 */ 167 184 public static function find_room_id_by_token( $token, $author ) { 168 // Only show room if author can create rooms. 169 if ( ! user_can( $author, 'edit_bbb_rooms' ) ) { 185 $in_allowed_roles = self::is_current_user_in_allowed_roles( $author ); 186 187 // Only show room if author or roles satisfy create room cap. 188 if ( ! $in_allowed_roles && ! user_can( $author, 'edit_bbb_rooms' ) ) { 170 189 self::$error_message = esc_html__( 'This user does not have permission to display any rooms in a shortcode or widget.', 'bigbluebutton' ); 171 190 return 0; … … 209 228 * @since 3.0.0 210 229 * 211 * @param String $token String value of the token.230 * @param String $token String value of the token. 212 231 * @param Integer $author Author writing the content using this shortcode. 213 232 * @return Integer $room_id Room ID associated with the token. … … 232 251 * @since 3.0.0 233 252 * 234 * @param String $token String value of the token.253 * @param String $token String value of the token. 235 254 * @param Integer $author Author writing the content using this shortcode. 236 255 * @return Integer $room_id Room ID associated with the token. -
video-conferencing-with-bbb/trunk/video-conferencing-with-bbb.php
r3259705 r3284398 16 16 * Plugin URI: https://wordpress.org/plugins/video-conferencing-with-bbb 17 17 * Description: This plugin allows teachers to manage their virtual classrooms right from WordPress using BigBlueButton 18 * Version: 2. 4.318 * Version: 2.5.0 19 19 * Author: eLearning evolve <info@elearningevolve.com> 20 20 * Author URI: https://elearningevolve.com/ … … 24 24 * Domain Path: /languages 25 25 */ 26 $plugin_version = '2. 4.3';26 $plugin_version = '2.5.0'; 27 27 $plugin_name = 'Virtual Classroom & Video Conferencing - BigBlueButton'; 28 28
Note: See TracChangeset
for help on using the changeset viewer.