Minor - format code

pull/2539/head
jmontoyaa 8 years ago
parent 1297b3df9b
commit a8fa5a20f2
  1. 3
      main/lp/lp_content.php
  2. 1
      main/session/about.php
  3. 2
      src/Chamilo/CourseBundle/Component/CourseCopy/Course.php
  4. 44
      src/Chamilo/CourseBundle/Component/CourseCopy/CourseRestorer.php
  5. 2
      src/Chamilo/CourseBundle/Component/CourseCopy/Resources/Asset.php
  6. 1
      src/Chamilo/CourseBundle/Component/CourseCopy/Resources/CalendarEvent.php
  7. 1
      src/Chamilo/CourseBundle/Component/CourseCopy/Resources/CourseCopyTestCategory.php
  8. 5
      src/Chamilo/CourseBundle/Component/CourseCopy/Resources/CourseDescription.php
  9. 11
      src/Chamilo/CourseBundle/Component/CourseCopy/Resources/Resource.php
  10. 2
      src/Chamilo/CourseBundle/Component/CourseCopy/Resources/SurveyQuestion.php

@ -56,15 +56,12 @@ if ($dir) {
case 1:
$learnPath->stop_previous_item();
$prerequisiteCheck = $learnPath->prerequisites_match($lpItemId);
if ($prerequisiteCheck === true) {
$src = $learnPath->get_link('http', $lpItemId);
$learnPath->start_current_item(); // starts time counter manually if asset
$src = $learnPath->fixBlockedLinks($src);
break;
}
$src = 'blank.php?error=prerequisites&prerequisite_message='.$learnPath->error;
break;
case 2:

@ -49,7 +49,6 @@ $userValues = new ExtraFieldValue('user');
$sessionValues = new ExtraFieldValue('session');
foreach ($sessionCourses as $sessionCourse) {
$courseTags = [];
if (!is_null($tagField)) {

@ -60,7 +60,7 @@ class Course
/**
* Add a resource from a given type to this course.
*
* @param Resource $resource
* @param $resource
*/
public function add_resource(&$resource)
{

@ -3547,6 +3547,28 @@ class CourseRestorer
return \GroupManager::get_group_properties($groupId);
}
/**
* @param string $documentPath
* @param string $webEditorCss
*/
public function fixEditorHtmlContent($documentPath, $webEditorCss = '')
{
$extension = pathinfo(basename($documentPath), PATHINFO_EXTENSION);
switch ($extension) {
case 'html':
case 'htm':
$contents = file_get_contents($documentPath);
$contents = str_replace(
'{{css_editor}}',
$webEditorCss,
$contents
);
file_put_contents($documentPath, $contents);
break;
}
}
/**
* Check if user exist otherwise use current user.
*
@ -3574,26 +3596,4 @@ class CourseRestorer
return $userId;
}
/**
* @param string $documentPath
* @param string $webEditorCss
*/
public function fixEditorHtmlContent($documentPath, $webEditorCss = '')
{
$extension = pathinfo(basename($documentPath), PATHINFO_EXTENSION);
switch ($extension) {
case 'html':
case 'htm':
$contents = file_get_contents($documentPath);
$contents = str_replace(
'{{css_editor}}',
$webEditorCss,
$contents
);
file_put_contents($documentPath, $contents);
break;
}
}
}

@ -19,7 +19,7 @@ class Asset extends Resource
*
* @param int $id
* @param int $path
* @param $title
* @param string $title
*/
public function __construct($id, $path, $title)
{

@ -73,7 +73,6 @@ class CalendarEvent extends Resource
$this->start_date = $start_date;
$this->end_date = $end_date;
$this->all_day = $all_day;
$this->attachment_path = $attachment_path;
$this->attachment_filename = $attachment_filename;
$this->attachment_size = $attachment_size;

@ -25,6 +25,7 @@ class CourseCopyTestCategory extends Resource
/**
* Create a new TestCategory.
*
* @param int $id
* @param string $title
* @param string $description
*/

@ -33,13 +33,14 @@ class CourseDescription extends Resource
* @param int $id
* @param string $title
* @param string $content
* @param string $descriptionType
*/
public function __construct($id, $title, $content, $description_type)
public function __construct($id, $title, $content, $descriptionType)
{
parent::__construct($id, RESOURCE_COURSEDESCRIPTION);
$this->title = $title;
$this->content = $content;
$this->description_type = $description_type;
$this->description_type = $descriptionType;
}
/**

@ -145,12 +145,15 @@ class Resource
case RESOURCE_ANNOUNCEMENT:
return TOOL_ANNOUNCEMENT;
case RESOURCE_FORUMCATEGORY:
return 'forum_category'; // Ivan, 29-AUG-2009: A constant like TOOL_FORUM_CATEGORY is missing in main_api.lib.php. Such a constant has been defined in the forum tool for local needs.
// Ivan, 29-AUG-2009: A constant like TOOL_FORUM_CATEGORY is missing in main_api.lib.php.
// Such a constant has been defined in the forum tool for local needs.
return 'forum_category';
case RESOURCE_FORUM:
return TOOL_FORUM;
case RESOURCE_FORUMTOPIC:
if ($for_item_property_table) {
return 'forum_thread'; // Ivan, 29-AUG-2009: A hardcoded value that the "Forums" tool stores in the item property table.
// Ivan, 29-AUG-2009: A hardcoded value that the "Forums" tool stores in the item property table.
return 'forum_thread';
}
return TOOL_THREAD;
@ -200,9 +203,9 @@ class Resource
}
/**
* Check if this resource is allready restored in the destination course.
* Check if this resource is already restored in the destination course.
*
* @return bool true if allready restored (i.e. destination_id is set).
* @return bool true if already restored (i.e. destination_id is set).
*/
public function is_restored()
{

@ -64,7 +64,7 @@ class SurveyQuestion extends Resource
* @param int $sort
* @param int $shared_question_id
* @param int $max_value
* @param int $is_required
* @param bool $is_required
*/
public function __construct(
$id,

Loading…
Cancel
Save