Minor - Flint fixes

pull/3183/head
Julio Montoya 5 years ago
parent 17cec3d963
commit eaafaa2fa7
  1. 3
      main/dropbox/dropbox_download.php
  2. 7
      main/inc/lib/api.lib.php
  3. 8
      main/inc/lib/usergroup.lib.php
  4. 4
      main/inc/lib/usermanager.lib.php
  5. 3
      main/inc/lib/webservices/Rest.php
  6. 30
      plugin/grading_electronic/generate.php
  7. 6
      src/Chamilo/CourseBundle/Entity/CItemProperty.php
  8. 1
      src/Chamilo/FaqBundle/Entity/Question.php

@ -19,9 +19,6 @@ if (isset($_GET['cat_id']) &&
isset($_GET['sent_received']) isset($_GET['sent_received'])
) { ) {
/** step 1: constructing the sql statement. /** step 1: constructing the sql statement.
Due to the nature off the classes of the dropbox the categories for sent files are stored in the table
dropbox_file while the categories for the received files are stored in dropbox_post.
It would have been more elegant if these could be stored in dropbox_person (which stores the link file-person)
Therefore we have to create to separate sql statements to find which files are in the category Therefore we have to create to separate sql statements to find which files are in the category
(depending if we zip-download a sent category or a received category)*/ (depending if we zip-download a sent category or a received category)*/
if ($_GET['sent_received'] == 'sent') { if ($_GET['sent_received'] == 'sent') {

@ -6476,10 +6476,11 @@ function api_request_uri()
return $uri; return $uri;
} }
/** Gets the current access_url id of the Chamilo Platform /**
* @author Julio Montoya <gugli100@gmail.com> * Gets the current access_url id of the Chamilo Platform.
*
* @return int access_url_id of the current Chamilo Installation * @return int access_url_id of the current Chamilo Installation
*@author Julio Montoya <gugli100@gmail.com>
*
*/ */
function api_get_current_access_url_id() function api_get_current_access_url_id()
{ {

@ -2237,7 +2237,9 @@ class UserGroup extends Model
return $array; return $array;
} }
/** Gets the inner join of users and group table /**
* Gets the inner join of users and group table.
*
* @param int quantity of records * @param int quantity of records
* @param bool show groups with image or not * @param bool show groups with image or not
* *
@ -2301,7 +2303,9 @@ class UserGroup extends Model
return $array; return $array;
} }
/** Gets the last groups created /**
* Gets the last groups created.
*
* @param int $num quantity of records * @param int $num quantity of records
* @param bool $withImage show groups with image or not * @param bool $withImage show groups with image or not
* *

@ -3043,7 +3043,9 @@ class UserManager
return $extra_data; return $extra_data;
} }
/** Get extra user data by field /**
* Get extra user data by field.
*
* @param int user ID * @param int user ID
* @param string the internal variable name of the field * @param string the internal variable name of the field
* *

@ -162,7 +162,8 @@ class Rest extends WebService
$this->course = $course; $this->course = $course;
} }
/** Set the current session /**
* Set the current session.
* *
* @param int $id * @param int $id
* *

@ -98,9 +98,7 @@ try {
/** @var \Category $gradebook */ /** @var \Category $gradebook */
$gradebook = $cats[0]; $gradebook = $cats[0];
/** @var \ExerciseLink $exerciseLink */ /** @var \ExerciseLink $exerciseLink */
/** commented until we get clear understanding of how to use the dates refs BT#12404 /** commented until we get clear understanding of how to use the dates refs BT#12404.
$exerciseLink = $gradebook->get_links()[0];
$exerciseId = $exerciseLink->get_ref_id();
$exerciseInfo = ExerciseLib::get_exercise_by_id($exerciseId, $course->getId()); $exerciseInfo = ExerciseLib::get_exercise_by_id($exerciseId, $course->getId());
*/ */
$dateStart = new DateTime($values['range_start'].' 00:00:00', new DateTimeZone('UTC')); $dateStart = new DateTime($values['range_start'].' 00:00:00', new DateTimeZone('UTC'));
@ -124,24 +122,7 @@ try {
if (!$userFinishedCourse) { if (!$userFinishedCourse) {
continue; continue;
} }
/** commented until we get clear understanding of how to use the dates refs BT#12404 /** commented until we get clear understanding of how to use the dates refs BT#12404.
$exerciseResult = Event::get_best_exercise_results_by_user(
$exerciseId,
$course->getId(),
$session ? $session->getId() : 0,
$student->getId()
);
$exerciseResult = current($exerciseResult);
if (!$exerciseResult) {
continue;
}
$attemptDate = new DateTime($exerciseResult['exe_date'], new DateTimeZone('UTC'));
$dateIsRange = $attemptDate >= $dateStart && $attemptDate <= $dateEnd;
if (!$dateEnd) {
continue;
} }
*/ */
$fieldStudent = $uFieldValue->get_values_by_handler_and_field_variable( $fieldStudent = $uFieldValue->get_values_by_handler_and_field_variable(
@ -155,12 +136,7 @@ try {
SCORE_SIMPLE SCORE_SIMPLE
); );
/** old method to get the score /** old method to get the score.
$score = Category::getCurrentScore(
$student->getId(),
$gradebook,
true
); );
*/ */
$fileData[] = sprintf( $fileData[] = sprintf(

@ -31,13 +31,13 @@ class CItemProperty
*/ */
protected $id; protected $id;
/** //, inversedBy="users", /** //, inversedBy="users",.
* @ORM\ManyToOne(targetEntity="Chamilo\CoreBundle\Entity\Course", cascade={"persist"}) * @ORM\ManyToOne(targetEntity="Chamilo\CoreBundle\Entity\Course", cascade={"persist"})
* @ORM\JoinColumn(name="c_id", referencedColumnName="id") * @ORM\JoinColumn(name="c_id", referencedColumnName="id")
*/ */
protected $course; protected $course;
/** //, inversedBy="users", /** //, inversedBy="users",.
* @ORM\ManyToOne(targetEntity="Chamilo\CourseBundle\Entity\CGroupInfo", cascade={"persist"}) * @ORM\ManyToOne(targetEntity="Chamilo\CourseBundle\Entity\CGroupInfo", cascade={"persist"})
* @ORM\JoinColumn(name="to_group_id", referencedColumnName="iid") * @ORM\JoinColumn(name="to_group_id", referencedColumnName="iid")
*/ */
@ -55,7 +55,7 @@ class CItemProperty
*/ */
protected $insertUser; protected $insertUser;
/** //, inversedBy="users", /** //, inversedBy="users",.
* @ORM\ManyToOne(targetEntity="Chamilo\CoreBundle\Entity\Session", cascade={"persist"}) * @ORM\ManyToOne(targetEntity="Chamilo\CoreBundle\Entity\Session", cascade={"persist"})
* @ORM\JoinColumn(name="session_id", referencedColumnName="id") * @ORM\JoinColumn(name="session_id", referencedColumnName="id")
*/ */

@ -12,7 +12,6 @@ use Knp\DoctrineBehaviors\Model as ORMBehaviors;
* *
* @ORM\Entity(repositoryClass="Chamilo\FaqBundle\Entity\QuestionRepository") * @ORM\Entity(repositoryClass="Chamilo\FaqBundle\Entity\QuestionRepository")
* @ORM\Table(name="faq_question") * @ORM\Table(name="faq_question")
* *
* *
* @package Chamilo\FaqBundle\Entity * @package Chamilo\FaqBundle\Entity
*/ */

Loading…
Cancel
Save