Explorar el Código

Minor - format code

jmontoyaa hace 8 años
padre
commit
fc0280722b

+ 8 - 7
src/Chamilo/CourseBundle/Component/CourseCopy/CourseSelectForm.php

@@ -21,10 +21,14 @@ class CourseSelectForm
      * Display the form
      * @param array $course
      * @param array $hidden_fields Hidden fields to add to the form.
-     * @param boolean $avoid_serialize the document array will be serialize. This is used in the course_copy.php file
+     * @param boolean $avoid_serialize the document array will be serialize.
+     * This is used in the course_copy.php file
      */
-	public static function display_form($course, $hidden_fields = null, $avoid_serialize = false)
-    {
+    public static function display_form(
+        $course,
+        $hidden_fields = null,
+        $avoid_serialize = false
+    ) {
         global $charset;
         $resource_titles[RESOURCE_ASSET] = get_lang('Assets');
         $resource_titles[RESOURCE_GRADEBOOK] = get_lang('Gradebook');
@@ -142,7 +146,7 @@ class CourseSelectForm
 		</script>
 		<?php
 		// get destination course title
-		if (!empty($hidden_fields['destination_course'])) {
+        if (!empty($hidden_fields['destination_course'])) {
             $sessionTitle = !empty($hidden_fields['destination_session']) ? ' ('.api_get_session_name($hidden_fields['destination_session']).')' : null;
             $course_infos = CourseManager::get_course_information($hidden_fields['destination_course']);
 			echo '<h3>';
@@ -259,11 +263,9 @@ class CourseSelectForm
             foreach ($forum_categories as $forum_category_id => $forum_category) {
                 echo '<li>';
                 echo '<label class="checkbox">';
-
                 echo '<input type="checkbox" id="resource_'.RESOURCE_FORUMCATEGORY.'_'.$forum_category_id.'" my_rel="'.$forum_category_id.'" onclick="javascript:check_category(this);"  name="resource['.RESOURCE_FORUMCATEGORY.']['.$forum_category_id.']"  /> ';
                 $forum_category->show();
                 echo '</label>';
-
                 echo '</li>';
 
                 if (isset($forums[$forum_category_id])) {
@@ -394,7 +396,6 @@ class CourseSelectForm
 	public static function get_posted_course($from = '', $session_id = 0, $course_code = '')
     {
         $course = null;
-
         if (isset($_POST['course'])) {
             $course = Course::unserialize(base64_decode($_POST['course']));
         } else {

+ 3 - 4
src/Chamilo/CourseBundle/Component/CourseCopy/Resources/Announcement.php

@@ -66,11 +66,10 @@ class Announcement extends Resource
         $this->date = $date;
         $this->display_order = $display_order;
         $this->email_sent = $email_sent;
-
-        $this->attachment_path 	= $path;
+        $this->attachment_path = $path;
         $this->attachment_filename = $filename;
-        $this->attachment_size 	= $size;
-        $this->attachment_comment 	= $comment;
+        $this->attachment_size = $size;
+        $this->attachment_comment = $comment;
     }
 
     /**

+ 11 - 11
src/Chamilo/CourseBundle/Component/CourseCopy/Resources/CalendarEvent.php

@@ -63,19 +63,19 @@ class CalendarEvent extends Resource
         $attachment_comment = null,
         $all_day = 0
     ) {
-		parent::__construct($id, RESOURCE_EVENT);
+        parent::__construct($id, RESOURCE_EVENT);
 
-		$this->title = $title;
-		$this->content = $content;
-		$this->start_date = $start_date;
-		$this->end_date = $end_date;
-		$this->all_day = $all_day;
+        $this->title = $title;
+        $this->content = $content;
+        $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;
-		$this->attachment_comment = $attachment_comment;
-	}
+        $this->attachment_path = $attachment_path;
+        $this->attachment_filename = $attachment_filename;
+        $this->attachment_size = $attachment_size;
+        $this->attachment_comment = $attachment_comment;
+    }
 
     /**
      * Show this Event

+ 111 - 112
src/Chamilo/CourseBundle/Component/CourseCopy/Resources/CourseCopyLearnpath.php

@@ -84,120 +84,119 @@ class CourseCopyLearnpath extends Resource
      */
     public $author;
 
-	/**
-	 * Author's image
-	 */
-	public $preview_image;
-
-	/**
-	 * Create a new learnpath
-	 * @param integer ID
-	 * @param integer Type (1,2,3,...)
-	 * @param string $name
-	 * @param string $path
-	 * @param string $ref
-	 * @param string $description
-	 * @param string $content_local
-	 * @param string $default_encoding
-	 * @param string $default_view_mode
-	 * @param bool   $prevent_reinit
-	 * @param bool   $force_commit
-	 * @param string $content_maker
-	 * @param integer $display_order
-	 * @param string $js_lib
-	 * @param string $content_license
-	 * @param integer $debug
-	 * @param string $visibility
-	 * @param array  $items
-	 */
-	public function __construct(
-		$id,
-		$type,
-		$name,
-		$path,
-		$ref,
-		$description,
-		$content_local,
-		$default_encoding,
-		$default_view_mode,
-		$prevent_reinit,
-		$force_commit,
-		$content_maker,
-		$display_order,
-		$js_lib,
-		$content_license,
-		$debug,
-		$visibility,
-		$author,
-		$preview_image,
-		$use_max_score,
-		$autolaunch,
-		$created_on,
-		$modified_on,
-		$publicated_on,
-		$expired_on,
-		$session_id,
-		$items
-	) {
-		parent::__construct($id, RESOURCE_LEARNPATH);
-		$this->lp_type = $type;
-		$this->name = $name;
-		$this->path = $path;
-		$this->ref = $ref;
-		$this->description = $description;
-		$this->content_local = $content_local;
-		$this->default_encoding = $default_encoding;
-		$this->default_view_mod = $default_view_mode;
-		$this->prevent_reinit = $prevent_reinit;
-		$this->force_commit = $force_commit;
-		$this->content_maker = $content_maker;
-		$this->display_order = $display_order;
-		$this->js_lib = $js_lib;
-		$this->content_license = $content_license;
-		$this->debug = $debug;
-		$this->visibility = $visibility;
-
-		$this->use_max_score = $use_max_score;
-		$this->autolaunch = $autolaunch;
-		$this->created_on = $created_on;
-		$this->modified_on = $modified_on;
-		$this->publicated_on = $publicated_on;
-		$this->expired_on = $expired_on;
-		$this->session_id = $session_id;
+    /**
+     * Author's image
+     */
+    public $preview_image;
 
-		$this->author = $author;
-		$this->preview_image = $preview_image;
+    /**
+     * Create a new learnpath
+     * @param integer ID
+     * @param integer Type (1,2,3,...)
+     * @param string $name
+     * @param string $path
+     * @param string $ref
+     * @param string $description
+     * @param string $content_local
+     * @param string $default_encoding
+     * @param string $default_view_mode
+     * @param bool   $prevent_reinit
+     * @param bool   $force_commit
+     * @param string $content_maker
+     * @param integer $display_order
+     * @param string $js_lib
+     * @param string $content_license
+     * @param integer $debug
+     * @param string $visibility
+     * @param array  $items
+     */
+    public function __construct(
+        $id,
+        $type,
+        $name,
+        $path,
+        $ref,
+        $description,
+        $content_local,
+        $default_encoding,
+        $default_view_mode,
+        $prevent_reinit,
+        $force_commit,
+        $content_maker,
+        $display_order,
+        $js_lib,
+        $content_license,
+        $debug,
+        $visibility,
+        $author,
+        $preview_image,
+        $use_max_score,
+        $autolaunch,
+        $created_on,
+        $modified_on,
+        $publicated_on,
+        $expired_on,
+        $session_id,
+        $items
+    ) {
+        parent::__construct($id, RESOURCE_LEARNPATH);
+        $this->lp_type = $type;
+        $this->name = $name;
+        $this->path = $path;
+        $this->ref = $ref;
+        $this->description = $description;
+        $this->content_local = $content_local;
+        $this->default_encoding = $default_encoding;
+        $this->default_view_mod = $default_view_mode;
+        $this->prevent_reinit = $prevent_reinit;
+        $this->force_commit = $force_commit;
+        $this->content_maker = $content_maker;
+        $this->display_order = $display_order;
+        $this->js_lib = $js_lib;
+        $this->content_license = $content_license;
+        $this->debug = $debug;
+        $this->visibility = $visibility;
+        $this->use_max_score = $use_max_score;
+        $this->autolaunch = $autolaunch;
+        $this->created_on = $created_on;
+        $this->modified_on = $modified_on;
+        $this->publicated_on = $publicated_on;
+        $this->expired_on = $expired_on;
+        $this->session_id = $session_id;
+        $this->author = $author;
+        $this->preview_image = $preview_image;
+        $this->items = $items;
+    }
 
-		$this->items = $items;
-	}
-	/**
-	 * Get the items
-	 */
-	function get_items()
-	{
-		return $this->items;
-	}
+    /**
+     * Get the items
+     */
+    function get_items()
+    {
+        return $this->items;
+    }
 
-	/**
-	 * Check if a given resource is used as an item in this chapter
-	 */
-	function has_item($resource)
-	{
-		foreach ($this->items as $item) {
-			if ($item['id'] == $resource->get_id() &&
-				isset($item['type']) && $item['type'] == $resource->get_type()
-			) {
-				return true;
-			}
-		}
-		return false;
-	}
+    /**
+     * Check if a given resource is used as an item in this chapter
+     */
+    function has_item($resource)
+    {
+        foreach ($this->items as $item) {
+            if ($item['id'] == $resource->get_id() &&
+                isset($item['type']) && $item['type'] == $resource->get_type()
+            ) {
+                return true;
+            }
+        }
+        return false;
+    }
 
-	/**
-	 * Show this learnpath
-	 */
-	function show() {
-		parent::show();
-		echo $this->name;
-	}
+    /**
+     * Show this learnpath
+     */
+    function show()
+    {
+        parent::show();
+        echo $this->name;
+    }
 }

+ 1 - 1
src/Chamilo/CourseBundle/Component/CourseCopy/Resources/CourseCopyTestCategory.php

@@ -35,7 +35,7 @@ class CourseCopyTestCategory extends Resource
     /**
      * Show the test_category title, used in the partial recycle_course.php form
      */
-    function show()
+    public function show()
     {
         parent::show();
         echo $this->title;

+ 0 - 1
src/Chamilo/CourseBundle/Component/CourseCopy/Resources/Forum.php

@@ -117,5 +117,4 @@ class Forum extends Resource
         parent::show();
         echo $this->obj->forum_title;
     }
-
 }

+ 8 - 0
src/Chamilo/CourseBundle/Component/CourseCopy/Resources/QuizQuestion.php

@@ -97,6 +97,14 @@ class QuizQuestion extends Resource
 
     /**
      * Add an answer to this QuizQuestion
+     * @param int $answer_id
+     * @param string $answer_text
+     * @param string $correct
+     * @param string $comment
+     * @param string $ponderation
+     * @param string $position
+     * @param string $hotspot_coordinates
+     * @param string $hotspot_type
      */
     public function add_answer(
         $answer_id,

+ 1 - 1
src/Chamilo/CourseBundle/Component/CourseCopy/Resources/ScormDocument.php

@@ -21,7 +21,7 @@ class ScormDocument extends Resource
      */
     public function __construct($id, $path, $title)
     {
-        parent::__construct($id,RESOURCE_SCORM);
+        parent::__construct($id, RESOURCE_SCORM);
         $this->path = 'scorm'.$path;
         $this->title = $title;
     }

+ 1 - 1
src/Chamilo/CourseBundle/Component/CourseCopy/Resources/Survey.php

@@ -80,7 +80,7 @@ class Survey extends Resource
      * @param string $lang
      * @param string $avail_from
      * @param string $avail_till
-     * @param char $is_shared
+     * @param string $is_shared
      * @param string $template
      * @param string $intro
      * @param string $surveythanks

+ 1 - 1
src/Chamilo/CourseBundle/Component/CourseCopy/Resources/SurveyInvitation.php

@@ -33,7 +33,7 @@ class SurveyInvitation extends Resource
 
     /**
      * Create a new SurveyInvitation
-     * @param int	 $id
+     * @param int $id
      * @param string $code
      * @param string $user
      * @param string $invitation_code

+ 6 - 6
src/Chamilo/CourseBundle/Component/CourseCopy/Resources/SurveyQuestion.php

@@ -47,15 +47,15 @@ class SurveyQuestion extends Resource
 
     /**
      * Create a new SurveyQuestion
-     * @param int	 $id
-     * @param int 	 $survey_id
+     * @param int $id
+     * @param int $survey_id
      * @param string $survey_question
      * @param string $survey_question_comment
      * @param string $type
      * @param string $display
-     * @param int	 $sort
-     * @param int	 $shared_question_id
-     * @param int	 $max_value
+     * @param int $sort
+     * @param int $shared_question_id
+     * @param int $max_value
      */
     public function __construct(
         $id,
@@ -83,7 +83,7 @@ class SurveyQuestion extends Resource
     /**
      * Add an answer option to this SurveyQuestion
      * @param string $option_text
-     * @param int	 $sort
+     * @param int $sort
      */
     public function add_answer($option_text,$sort)
     {

+ 1 - 2
src/Chamilo/CourseBundle/Component/CourseCopy/Resources/ToolIntro.php

@@ -35,8 +35,7 @@ class ToolIntro extends Resource
     public function show()
     {
         parent::show();
-        switch ($this->id)
-        {
+        switch ($this->id) {
             case TOOL_DOCUMENT:
                 $lang_id = 'Documents';
                 break;

+ 1 - 1
src/Chamilo/CourseBundle/Component/CourseCopy/Resources/Wiki.php

@@ -47,7 +47,7 @@ class Wiki extends Resource
         $progress,
         $version
     ) {
-        parent::__construct($id,RESOURCE_WIKI);
+        parent::__construct($id, RESOURCE_WIKI);
         $this->id = $id;
         $this->page_id = $page_id;
         $this->reflink = $reflink;