Minor - format code

pull/3984/head
Julio 4 years ago
parent 3c8ec767b1
commit 4a78d4544e
  1. 6
      public/main/exercise/question.class.php
  2. 2
      src/CoreBundle/Entity/SessionCategory.php
  3. 16
      src/CoreBundle/Entity/User.php

@ -591,8 +591,7 @@ abstract class Question
$position = $this->position;
//$exerciseEntity = $exerciseRepo->find($exerciseId);
$question = new CQuizQuestion();
$question
$question = (new CQuizQuestion())
->setQuestion($this->question)
->setDescription($this->description)
->setPonderation($this->weighting)
@ -1054,8 +1053,7 @@ abstract class Question
$em = Database::getManager();
$courseEntity = api_get_course_entity($course_id);
$question = new CQuizQuestion();
$question
$question = (new CQuizQuestion())
->setQuestion($questionText)
->setDescription($description)
->setPonderation($this->weighting)

@ -15,8 +15,6 @@ use Symfony\Component\Serializer\Annotation\Groups;
use Symfony\Component\Validator\Constraints as Assert;
/**
* SessionCategory.
*
* @ApiResource(
* attributes={"security"="is_granted('ROLE_ADMIN')"},
* normalizationContext={"groups"={"session_category:read"}, "swagger_definition_name"="Read"},

@ -1057,22 +1057,6 @@ class User implements UserInterface, EquatableInterface, ResourceInterface, Reso
return $this;
}
public function getLps(): void
{
//return $this->lps;
/*$criteria = Criteria::create()
->where(Criteria::expr()->eq("id", "666"))
//->orderBy(array("username" => "ASC"))
//->setFirstResult(0)
//->setMaxResults(20)
;
$lps = $this->lps->matching($criteria);*/
/*return $this->lps->filter(
function($entry) use ($idsToFilter) {
return $entry->getId() == 1;
});*/
}
/**
* Returns the list of classes for the user.
*/

Loading…
Cancel
Save