Fix exercise questions remove c_id, fix queries

pull/3844/head
Julio Montoya 4 years ago
parent ace28cba12
commit 9dc848a32a
  1. 27
      public/main/exercise/MultipleAnswerTrueFalseDegreeCertainty.php
  2. 3
      public/main/exercise/admin.php
  3. 51
      public/main/exercise/exercise.class.php
  4. 40
      public/main/exercise/hotspot_actionscript.as.php
  5. 25
      public/main/exercise/multiple_answer_true_false.class.php
  6. 53
      public/main/exercise/question.class.php
  7. 23
      public/main/inc/lib/events.lib.php
  8. 36
      public/main/inc/lib/exercise.lib.php
  9. 2
      public/main/inc/lib/groupmanager.lib.php
  10. 6
      src/CourseBundle/Entity/CQuiz.php

@ -2,6 +2,8 @@
/* For licensing terms, see /license.txt */
use Chamilo\CoreBundle\Framework\Container;
use Chamilo\CourseBundle\Entity\CQuizQuestion;
use ChamiloSession as Session;
/**
@ -244,19 +246,19 @@ class MultipleAnswerTrueFalseDegreeCertainty extends Question
$objAnswer = new Answer($this->id);
$nbAnswers = $form->getSubmitValue('nb_answers');
$courseId = api_get_course_int_id();
$correct = [];
$options = Question::readQuestionOption($this->id, $courseId);
$repo = Container::getQuestionRepository();
/** @var CQuizQuestion $question */
$question = $repo->find($this->id);
$options = $question->getOptions();
if (!empty($options)) {
foreach ($options as $optionData) {
$id = $optionData['iid'];
unset($optionData['iid']);
Question::updateQuestionOption($id, $optionData, $courseId);
$optionData->setName($optionData);
}
} else {
for ($i = 1; $i <= 8; $i++) {
$lastId = Question::saveQuestionOption($this->id, $this->options[$i], $courseId, $i);
$correct[$i] = $lastId;
Question::saveQuestionOption($question, $this->options[$i], $i);
}
}
@ -505,7 +507,7 @@ class MultipleAnswerTrueFalseDegreeCertainty extends Question
if ($category) {
$categoryQuestionName = $category->name;
}
list($noValue, $height) = self::displayDegreeChartChildren(
[$noValue, $height] = self::displayDegreeChartChildren(
$scoreListForCategory,
300,
'',
@ -1092,7 +1094,7 @@ class MultipleAnswerTrueFalseDegreeCertainty extends Question
}
// get student answer option id
$studentAnswerOptionId = isset($splitAnswer[1]) ? $splitAnswer[1] : null;
$studentAnswerOptionId = $splitAnswer[1] ?? null;
// we got the correct answer option id, let's compare ti with the student answer
$percentage = null;
@ -1169,18 +1171,17 @@ class MultipleAnswerTrueFalseDegreeCertainty extends Question
public static function getCorrectAnswerOptionId($idAuto)
{
$tblAnswer = Database::get_course_table(TABLE_QUIZ_ANSWER);
$courseId = api_get_course_int_id();
$idAuto = (int) $idAuto;
$sql = "SELECT correct FROM $tblAnswer
WHERE c_id = $courseId AND iid = $idAuto";
WHERE iid = $idAuto";
$res = Database::query($sql);
$data = Database::fetch_assoc($res);
if (Database::num_rows($res) > 0) {
return $data['correct'];
} else {
return 0;
}
return 0;
}
/**

@ -436,7 +436,8 @@ if ($newQuestion || $editQuestion) {
echo '</div>';
} else {
require 'question_admin.inc.php';
ExerciseLib::showTestsWhereQuestionIsUsed($objQuestion->iid, $objExercise->getId());
// @todo
//ExerciseLib::showTestsWhereQuestionIsUsed($objQuestion->iid, $objExercise->getId());
}
}
}

@ -201,7 +201,7 @@ class Exercise
$this->results_disabled = $object->results_disabled;
$this->attempts = $object->max_attempt;
$this->feedback_type = $object->feedback_type;
$this->sessionId = $object->session_id;
//$this->sessionId = $object->session_id;
$this->propagate_neg = $object->propagate_neg;
$this->saveCorrectAnswers = $object->save_correct_answers;
$this->randomByCat = $object->random_by_category;
@ -1676,8 +1676,6 @@ class Exercise
// Creates a new exercise
$courseEntity = api_get_course_entity($this->course_id);
$exercise
->setSessionId(api_get_session_id())
->setCId($courseEntity->getId())
->setParent($courseEntity)
->addCourseLink($courseEntity, api_get_session_entity());
$em->persist($exercise);
@ -5672,11 +5670,6 @@ class Exercise
$overlap = (int) $final_overlap;
}
$overlap = 0;
if ($final_overlap > 0) {
$overlap = (int) $final_overlap;
}
$excess = 0;
if ($final_excess > 0) {
$excess = (int) $final_excess;
@ -5743,10 +5736,11 @@ class Exercise
$questionScore = 0;
}
// we always insert the answer_id 1 = delineation
Event::saveQuestionAttempt($questionScore, 1, $quesId, $exeId, 0);
Event::saveQuestionAttempt($this, $questionScore, 1, $quesId, $exeId, 0);
//in delineation mode, get the answer from $hotspot_delineation_result[1]
$hotspotValue = isset($hotspot_delineation_result[1]) ? 1 === (int) $hotspot_delineation_result[1] ? 1 : 0 : 0;
Event::saveExerciseAttemptHotspot(
$this,
$exeId,
$quesId,
1,
@ -5757,10 +5751,11 @@ class Exercise
if (0 == $final_answer) {
$questionScore = 0;
$answer = 0;
Event::saveQuestionAttempt($questionScore, $answer, $quesId, $exeId, 0);
Event::saveQuestionAttempt($this, $questionScore, $answer, $quesId, $exeId, 0);
if (is_array($exerciseResultCoordinates[$quesId])) {
foreach ($exerciseResultCoordinates[$quesId] as $idx => $val) {
Event::saveExerciseAttemptHotspot(
$this,
$exeId,
$quesId,
$idx,
@ -5770,11 +5765,12 @@ class Exercise
}
}
} else {
Event::saveQuestionAttempt($questionScore, $answer, $quesId, $exeId, 0);
Event::saveQuestionAttempt($this, $questionScore, $answer, $quesId, $exeId, 0);
if (is_array($exerciseResultCoordinates[$quesId])) {
foreach ($exerciseResultCoordinates[$quesId] as $idx => $val) {
$hotspotValue = 1 === (int) $choice[$idx] ? 1 : 0;
Event::saveExerciseAttemptHotspot(
$this,
$exeId,
$quesId,
$idx,
@ -5872,6 +5868,7 @@ class Exercise
$answerDegreeCertainty = isset($replyDegreeCertainty[$i]) ? $replyDegreeCertainty[$i] : '';
$answerValue = isset($choiceDegreeCertainty[$answerDegreeCertainty]) ? $choiceDegreeCertainty[$answerDegreeCertainty] : '';
Event::saveQuestionAttempt(
$this,
$questionScore,
$chosenAnswer.':'.$choice[$chosenAnswer].':'.$answerValue,
$quesId,
@ -5884,6 +5881,7 @@ class Exercise
}
} else {
Event::saveQuestionAttempt(
$this,
$questionScore,
$chosenAnswer.':'.$choice[$chosenAnswer],
$quesId,
@ -5900,6 +5898,7 @@ class Exercise
}
} else {
Event::saveQuestionAttempt(
$this,
$questionScore,
0,
$quesId,
@ -5916,6 +5915,7 @@ class Exercise
for ($i = 0; $i < count($reply); $i++) {
$ans = $reply[$i];
Event::saveQuestionAttempt(
$this,
$questionScore,
$ans,
$quesId,
@ -5928,6 +5928,7 @@ class Exercise
}
} else {
Event::saveQuestionAttempt(
$this,
$questionScore,
0,
$quesId,
@ -5944,6 +5945,7 @@ class Exercise
for ($i = 0; $i < count($reply); $i++) {
$ans = $reply[$i];
Event::saveQuestionAttempt(
$this,
$questionScore,
$ans,
$quesId,
@ -5956,6 +5958,7 @@ class Exercise
}
} else {
Event::saveQuestionAttempt(
$this,
$questionScore,
0,
$quesId,
@ -5970,6 +5973,7 @@ class Exercise
if (isset($matching)) {
foreach ($matching as $j => $val) {
Event::saveQuestionAttempt(
$this,
$questionScore,
$val,
$quesId,
@ -5984,6 +5988,7 @@ class Exercise
} elseif (FREE_ANSWER == $answerType) {
$answer = $choice;
Event::saveQuestionAttempt(
$this,
$questionScore,
$answer,
$quesId,
@ -5997,6 +6002,7 @@ class Exercise
$answer = $choice;
/** @var OralExpression $objQuestionTmp */
Event::saveQuestionAttempt(
$this,
$questionScore,
$answer,
$quesId,
@ -6015,6 +6021,7 @@ class Exercise
) {
$answer = $choice;
Event::saveQuestionAttempt(
$this,
$questionScore,
$answer,
$quesId,
@ -6048,13 +6055,13 @@ class Exercise
error_log('Hotspot value: '.$hotspotValue);
}
Event::saveExerciseAttemptHotspot(
$this,
$exeId,
$quesId,
$idx,
$hotspotValue,
$val,
false,
$this->id
false
);
}
} else {
@ -6063,6 +6070,7 @@ class Exercise
}
}
Event::saveQuestionAttempt(
$this,
$questionScore,
implode('|', $answer),
$quesId,
@ -6074,6 +6082,7 @@ class Exercise
);
} else {
Event::saveQuestionAttempt(
$this,
$questionScore,
$answer,
$quesId,
@ -8772,7 +8781,6 @@ class Exercise
$allowDelete = self::allowAction('delete');
$allowClean = self::allowAction('clean_results');
$TBL_EXERCISE_QUESTION = Database::get_course_table(TABLE_QUIZ_TEST_QUESTION);
$TBL_TRACK_EXERCISES = Database::get_main_table(TABLE_STATISTIC_TRACK_E_EXERCISES);
$categoryId = (int) $categoryId;
@ -8792,7 +8800,6 @@ class Exercise
$courseId = $courseInfo['real_id'];
$tableRows = [];
$origin = api_get_origin();
$userInfo = $userId ? api_get_user_info($userId) : api_get_user_info();
$charset = 'utf-8';
$token = Security::get_token();
$userId = $userId ? (int) $userId : api_get_user_id();
@ -8941,7 +8948,9 @@ class Exercise
$lp_blocked = null;
if (true == $exercise->exercise_was_added_in_lp) {
$lp_blocked = Display::div(
get_lang('This exercise has been included in a learning path, so it cannot be accessed by students directly from here. If you want to put the same exercise available through the exercises tool, please make a copy of the current exercise using the copy icon.'),
get_lang(
'This exercise has been included in a learning path, so it cannot be accessed by students directly from here. If you want to put the same exercise available through the exercises tool, please make a copy of the current exercise using the copy icon.'
),
['class' => 'lp_content_type_label']
);
}
@ -8999,12 +9008,13 @@ class Exercise
$currentRow['title'] = $url.' '.$session_img.$lp_blocked;
// Count number exercise - teacher
$sql = "SELECT count(*) count FROM $TBL_EXERCISE_QUESTION
/*$sql = "SELECT count(*) count FROM $TBL_EXERCISE_QUESTION
WHERE quiz_id = $exerciseId";
$sqlresult = Database::query($sql);
$rowi = (int) Database::result($sqlresult, 0, 0);
$rowi = (int) Database::result($sqlresult, 0, 0);*/
$rowi = $exerciseEntity->getQuestions()->count();
if ($sessionId == $exerciseEntity->getSessionId()) {
if ($repo->isGranted('EDIT', $exerciseEntity)) {
// Questions list
$actions = Display::url(
Display::return_icon('edit.png', get_lang('Edit'), '', ICON_SIZE_SMALL),
@ -9233,7 +9243,7 @@ class Exercise
// Delete
$delete = '';
if ($sessionId == $exerciseEntity->getSessionId()) {
if ($repo->isGranted('DELETE', $exerciseEntity)) {
if (false == $locked) {
$delete = Display::url(
Display::return_icon(
@ -9327,6 +9337,7 @@ class Exercise
if ($returnData) {
$currentRow['title'] = $exercise->getUnformattedTitle();
}
// Don't remove this marker: note-query-exe-results
$sql = "SELECT * FROM $TBL_TRACK_EXERCISES
WHERE

@ -41,9 +41,10 @@ $pictureWidth = $resourceFile->getWidth();
$pictureHeight = $resourceFile->getHeight();
$imagePath = $questionRepo->getHotSpotImageUrl($objQuestion).'?'.api_get_cidreq();
$course_id = api_get_course_int_id();
$answers = $objQuestion->getAnswers();
// Query db for answers
if (HOT_SPOT_DELINEATION == $answer_type) {
/*if (HOT_SPOT_DELINEATION == $answer_type) {
$sql = "SELECT iid, answer, hotspot_coordinates, hotspot_type, ponderation
FROM $TBL_ANSWERS
WHERE
@ -57,7 +58,7 @@ if (HOT_SPOT_DELINEATION == $answer_type) {
WHERE c_id = $course_id AND question_id = $questionId
ORDER BY position";
}
$result = Database::query($sql);
$result = Database::query($sql);*/
$data = [];
$data['type'] = 'user';
@ -69,41 +70,46 @@ $data['courseCode'] = $_course['path'];
$data['hotspots'] = [];
$data['answers'] = [];
$nmbrTries = 0;
while ($hotspot = Database::fetch_assoc($result)) {
$numberOfTries = 0;
foreach ($answers as $hotspot) {
$type = $hotspot->getHotspotType();
if (HOT_SPOT_DELINEATION == $answer_type) {
if ('delineation' !== $type) {
continue;
}
}
$hotSpot = [];
$hotSpot['id'] = $hotspot['iid'];
$hotSpot['iid'] = $hotspot['iid'];
$hotSpot['answer'] = $hotspot['answer'];
$hotSpot['id'] = $hotspot->getIid();
$hotSpot['iid'] = $hotspot->getIid();
$hotSpot['answer'] = $hotspot->getAnswer();
// Square or rectangle
if ('square' === $hotspot['hotspot_type']) {
if ('square' === $type) {
$hotSpot['type'] = 'square';
}
// Circle or oval
if ('circle' === $hotspot['hotspot_type']) {
if ('circle' === $type) {
$hotSpot['type'] = 'circle';
}
// Polygon
if ('poly' === $hotspot['hotspot_type']) {
if ('poly' === $type) {
$hotSpot['type'] = 'poly';
}
// Delineation
if ('delineation' === $hotspot['hotspot_type']) {
if ('delineation' === $type) {
$hotSpot['type'] = 'delineation';
}
// No error
if ('noerror' === $hotspot['hotspot_type']) {
if ('noerror' === $type) {
$hotSpot['type'] = 'noerror';
}
// This is a good answer, count + 1 for nmbr of clicks
if ($hotspot['hotspot_type'] > 0) {
$nmbrTries++;
if ($type > 0) {
$numberOfTries++;
}
$hotSpot['coord'] = $hotspot['hotspot_coordinates'];
$hotSpot['coord'] = $hotspot->getHotspotCoordinates();
$data['hotspots'][] = $hotSpot;
}
@ -144,7 +150,7 @@ if (!empty($attemptList)) {
}
}
$data['nmbrTries'] = $nmbrTries;
$data['nmbrTries'] = $numberOfTries;
$data['done'] = 'done';
if (Session::has("hotspot_ordered$questionId")) {

@ -2,6 +2,8 @@
/* For licensing terms, see /license.txt */
use Chamilo\CoreBundle\Framework\Container;
use Chamilo\CourseBundle\Entity\CQuizQuestion;
use ChamiloSession as Session;
/**
@ -17,9 +19,6 @@ class MultipleAnswerTrueFalse extends Question
public $explanationLangVar = 'Multiple answer true/false/don\'t know';
public $options;
/**
* Constructor.
*/
public function __construct()
{
parent::__construct();
@ -246,25 +245,19 @@ class MultipleAnswerTrueFalse extends Question
$objAnswer = new Answer($this->id);
$nb_answers = $form->getSubmitValue('nb_answers');
$course_id = api_get_course_int_id();
$correct = [];
$options = Question::readQuestionOption($this->id, $course_id);
$repo = Container::getQuestionRepository();
/** @var CQuizQuestion $question */
$question = $repo->find($this->id);
$options = $question->getOptions();
$em = Database::getManager();
if (!empty($options)) {
foreach ($options as $optionData) {
$id = $optionData['iid'];
unset($optionData['iid']);
Question::updateQuestionOption($id, $optionData, $course_id);
$optionData->setName($optionData);
}
} else {
for ($i = 1; $i <= 3; $i++) {
$last_id = Question::saveQuestionOption(
$this->id,
$this->options[$i],
$course_id,
$i
);
$correct[$i] = $last_id;
Question::saveQuestionOption($question, $this->options[$i], $i);
}
}

@ -5,6 +5,7 @@
use Chamilo\CoreBundle\Framework\Container;
use Chamilo\CourseBundle\Entity\CQuizAnswer;
use Chamilo\CourseBundle\Entity\CQuizQuestion;
use Chamilo\CourseBundle\Entity\CQuizQuestionOption;
/**
* Class Question.
@ -545,7 +546,6 @@ abstract class Question
$questionCategoryRepo = Container::getQuestionCategoryRepository();
$questionRepo = Container::getQuestionRepository();
$exerciseRepo = Container::getQuizRepository();
// question already exists
if (!empty($id)) {
@ -1569,22 +1569,23 @@ abstract class Question
}
/**
* @param int $question_id
* @param string $name
* @param int $course_id
* @param int $position
* @param CQuizQuestion $question
* @param string $name
* @param int $position
*
* @return false|string
* @return null|CQuizQuestion
*/
public static function saveQuestionOption($question_id, $name, $course_id, $position = 0)
public static function saveQuestionOption(CQuizQuestion $question, $name, $position = 0)
{
$table = Database::get_course_table(TABLE_QUIZ_QUESTION_OPTION);
$params['question_id'] = (int) $question_id;
$params['name'] = $name;
$params['position'] = $position;
$params['c_id'] = $course_id;
return Database::insert($table, $params);
$option = new CQuizQuestionOption();
$option
->setQuestion($question)
->setName($name)
->setPosition($position)
;
$em = Database::getManager();
$em->persist($option);
$em->flush();
}
/**
@ -1605,31 +1606,12 @@ abstract class Question
);
}
/**
* @param int $id
* @param array $params
* @param int $course_id
*
* @return bool|int
*/
public static function updateQuestionOption($id, $params, $course_id)
{
$table = Database::get_course_table(TABLE_QUIZ_QUESTION_OPTION);
return Database::update(
$table,
$params,
['c_id = ? AND iid = ?' => [$course_id, $id]]
);
}
/**
* @param int $question_id
* @param int $course_id
*
* @return array
*/
public static function readQuestionOption($question_id, $course_id)
public static function readQuestionOption($question_id)
{
$table = Database::get_course_table(TABLE_QUIZ_QUESTION_OPTION);
@ -1638,8 +1620,7 @@ abstract class Question
$table,
[
'where' => [
'c_id = ? AND question_id = ?' => [
$course_id,
'question_id = ?' => [
$question_id,
],
],

@ -486,6 +486,7 @@ class Event
* @return bool Result of the insert query
*/
public static function saveQuestionAttempt(
Exercise $exercise,
$score,
$answer,
$question_id,
@ -547,7 +548,7 @@ class Event
}
//Validation in case of fraud with active control time
if (!ExerciseLib::exercise_time_control_is_valid($exercise_id, $learnpath_id, $learnpath_item_id)) {
if (!ExerciseLib::exercise_time_control_is_valid($exercise, $learnpath_id, $learnpath_item_id)) {
if ($debug) {
error_log("exercise_time_control_is_valid is false");
}
@ -674,33 +675,33 @@ class Event
/**
* Record an hotspot spot for this attempt at answering an hotspot question.
*
* @param int $exeId
* @param int $questionId Question ID
* @param int $answerId Answer ID
* @param int $correct
* @param string $coords Coordinates of this point (e.g. 123;324)
* @param bool $updateResults
* @param int $exerciseId
* @param Exercise $exercise
* @param int $exeId
* @param int $questionId Question ID
* @param int $answerId Answer ID
* @param int $correct
* @param string $coords Coordinates of this point (e.g. 123;324)
* @param bool $updateResults
*
* @return bool Result of the insert query
*
* @uses \Course code and user_id from global scope $_cid and $_user
*/
public static function saveExerciseAttemptHotspot(
Exercise $exercise,
$exeId,
$questionId,
$answerId,
$correct,
$coords,
$updateResults = false,
$exerciseId = 0
$updateResults = false
) {
$debug = false;
global $safe_lp_id, $safe_lp_item_id;
if (false == $updateResults) {
// Validation in case of fraud with activated control time
if (!ExerciseLib::exercise_time_control_is_valid($exerciseId, $safe_lp_id, $safe_lp_item_id)) {
if (!ExerciseLib::exercise_time_control_is_valid($exercise, $safe_lp_id, $safe_lp_item_id)) {
if ($debug) {
error_log('Attempt is fraud');
}

@ -1730,10 +1730,8 @@ HOTSPOT;
FROM $quizTable as q
INNER JOIN $trackExerciseTable as tee
ON q.iid = tee.exe_exo_id
INNER JOIN $courseTable c
ON c.id = tee.c_id
WHERE
tee.exe_id = $exeId AND q.c_id = c.id";
tee.exe_id = $exeId";
$sqlResult = Database::query($sql);
if (Database::num_rows($sqlResult)) {
@ -1752,25 +1750,18 @@ HOTSPOT;
/**
* Validates the time control key.
*
* @param int $exercise_id
* @param int $lp_id
* @param int $lp_item_id
* @param Exercise $exercise
* @param int $lp_id
* @param int $lp_item_id
*
* @return bool
*/
public static function exercise_time_control_is_valid(
$exercise_id,
$lp_id = 0,
$lp_item_id = 0
) {
$course_id = api_get_course_int_id();
$exercise_id = (int) $exercise_id;
$table = Database::get_course_table(TABLE_QUIZ_TEST);
$sql = "SELECT expired_time FROM $table
WHERE c_id = $course_id AND iid = $exercise_id";
$result = Database::query($sql);
$row = Database::fetch_array($result, 'ASSOC');
if (!empty($row['expired_time'])) {
public static function exercise_time_control_is_valid(Exercise $exercise, $lp_id = 0, $lp_item_id = 0)
{
$exercise_id = $exercise->getId();
$expiredTime = $exercise->expired_time;
if (!empty($expiredTime)) {
$current_expired_time_key = self::get_time_control_key(
$exercise_id,
$lp_id,
@ -2128,8 +2119,7 @@ HOTSPOT;
ON (user.user_id = exe_user_id)
WHERE
te.c_id = $course_id $session_id_and AND
ce.active <> -1 AND
ce.c_id = $course_id
ce.active <> -1
$exercise_where
$extra_where_conditions
";
@ -5641,9 +5631,9 @@ EOT;
$sql = "SELECT q.question, question_id, count(q.iid) count
FROM $attemptTable t
INNER JOIN $questionTable q
ON (q.c_id = t.c_id AND q.iid = t.question_id)
ON (q.iid = t.question_id)
INNER JOIN $trackTable te
ON (te.c_id = q.c_id AND t.exe_id = te.exe_id)
ON (t.exe_id = te.exe_id)
WHERE
t.c_id = $courseId AND
t.marks != q.ponderation AND

@ -662,6 +662,7 @@ class GroupManager
$table_forum = Database::get_course_table(TABLE_FORUM);
$categoryId = (int) $categoryId;
$group_id = (int) $group_id;
$forumState = (int) $forumState;
$repo = Container::getGroupRepository();
/** @var CGroup $group */
@ -692,7 +693,6 @@ class GroupManager
/* Here we are updating a field in the table forum_forum that perhaps
duplicates the table group_info.forum_state cvargas*/
$forumState = (int) $forumState;
$sql2 = "UPDATE $table_forum SET ";
if (1 === $forumState) {
$sql2 .= " forum_group_public_private='public' ";

@ -7,7 +7,6 @@ declare(strict_types=1);
namespace Chamilo\CourseBundle\Entity;
use Chamilo\CoreBundle\Entity\AbstractResource;
use Chamilo\CoreBundle\Entity\Course;
use Chamilo\CoreBundle\Entity\ResourceInterface;
use Chamilo\CourseBundle\Traits\ShowCourseResourcesInSessionTrait;
use DateTime;
@ -387,9 +386,6 @@ class CQuiz extends AbstractResource implements ResourceInterface
return $this->accessCondition;
}
/**
* Set maxAttempt.
*/
public function setMaxAttempt(int $maxAttempt): self
{
$this->maxAttempt = $maxAttempt;
@ -407,7 +403,7 @@ class CQuiz extends AbstractResource implements ResourceInterface
return $this->maxAttempt;
}
public function setStartTime(?DateTime $startTime) : self
public function setStartTime(?DateTime $startTime): self
{
$this->startTime = $startTime;

Loading…
Cancel
Save