@@ -151,6 +151,7 @@ public function get_content() {
151151
152152 ////////////////////PLAYER/////////////////////////////
153153 $ playerurl = get_config ('block_crucible ' , 'playerappurl ' );
154+
154155 $ views = null ;
155156 if ($ playerurl ) {
156157 $ views = $ crucible ->get_player_views ();
@@ -165,12 +166,14 @@ public function get_content() {
165166 debugging ("Player not configured. Configure plugin settings to enable this application. " , DEBUG_DEVELOPER );
166167 }
167168
168- ////////////////////PLAYER/////////////////////////////
169169 $ permsplayer = null ;
170+ $ showplayer = null ;
171+
170172 if ($ playerurl ) {
171173 $ permsplayer = $ crucible ->get_player_permissions ();
174+ $ showplayer = get_config ('block_crucible ' , 'showplayer ' );
172175 }
173- if ($ permsplayer ) {
176+ if ($ permsplayer || $ showplayer ) {
174177 $ data ->alloy = get_config ('block_crucible ' , 'alloyappurl ' );
175178 $ data ->alloyDescription = get_string ('alloydescription ' , 'block_crucible ' );
176179 $ data ->alloyLogo = $ OUTPUT ->image_url ('crucible-icon-alloy ' , 'block_crucible ' );
@@ -184,12 +187,15 @@ public function get_content() {
184187 $ blueprinturl = get_config ('block_crucible ' , 'blueprintappurl ' );
185188 $ msels = null ;
186189 $ permsblueprint = null ;
190+ $ showblueprint = null ;
191+
187192 if ($ blueprinturl ) {
188193 $ msels = $ crucible ->get_blueprint_msels ();
189194 $ permsblueprint = $ crucible ->get_blueprint_permissions ();
195+ $ showblueprint = get_config ('block_crucible ' , 'showblueprint ' );
190196 }
191197
192- if (($ msels && $ showapps ) || $ permsblueprint ) {
198+ if (($ msels && $ showapps ) || $ permsblueprint || $ showblueprint ) {
193199 $ data ->blueprint = $ blueprinturl ;
194200 $ data ->blueprintDescription = get_string ('blueprintdescription ' , 'block_crucible ' );
195201 $ data ->blueprintLogo = $ OUTPUT ->image_url ('crucible-icon-blueprint ' , 'block_crucible ' );
@@ -212,11 +218,14 @@ public function get_content() {
212218 ////////////////////CASTER/////////////////////////////
213219 $ casterurl = get_config ('block_crucible ' , 'casterappurl ' );
214220 $ permscaster = null ;
221+ $ showcaster = null ;
222+
215223 if ($ casterurl ) {
216224 $ permscaster = $ crucible ->get_caster_permissions ();
225+ $ showcaster = get_config ('block_crucible ' , 'showcaster ' );
217226 }
218227
219- if ($ permscaster ) {
228+ if ($ permscaster || $ showcaster ) {
220229 $ data ->caster = $ casterurl ;
221230 $ data ->casterDescription = get_string ('casterdescription ' , 'block_crucible ' );
222231 $ data ->casterLogo = $ OUTPUT ->image_url ('crucible-icon-caster ' , 'block_crucible ' );
@@ -230,12 +239,15 @@ public function get_content() {
230239 $ citeurl = get_config ('block_crucible ' , 'citeappurl ' );
231240 $ permscite = null ;
232241 $ evalscite = null ;
242+ $ showcite = null ;
243+
233244 if ($ citeurl ) {
234245 $ permscite = $ crucible ->get_cite_permissions ();
235246 $ evalscite = $ crucible ->get_cite_evaluations ();
247+ $ showcite = get_config ('block_crucible ' , 'showcite ' );
236248 }
237249
238- if (($ evalscite && $ showapps ) || $ permscite ) {
250+ if (($ evalscite && $ showapps ) || $ permscite || $ showcite ) {
239251 $ data ->cite = $ citeurl ;
240252 $ data ->citeDescription = get_string ('citedescription ' , 'block_crucible ' );
241253 $ data ->citeLogo = $ OUTPUT ->image_url ('crucible-icon-cite ' , 'block_crucible ' );
@@ -251,12 +263,15 @@ public function get_content() {
251263 $ galleryurl = get_config ('block_crucible ' , 'galleryappurl ' );
252264 $ permsgallery = null ;
253265 $ exhibitsgallery = null ;
266+ $ showgallery = null ;
267+
254268 if ($ galleryurl ) {
255269 $ permsgallery = $ crucible ->get_gallery_permissions ();
256270 $ exhibitsgallery = $ crucible ->get_gallery_exhibits ();
271+ $ showgallery = get_config ('block_crucible ' , 'showgallery ' );
257272 }
258273
259- if (($ exhibitsgallery && $ showapps ) || $ permsgallery ) {
274+ if (($ exhibitsgallery && $ showapps ) || $ permsgallery || $ showgallery ) {
260275 $ data ->gallery = $ galleryurl ;
261276 $ data ->galleryDescription = get_string ('gallerydescription ' , 'block_crucible ' );
262277 $ data ->galleryLogo = $ OUTPUT ->image_url ('crucible-icon-gallery ' , 'block_crucible ' );
@@ -271,11 +286,14 @@ public function get_content() {
271286 ////////////////////STEAMFITTER/////////////////////////////
272287 $ steamfitterurl = get_config ('block_crucible ' , 'steamfitterappurl ' );
273288 $ permssteam = null ;
289+ $ showsteamfitter = null ;
290+
274291 if ($ steamfitterurl ) {
275292 $ permssteam = $ crucible ->get_steamfitter_permissions ();
293+ $ showsteamfitter = get_config ('block_crucible ' , 'showsteamfitter ' );
276294 }
277295
278- if ($ permssteam ) {
296+ if ($ permssteam || $ showsteamfitter ) {
279297 $ data ->steamfitter = $ steamfitterurl ;
280298 $ data ->steamfitterDescription = get_string ('steamfitterdescription ' , 'block_crucible ' );
281299 $ data ->steamfitterLogo = $ OUTPUT ->image_url ('crucible-icon-steamfitter ' , 'block_crucible ' );
@@ -289,6 +307,7 @@ public function get_content() {
289307 if ($ showcomms ) {
290308 $ rocketchaturl = get_config ('block_crucible ' , 'rocketchatappurl ' );
291309 $ rocketchat = null ;
310+
292311 if ($ rocketchaturl ) {
293312 $ rocketchat = $ crucible ->get_rocketchat_user_info ();
294313 }
@@ -315,11 +334,13 @@ public function get_content() {
315334 ////////////////////TOPOMOJO////////////////////////////
316335 $ topomojourl = get_config ('block_crucible ' , 'topomojoappurl ' );
317336 $ permstopomojo = null ;
337+ $ showtopomojo = null ;
338+
318339 if ($ topomojourl ) {
319340 $ permstopomojo = $ crucible ->get_topomojo_permissions ();
341+ $ showtopomojo = get_config ('block_crucible ' , 'showtopomojo ' );
320342 }
321343
322- $ showtopomojo = get_config ('block_crucible ' , 'showtopomojo ' );
323344 if ($ permstopomojo || $ showtopomojo ) {
324345 $ data ->topomojo = $ topomojourl ;
325346 $ data ->topomojoDescription = get_string ('topomojodescription ' , 'block_crucible ' );
@@ -334,12 +355,14 @@ public function get_content() {
334355 $ gameboardurl = get_config ('block_crucible ' , 'gameboardappurl ' );
335356 $ permsgameboard = null ;
336357 $ activechallenges = null ;
358+ $ showgameboard = null ;
359+
337360 if ($ gameboardurl ) {
338361 $ permsgameboard = $ crucible ->get_gameboard_permissions ();
339362 $ activechallenges = $ crucible ->get_active_challenges ();
363+ $ showgameboard = get_config ('block_crucible ' , 'showgameboard ' );
340364 }
341365
342- $ showgameboard = get_config ('block_crucible ' , 'showgameboard ' );
343366 if (($ activechallenges && $ showapps ) || $ permsgameboard || $ showgameboard ) {
344367 $ data ->gameboard = $ gameboardurl ;
345368 $ data ->gameboardDescription = get_string ('gameboarddescription ' , 'block_crucible ' );
@@ -418,12 +441,14 @@ public function get_content() {
418441 $ mispurl = get_config ('block_crucible ' , 'mispappurl ' );
419442 $ permsmisp = null ;
420443 $ usermisp = null ;
444+ $ showmisp = null ;
445+
421446 if ($ mispurl ) {
422447 $ permsmisp = $ crucible ->get_misp_permissions ();
423448 $ usermisp = $ crucible ->get_misp_user ();
449+ $ showmisp = get_config ('block_crucible ' , 'showmisp ' );
424450 }
425451
426- $ showmisp = get_config ('block_crucible ' , 'showmisp ' );
427452 if (($ usermisp && $ showapps ) || $ permsmisp || $ showmisp ) {
428453 $ data ->misp = $ mispurl ;
429454 $ data ->mispDescription = get_string ('mispdescription ' , 'block_crucible ' );
0 commit comments