@@ -152,11 +152,16 @@ public function get_content() {
152
152
////////////////////PLAYER/////////////////////////////
153
153
$ playerurl = get_config ('block_crucible ' , 'playerappurl ' );
154
154
155
+ $ permsplayer = null ;
156
+ $ showplayer = null ;
155
157
$ views = null ;
158
+
156
159
if ($ playerurl ) {
157
- $ views = $ crucible ->get_player_views ();
160
+ $ permsplayer = $ crucible ->get_player_permissions ();
161
+ $ showplayer = get_config ('block_crucible ' , 'showplayer ' );
158
162
}
159
- if ($ views ) {
163
+
164
+ if ($ permsplayer || $ showplayer ) {
160
165
$ data ->player = $ playerurl ;
161
166
$ data ->playerDescription = get_string ('playerdescription ' , 'block_crucible ' );
162
167
$ data ->playerLogo = $ OUTPUT ->image_url ('crucible-icon-player ' , 'block_crucible ' );
@@ -166,21 +171,21 @@ public function get_content() {
166
171
debugging ("Player not configured. Configure plugin settings to enable this application. " , DEBUG_DEVELOPER );
167
172
}
168
173
169
- $ permsplayer = null ;
170
- $ showplayer = null ;
174
+ ////////////////////ALLOY/////////////////////////////
175
+ $ alloyurl = get_config ( ' block_crucible ' , ' playerappurl ' ) ;
171
176
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 ' );
175
181
}
176
- if ($ permsplayer || $ showplayer ) {
182
+
183
+ if ($ permsplayer || $ showalloy ) {
177
184
$ data ->alloy = get_config ('block_crucible ' , 'alloyappurl ' );
178
185
$ data ->alloyDescription = get_string ('alloydescription ' , 'block_crucible ' );
179
186
$ 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 );
184
189
}
185
190
186
191
////////////////////BLUEPRINT/////////////////////////////
0 commit comments