@@ -58,8 +58,8 @@ class studentquiz_question {
5858 * @param mixed|null $cm
5959 * @param mixed|null $context
6060 */
61- public function __construct (int $ studentquizquestionid , question_definition $ question = null ,
62- stdClass $ studentquiz = null , $ cm = null , $ context = null ) {
61+ public function __construct (int $ studentquizquestionid , ? question_definition $ question = null ,
62+ ? stdClass $ studentquiz = null , $ cm = null , $ context = null ) {
6363 $ this ->id = $ studentquizquestionid ;
6464 $ this ->load_studentquiz_question ();
6565 $ this ->question = $ question ;
@@ -167,8 +167,8 @@ public function is_hidden(): bool {
167167 * @param mixed $context
168168 * @return studentquiz_question StudentQuiz question object.
169169 */
170- public static function get_studentquiz_question_from_question (question_definition $ question , stdClass $ studentquiz = null ,
171- $ cm = null , $ context = null ): studentquiz_question {
170+ public static function get_studentquiz_question_from_question (question_definition $ question , ? stdClass $ studentquiz = null ,
171+ mixed $ cm = null , mixed $ context = null ): studentquiz_question {
172172 global $ DB ;
173173 $ params = [
174174 'questionid1 ' => $ question ->id ,
@@ -314,11 +314,11 @@ public function change_pin_status(int $pin): void {
314314 * Saving the action change state.
315315 *
316316 * @param int $state The state of the question in the StudentQuiz.
317- * @param int $userid
318- * @param int $timecreated The time do action.
317+ * @param int|null $userid
318+ * @param int|null $timecreated The time do action.
319319 * @return bool|int True or new id
320320 */
321- public function save_action (int $ state , ?int $ userid , int $ timecreated = null ) {
321+ public function save_action (int $ state , ?int $ userid , ? int $ timecreated = null ) {
322322 global $ DB ;
323323
324324 $ data = new \stdClass ();
0 commit comments