Skip to content

Commit 1035c2c

Browse files
authored
Merge pull request #17 from cmu-sei/player-bug
Player bug
2 parents d5a3445 + f238626 commit 1035c2c

File tree

2 files changed

+18
-13
lines changed

2 files changed

+18
-13
lines changed

block_crucible.php

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -152,11 +152,16 @@ public function get_content() {
152152
////////////////////PLAYER/////////////////////////////
153153
$playerurl = get_config('block_crucible', 'playerappurl');
154154

155+
$permsplayer = null;
156+
$showplayer = null;
155157
$views = null;
158+
156159
if ($playerurl) {
157-
$views = $crucible->get_player_views();
160+
$permsplayer = $crucible->get_player_permissions();
161+
$showplayer = get_config('block_crucible', 'showplayer');
158162
}
159-
if ($views) {
163+
164+
if ($permsplayer || $showplayer) {
160165
$data->player = $playerurl;
161166
$data->playerDescription = get_string('playerdescription', 'block_crucible');
162167
$data->playerLogo = $OUTPUT->image_url('crucible-icon-player', 'block_crucible');
@@ -166,21 +171,21 @@ public function get_content() {
166171
debugging("Player not configured. Configure plugin settings to enable this application.", DEBUG_DEVELOPER);
167172
}
168173

169-
$permsplayer = null;
170-
$showplayer = null;
174+
////////////////////ALLOY/////////////////////////////
175+
$alloyurl = get_config('block_crucible', 'playerappurl');
171176

172-
if ($playerurl) {
173-
$permsplayer = $crucible->get_player_permissions();
174-
$showplayer = get_config('block_crucible', 'showplayer');
177+
$showalloy = null;
178+
179+
if ($alloyurl) {
180+
$showalloy = get_config('block_crucible', 'showalloy');
175181
}
176-
if ($permsplayer || $showplayer) {
182+
183+
if ($permsplayer || $showalloy) {
177184
$data->alloy = get_config('block_crucible', 'alloyappurl');
178185
$data->alloyDescription = get_string('alloydescription', 'block_crucible');
179186
$data->alloyLogo = $OUTPUT->image_url('crucible-icon-alloy', 'block_crucible');
180-
} else if ($views == 0 && $views != null) {
181-
debugging("No permissions found on Player for User: " . $userid, DEBUG_DEVELOPER);
182-
} else if ($views == null) {
183-
debugging("Player not configured. Configure plugin settings to enable this application.", DEBUG_DEVELOPER);
187+
} else if ($permsplayer == 0 && $permsplayer != null) {
188+
debugging("No permissions found on Alloy for User: " . $userid, DEBUG_DEVELOPER);
184189
}
185190

186191
////////////////////BLUEPRINT/////////////////////////////

version.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242

4343
defined('MOODLE_INTERNAL') || die;
4444

45-
$plugin->version = 2025052102;
45+
$plugin->version = 2025061200;
4646
$plugin->requires = 2021051100;
4747
$plugin->component = 'block_crucible';
4848
$plugin->maturity = MATURITY_ALPHA;

0 commit comments

Comments
 (0)