@@ -151,6 +151,7 @@ public function get_content() {
151
151
152
152
////////////////////PLAYER/////////////////////////////
153
153
$ playerurl = get_config ('block_crucible ' , 'playerappurl ' );
154
+
154
155
$ views = null ;
155
156
if ($ playerurl ) {
156
157
$ views = $ crucible ->get_player_views ();
@@ -165,12 +166,14 @@ public function get_content() {
165
166
debugging ("Player not configured. Configure plugin settings to enable this application. " , DEBUG_DEVELOPER );
166
167
}
167
168
168
- ////////////////////PLAYER/////////////////////////////
169
169
$ permsplayer = null ;
170
+ $ showplayer = null ;
171
+
170
172
if ($ playerurl ) {
171
173
$ permsplayer = $ crucible ->get_player_permissions ();
174
+ $ showplayer = get_config ('block_crucible ' , 'showplayer ' );
172
175
}
173
- if ($ permsplayer ) {
176
+ if ($ permsplayer || $ showplayer ) {
174
177
$ data ->alloy = get_config ('block_crucible ' , 'alloyappurl ' );
175
178
$ data ->alloyDescription = get_string ('alloydescription ' , 'block_crucible ' );
176
179
$ data ->alloyLogo = $ OUTPUT ->image_url ('crucible-icon-alloy ' , 'block_crucible ' );
@@ -184,12 +187,15 @@ public function get_content() {
184
187
$ blueprinturl = get_config ('block_crucible ' , 'blueprintappurl ' );
185
188
$ msels = null ;
186
189
$ permsblueprint = null ;
190
+ $ showblueprint = null ;
191
+
187
192
if ($ blueprinturl ) {
188
193
$ msels = $ crucible ->get_blueprint_msels ();
189
194
$ permsblueprint = $ crucible ->get_blueprint_permissions ();
195
+ $ showblueprint = get_config ('block_crucible ' , 'showblueprint ' );
190
196
}
191
197
192
- if (($ msels && $ showapps ) || $ permsblueprint ) {
198
+ if (($ msels && $ showapps ) || $ permsblueprint || $ showblueprint ) {
193
199
$ data ->blueprint = $ blueprinturl ;
194
200
$ data ->blueprintDescription = get_string ('blueprintdescription ' , 'block_crucible ' );
195
201
$ data ->blueprintLogo = $ OUTPUT ->image_url ('crucible-icon-blueprint ' , 'block_crucible ' );
@@ -212,11 +218,14 @@ public function get_content() {
212
218
////////////////////CASTER/////////////////////////////
213
219
$ casterurl = get_config ('block_crucible ' , 'casterappurl ' );
214
220
$ permscaster = null ;
221
+ $ showcaster = null ;
222
+
215
223
if ($ casterurl ) {
216
224
$ permscaster = $ crucible ->get_caster_permissions ();
225
+ $ showcaster = get_config ('block_crucible ' , 'showcaster ' );
217
226
}
218
227
219
- if ($ permscaster ) {
228
+ if ($ permscaster || $ showcaster ) {
220
229
$ data ->caster = $ casterurl ;
221
230
$ data ->casterDescription = get_string ('casterdescription ' , 'block_crucible ' );
222
231
$ data ->casterLogo = $ OUTPUT ->image_url ('crucible-icon-caster ' , 'block_crucible ' );
@@ -230,12 +239,15 @@ public function get_content() {
230
239
$ citeurl = get_config ('block_crucible ' , 'citeappurl ' );
231
240
$ permscite = null ;
232
241
$ evalscite = null ;
242
+ $ showcite = null ;
243
+
233
244
if ($ citeurl ) {
234
245
$ permscite = $ crucible ->get_cite_permissions ();
235
246
$ evalscite = $ crucible ->get_cite_evaluations ();
247
+ $ showcite = get_config ('block_crucible ' , 'showcite ' );
236
248
}
237
249
238
- if (($ evalscite && $ showapps ) || $ permscite ) {
250
+ if (($ evalscite && $ showapps ) || $ permscite || $ showcite ) {
239
251
$ data ->cite = $ citeurl ;
240
252
$ data ->citeDescription = get_string ('citedescription ' , 'block_crucible ' );
241
253
$ data ->citeLogo = $ OUTPUT ->image_url ('crucible-icon-cite ' , 'block_crucible ' );
@@ -251,12 +263,15 @@ public function get_content() {
251
263
$ galleryurl = get_config ('block_crucible ' , 'galleryappurl ' );
252
264
$ permsgallery = null ;
253
265
$ exhibitsgallery = null ;
266
+ $ showgallery = null ;
267
+
254
268
if ($ galleryurl ) {
255
269
$ permsgallery = $ crucible ->get_gallery_permissions ();
256
270
$ exhibitsgallery = $ crucible ->get_gallery_exhibits ();
271
+ $ showgallery = get_config ('block_crucible ' , 'showgallery ' );
257
272
}
258
273
259
- if (($ exhibitsgallery && $ showapps ) || $ permsgallery ) {
274
+ if (($ exhibitsgallery && $ showapps ) || $ permsgallery || $ showgallery ) {
260
275
$ data ->gallery = $ galleryurl ;
261
276
$ data ->galleryDescription = get_string ('gallerydescription ' , 'block_crucible ' );
262
277
$ data ->galleryLogo = $ OUTPUT ->image_url ('crucible-icon-gallery ' , 'block_crucible ' );
@@ -271,11 +286,14 @@ public function get_content() {
271
286
////////////////////STEAMFITTER/////////////////////////////
272
287
$ steamfitterurl = get_config ('block_crucible ' , 'steamfitterappurl ' );
273
288
$ permssteam = null ;
289
+ $ showsteamfitter = null ;
290
+
274
291
if ($ steamfitterurl ) {
275
292
$ permssteam = $ crucible ->get_steamfitter_permissions ();
293
+ $ showsteamfitter = get_config ('block_crucible ' , 'showsteamfitter ' );
276
294
}
277
295
278
- if ($ permssteam ) {
296
+ if ($ permssteam || $ showsteamfitter ) {
279
297
$ data ->steamfitter = $ steamfitterurl ;
280
298
$ data ->steamfitterDescription = get_string ('steamfitterdescription ' , 'block_crucible ' );
281
299
$ data ->steamfitterLogo = $ OUTPUT ->image_url ('crucible-icon-steamfitter ' , 'block_crucible ' );
@@ -289,6 +307,7 @@ public function get_content() {
289
307
if ($ showcomms ) {
290
308
$ rocketchaturl = get_config ('block_crucible ' , 'rocketchatappurl ' );
291
309
$ rocketchat = null ;
310
+
292
311
if ($ rocketchaturl ) {
293
312
$ rocketchat = $ crucible ->get_rocketchat_user_info ();
294
313
}
@@ -315,11 +334,13 @@ public function get_content() {
315
334
////////////////////TOPOMOJO////////////////////////////
316
335
$ topomojourl = get_config ('block_crucible ' , 'topomojoappurl ' );
317
336
$ permstopomojo = null ;
337
+ $ showtopomojo = null ;
338
+
318
339
if ($ topomojourl ) {
319
340
$ permstopomojo = $ crucible ->get_topomojo_permissions ();
341
+ $ showtopomojo = get_config ('block_crucible ' , 'showtopomojo ' );
320
342
}
321
343
322
- $ showtopomojo = get_config ('block_crucible ' , 'showtopomojo ' );
323
344
if ($ permstopomojo || $ showtopomojo ) {
324
345
$ data ->topomojo = $ topomojourl ;
325
346
$ data ->topomojoDescription = get_string ('topomojodescription ' , 'block_crucible ' );
@@ -334,12 +355,14 @@ public function get_content() {
334
355
$ gameboardurl = get_config ('block_crucible ' , 'gameboardappurl ' );
335
356
$ permsgameboard = null ;
336
357
$ activechallenges = null ;
358
+ $ showgameboard = null ;
359
+
337
360
if ($ gameboardurl ) {
338
361
$ permsgameboard = $ crucible ->get_gameboard_permissions ();
339
362
$ activechallenges = $ crucible ->get_active_challenges ();
363
+ $ showgameboard = get_config ('block_crucible ' , 'showgameboard ' );
340
364
}
341
365
342
- $ showgameboard = get_config ('block_crucible ' , 'showgameboard ' );
343
366
if (($ activechallenges && $ showapps ) || $ permsgameboard || $ showgameboard ) {
344
367
$ data ->gameboard = $ gameboardurl ;
345
368
$ data ->gameboardDescription = get_string ('gameboarddescription ' , 'block_crucible ' );
@@ -418,12 +441,14 @@ public function get_content() {
418
441
$ mispurl = get_config ('block_crucible ' , 'mispappurl ' );
419
442
$ permsmisp = null ;
420
443
$ usermisp = null ;
444
+ $ showmisp = null ;
445
+
421
446
if ($ mispurl ) {
422
447
$ permsmisp = $ crucible ->get_misp_permissions ();
423
448
$ usermisp = $ crucible ->get_misp_user ();
449
+ $ showmisp = get_config ('block_crucible ' , 'showmisp ' );
424
450
}
425
451
426
- $ showmisp = get_config ('block_crucible ' , 'showmisp ' );
427
452
if (($ usermisp && $ showapps ) || $ permsmisp || $ showmisp ) {
428
453
$ data ->misp = $ mispurl ;
429
454
$ data ->mispDescription = get_string ('mispdescription ' , 'block_crucible ' );
0 commit comments