@@ -5863,11 +5863,16 @@ public function show_exercise_result_header(
5863
5863
$ duration = null ,
5864
5864
$ ip = null
5865
5865
) {
5866
- $ array = array ();
5867
-
5866
+ $ array = [];
5868
5867
if (!empty ($ user_data )) {
5869
- $ array [] = array ('title ' => get_lang ('Name ' ), 'content ' => $ user_data ['complete_name ' ]);
5870
- $ array [] = array ('title ' => get_lang ('Username ' ), 'content ' => $ user_data ['username ' ]);
5868
+ $ array [] = array (
5869
+ 'title ' => get_lang ('Name ' ),
5870
+ 'content ' => $ user_data ['complete_name ' ]
5871
+ );
5872
+ $ array [] = array (
5873
+ 'title ' => get_lang ('Username ' ),
5874
+ 'content ' => $ user_data ['username ' ]
5875
+ );
5871
5876
if (!empty ($ user_data ['official_code ' ])) {
5872
5877
$ array [] = array (
5873
5878
'title ' => get_lang ('OfficialCode ' ),
@@ -5895,7 +5900,12 @@ public function show_exercise_result_header(
5895
5900
$ array [] = array ('title ' => get_lang ('IP ' ), 'content ' => $ ip );
5896
5901
}
5897
5902
5898
- $ icon = Display::return_icon ('test-quiz.png ' , get_lang ('Result ' ), null , ICON_SIZE_MEDIUM );
5903
+ $ icon = Display::return_icon (
5904
+ 'test-quiz.png ' ,
5905
+ get_lang ('Result ' ),
5906
+ null ,
5907
+ ICON_SIZE_MEDIUM
5908
+ );
5899
5909
5900
5910
$ html = '<div class="question-result"> ' ;
5901
5911
@@ -5908,7 +5918,12 @@ public function show_exercise_result_header(
5908
5918
);
5909
5919
}
5910
5920
5911
- $ html .= Display::description ($ array );
5921
+ $ hide = api_get_configuration_value ('hide_user_info_in_quiz_result ' );
5922
+
5923
+ if ($ hide === false ) {
5924
+ $ html .= Display::description ($ array );
5925
+ }
5926
+
5912
5927
$ html .= "</div> " ;
5913
5928
return $ html ;
5914
5929
}
0 commit comments