Browse Source

Format code

jmontoya 9 years ago
parent
commit
0547811f7f

+ 18 - 18
main/coursecopy/classes/Forum.class.php

@@ -13,92 +13,92 @@ class Forum extends Coursecopy\Resource
     /**
      * The title
      */
-    var $title;
+    public $title;
 
     /**
      * The description
      */
-    var $description;
+    public $description;
 
     /**
      * Category-id
      */
-    var $category_id;
+    public $category_id;
 
     /**
      * Last post
      */
-    var $last_post;
+    public $last_post;
 
     /**
      * Number of threads
      */
-    var $topics;
+    public $topics;
 
     /**
      * Number of posts
      */
-    var $posts;
+    public $posts;
 
     /**
      * Allow anonimous
      */
-    var $allow_anonymous;
+    public $allow_anonymous;
 
     /**
      * Allow edit
      */
-    var $allow_edit;
+    public $allow_edit;
 
     /**
      * Approval direct post
      */
-    var $approval_direct_post;
+    public $approval_direct_post;
 
     /**
      * Allow attachments
      */
-    var $allow_attachements;
+    public $allow_attachements;
 
     /**
      * Allow new threads
      */
-    var $allow_new_topics;
+    public $allow_new_topics;
 
     /**
      * Default view
      */
-    var $default_view;
+    public $default_view;
 
     /**
      * Group forum
      */
-    var $of_group;
+    public $of_group;
 
     /**
      * Public/private group forum
      */
-    var $group_public_private;
+    public $group_public_private;
 
     /**
      * Order
      */
-    var $order;
+    public $order;
 
     /**
      * Locked or not
      */
-    var $locked;
+    public $locked;
 
     /**
      * Session id
      */
-    var $session_id;
+    public $session_id;
 
     /**
      * Image
      */
-    var $image;
+    public $image;
 
     /**
      * Create a new Forum

+ 0 - 1
main/coursecopy/classes/ForumPost.class.php

@@ -10,7 +10,6 @@ require_once 'Resource.class.php';
  */
 class ForumPost extends Coursecopy\Resource
 {
-
     /**
      * Create a new ForumPost
      */

+ 5 - 3
main/coursecopy/classes/LinkCategory.class.php

@@ -13,15 +13,16 @@ class LinkCategory extends Coursecopy\Resource
 	/**
 	 * The title
 	 */
-	var $title;
+	public $title;
 	/**
 	 * The description
 	 */
-	var $description;
+	public $description;
 	/**
 	 * The display order
 	 */
-	var $display_order;
+	public $display_order;
+
 	/**
 	 * Create a new LinkCategory
 	 * @param int $id
@@ -35,6 +36,7 @@ class LinkCategory extends Coursecopy\Resource
 		$this->description = $description;
 		$this->display_order = $display_order;
 	}
+
 	/**
 	 * Show this LinkCategory
 	 */

+ 6 - 5
main/coursecopy/classes/SurveyInvitation.class.php

@@ -13,23 +13,24 @@ class SurveyInvitation extends Coursecopy\Resource
 	/**
 	 * Survey code
 	 */
-	var $code;
+	public $code;
 	/**
 	 * User info
 	 */
-	var $user;
+	public $user;
 	/**
 	 * Invitation code
 	 */
-	var $invitation_code;
+	public $invitation_code;
 	/**
 	 * Invitation date
 	 */
-	var $invitation_date;
+	public $invitation_date;
 	/**
 	 * Reminder date
 	 */
-	var $reminder_date;
+	public $reminder_date;
+
 	/**
 	 * Create a new SurveyInvitation
 	 * @param	int	 $id

+ 11 - 9
main/coursecopy/classes/SurveyQuestion.class.php

@@ -13,36 +13,38 @@ class SurveyQuestion extends Coursecopy\Resource
 	/**
 	 * Survey ID
 	 */
-	var $survey_id;
+	public $survey_id;
 	/**
 	 * Question and question comment
 	 */
-	var $survey_question;
-	var $survey_question_comment;
+	public $survey_question;
+	public $survey_question_comment;
 	/**
 	 * Question type
 	 */
-	var $survey_question_type;
+	public $survey_question_type;
 	/**
 	 * Display ?
 	 */
-	var $display;
+	public $display;
 	/**
 	 * Sorting order
 	 */
-	var $sort;
+	public $sort;
 	/**
 	 * Shared question ID
 	 */
-	var $shared_question_id;
+	public $shared_question_id;
 	/**
 	 * Maximum value for the vote
 	 */
-	var $max_value;
+	public $max_value;
+
 	/**
 	 * Question's options
 	 */
-	var $options;
+	public $options;
+
 	/**
 	 * Create a new SurveyQuestion
 	 * @param int	 $id

+ 2 - 2
main/coursecopy/classes/ToolIntro.class.php

@@ -10,12 +10,12 @@ require_once 'Resource.class.php';
  */
 class ToolIntro extends Coursecopy\Resource
 {
-	var $id;
+	public $id;
 
 	/**
 	 * intro text
 	 */
-	var $intro_text;
+	public $intro_text;
 
 	/**
 	 * Create a new text introduction

+ 24 - 11
main/coursecopy/classes/wiki.class.php

@@ -9,17 +9,30 @@
  */
 class Wiki extends Coursecopy\Resource
 {
-	var $id;
-	var $page_id;
-	var $reflink;
-	var $title;
-	var $content;
-	var $user_id;
-	var $group_id;
-	var $timestamp;
-	var $progress;
-	var $version;
+	public $id;
+	public $page_id;
+	public $reflink;
+	public $title;
+	public $content;
+	public $user_id;
+	public $group_id;
+	public $timestamp;
+	public $progress;
+	public $version;
 
+	/**
+	 * Wiki constructor.
+	 * @param int $id
+	 * @param int $page_id
+	 * @param $reflink
+	 * @param $title
+	 * @param $content
+	 * @param $user_id
+	 * @param $group_id
+	 * @param $timestamp
+	 * @param $progress
+	 * @param $version
+	 */
 	public function __construct(
 		$id,
 		$page_id,
@@ -45,7 +58,7 @@ class Wiki extends Coursecopy\Resource
         $this->version = $version;
 	}
 
-	function show()
+	public function show()
 	{
 		parent::show();
 		echo $this->reflink.' ('. (empty($this->group_id) ? get_lang('Everyone') : get_lang('Group') . ' ' .  $this->group_id) .') ' . '<i>(' . $this->dtime . ')</i>';

+ 3 - 5
main/coursecopy/copy_course.php

@@ -1,5 +1,6 @@
 <?php
 /* For licensing terms, see /license.txt */
+
 /**
  * @package chamilo.backup
  */
@@ -43,11 +44,8 @@ echo Display::page_header(get_lang('CopyCourse'));
 
 // If a CourseSelectForm is posted or we should copy all resources, then copy them
 if (Security::check_token('post') && (
-        (
-            isset($_POST['action']) &&
-            $_POST['action'] == 'course_select_form') || (
-                isset($_POST['copy_option']) && $_POST['copy_option'] == 'full_copy'
-        )
+        (isset($_POST['action']) && $_POST['action'] == 'course_select_form') ||
+        (isset($_POST['copy_option']) && $_POST['copy_option'] == 'full_copy')
     )
 ) {
     // Clear token