Minor - flint fixes

pull/2624/head
Julio Montoya 7 years ago
parent c6991d1984
commit 979186807e
  1. 2
      main/auth/inscription.php
  2. 70
      main/inc/lib/course.lib.php
  3. 2
      main/inc/lib/skill.lib.php
  4. 1
      plugin/bbb/lang/french.php
  5. 1
      plugin/bbb/lang/german.php
  6. 1
      plugin/bbb/lang/spanish.php
  7. 2
      src/Chamilo/UserBundle/Entity/User.php

@ -888,7 +888,7 @@ if ($form->validate()) {
$cond_array = explode(':', $values['legal_accept_type']);
if (!empty($cond_array[0]) && !empty($cond_array[1])) {
$time = time();
$conditionToSave = (int) $cond_array[0].':'. (int) $cond_array[1].':'.$time;
$conditionToSave = (int) $cond_array[0].':'.(int) $cond_array[1].':'.$time;
UserManager::update_extra_field_value(
$user_id,
'legal_accept',

@ -736,10 +736,10 @@ class CourseManager
* @author Hugues Peeters
* @author Roan Embrechts
*
* @param int $user_id the id of the user
* @param string $courseCode the course code
* @param int $status (optional) The user's status in the course
* @param int $userCourseCategoryId The user category in which this subscription will be classified
* @param int $user_id the id of the user
* @param string $courseCode the course code
* @param int $status (optional) The user's status in the course
* @param int $userCourseCategoryId The user category in which this subscription will be classified
* @param bool $checkTeacherPermission
*
* @return false|string true if subscription succeeds, boolean false otherwise
@ -6644,6 +6644,37 @@ class CourseManager
return '';
}
/**
* @param Course $course
*
* @return bool
*/
public static function hasPicture(Course $course)
{
return file_exists(api_get_path(SYS_COURSE_PATH).$course->getDirectory().'/course-pic85x85.png');
}
/**
* Get the course picture path.
*
* @param Course $course
* @param bool $fullSize
*
* @return null|string
*/
public static function getPicturePath(Course $course, $fullSize = false)
{
if (!self::hasPicture($course)) {
return null;
}
if ($fullSize) {
return api_get_path(WEB_COURSE_PATH).$course->getDirectory().'/course-pic.png';
}
return api_get_path(WEB_COURSE_PATH).$course->getDirectory().'/course-pic85x85.png';
}
/**
* Check if a specific access-url-related setting is a problem or not.
*
@ -6711,35 +6742,4 @@ class CourseManager
$courseFieldValue = new ExtraFieldValue('course');
$courseFieldValue->saveFieldValues($params);
}
/**
* @param Course $course
*
* @return bool
*/
public static function hasPicture(Course $course)
{
return file_exists(api_get_path(SYS_COURSE_PATH).$course->getDirectory().'/course-pic85x85.png');
}
/**
* Get the course picture path.
*
* @param Course $course
* @param bool $fullSize
*
* @return null|string
*/
public static function getPicturePath(Course $course, $fullSize = false)
{
if (!self::hasPicture($course)) {
return null;
}
if ($fullSize) {
return api_get_path(WEB_COURSE_PATH).$course->getDirectory().'/course-pic.png';
}
return api_get_path(WEB_COURSE_PATH).$course->getDirectory().'/course-pic85x85.png';
}
}

@ -2877,14 +2877,12 @@ class Skill extends Model
}
/**
*
* Get the icon (badge image) URL.
*
* @param SkillEntity $skill
* @param bool $getSmall Optional. Allow get the small image
*
* @return string
*
*/
public static function getWebIconPath(SkillEntity $skill, $getSmall = false)
{

@ -72,4 +72,3 @@ $strings['ParticipantsWillUseSameInterface'] = 'Les apprenants utiliseront la m
$strings['SetByDefault'] = 'Lancement de l\'interface par défaut';
$strings['SetByTeacher'] = 'Choisi par le professeur';
$strings['SetByStudent'] = 'Choisi par l\'apprenant';

@ -72,4 +72,3 @@ $strings['ParticipantsWillUseSameInterface'] = 'Die Teilnehmer verwenden dieselb
$strings['SetByDefault'] = 'Auf die Standardbenutzeroberfläche einstellen';
$strings['SetByTeacher'] = 'Set von Lehrer';
$strings['SetByStudent'] = 'Set von Teilnehmer';

@ -72,4 +72,3 @@ $strings['ParticipantsWillUseSameInterface'] = 'Los participantes usarán la mis
$strings['SetByDefault'] = 'Lanzamiento con la interfaz por defecto';
$strings['SetByTeacher'] = 'Elegido por el profesor';
$strings['SetByStudent'] = 'Elegido por el alumno';

@ -285,7 +285,7 @@ class User implements UserInterface //implements ParticipantInterface, ThemeUser
/**
* @var ArrayCollection
* ORM\OneToMany(targetEntity="Chamilo\CoreBundle\Entity\UserFieldValues", mappedBy="user", orphanRemoval=true, cascade={"persist"})
* ORM\OneToMany(targetEntity="Chamilo\CoreBundle\Entity\UserFieldValues", mappedBy="user", orphanRemoval=true, cascade={"persist"})
*/
protected $extraFields;

Loading…
Cancel
Save