@@ -53,7 +53,7 @@ public function definition() {
53
53
54
54
// Observation point information.
55
55
$ instext = $ prefill ['ins ' ];
56
- $ insformat = $ prefill ['ins_f ' ];
56
+ $ insformat = ( int ) $ prefill ['ins_f ' ];
57
57
58
58
$ mform ->addElement ('static ' , 'instructions ' , get_string ('gradinginstructions ' , 'observation ' ),
59
59
format_text ($ instext , $ insformat ));
@@ -68,19 +68,19 @@ public function definition() {
68
68
break ;
69
69
// Pass/Fail type.
70
70
case \mod_observation \observation_manager::INPUT_PASSFAIL :
71
- $ radioarray = array () ;
71
+ $ radioarray = [] ;
72
72
$ radioarray [] = $ mform ->createElement ('radio ' , 'response ' , '' , get_string ('pass ' , 'observation ' ), 'Pass ' );
73
73
$ radioarray [] = $ mform ->createElement ('radio ' , 'response ' , '' , get_string ('fail ' , 'observation ' ), 'Fail ' );
74
- $ mform ->addGroup ($ radioarray , 'radioar ' , get_string ('passfailtype ' , 'observation ' ), array ( ' ' ) , false );
74
+ $ mform ->addGroup ($ radioarray , 'radioar ' , get_string ('passfailtype ' , 'observation ' ), [ ' ' ] , false );
75
75
$ mform ->setType ('response ' , PARAM_TEXT );
76
76
$ mform ->addRule ('radioar ' , get_string ('required ' , 'observation ' ), 'required ' , null , 'client ' );
77
77
break ;
78
78
case \mod_observation \observation_manager::INPUT_EVIDENCE :
79
79
// Image upload here.
80
80
$ maxbytes = $ prefill ['file_size ' ];
81
81
$ mform ->addElement ('filemanager ' , 'response ' , get_string ('evidenceupload ' , 'observation ' ), null ,
82
- array ( 'subdirs ' => 0 , 'maxbytes ' => $ maxbytes , 'areamaxbytes ' => $ maxbytes , 'maxfiles ' => 1 ,
83
- 'accepted_types ' => 'audio,video,image,document ' ) );
82
+ [ 'subdirs ' => 0 , 'maxbytes ' => $ maxbytes , 'areamaxbytes ' => $ maxbytes , 'maxfiles ' => 1 ,
83
+ 'accepted_types ' => 'audio,video,image,document ' ] );
84
84
$ mform ->setType ('response ' , PARAM_INT );
85
85
$ mform ->addRule ('response ' , get_string ('required ' , 'observation ' ), 'required ' , null , 'client ' );
86
86
break ;
0 commit comments