Minor - format code.

1.10.x
Julio Montoya 9 years ago
parent 6c6f6b9b88
commit b801eefb6c
  1. 37
      main/coursecopy/classes/CourseSelectForm.class.php
  2. 111
      main/coursecopy/classes/Event.class.php
  3. 10
      main/inc/lib/nanogong.lib.php

@ -19,24 +19,24 @@ class CourseSelectForm
static function display_form($course, $hidden_fields = null, $avoid_serialize = false)
{
global $charset;
$resource_titles[RESOURCE_EVENT] = get_lang('Events');
$resource_titles[RESOURCE_ANNOUNCEMENT] = get_lang('Announcements');
$resource_titles[RESOURCE_DOCUMENT] = get_lang('Documents');
$resource_titles[RESOURCE_LINK] = get_lang('Links');
$resource_titles[RESOURCE_COURSEDESCRIPTION] = get_lang('CourseDescription');
$resource_titles[RESOURCE_FORUM] = get_lang('Forums');
$resource_titles[RESOURCE_FORUMCATEGORY] = get_lang('ForumCategory');
$resource_titles[RESOURCE_QUIZ] = get_lang('Tests');
$resource_titles[RESOURCE_TEST_CATEGORY] = get_lang('QuestionCategory');
$resource_titles[RESOURCE_LEARNPATH] = get_lang('ToolLearnpath');
$resource_titles[RESOURCE_SCORM] = 'SCORM';
$resource_titles[RESOURCE_TOOL_INTRO] = get_lang('ToolIntro');
$resource_titles[RESOURCE_SURVEY] = get_lang('Survey');
$resource_titles[RESOURCE_GLOSSARY] = get_lang('Glossary');
$resource_titles[RESOURCE_WIKI] = get_lang('Wiki');
$resource_titles[RESOURCE_THEMATIC] = get_lang('Thematic');
$resource_titles[RESOURCE_ATTENDANCE] = get_lang('Attendance');
$resource_titles[RESOURCE_WORK] = get_lang('ToolStudentPublication');
$resource_titles[RESOURCE_EVENT] = get_lang('Events');
$resource_titles[RESOURCE_ANNOUNCEMENT] = get_lang('Announcements');
$resource_titles[RESOURCE_DOCUMENT] = get_lang('Documents');
$resource_titles[RESOURCE_LINK] = get_lang('Links');
$resource_titles[RESOURCE_COURSEDESCRIPTION] = get_lang('CourseDescription');
$resource_titles[RESOURCE_FORUM] = get_lang('Forums');
$resource_titles[RESOURCE_FORUMCATEGORY] = get_lang('ForumCategory');
$resource_titles[RESOURCE_QUIZ] = get_lang('Tests');
$resource_titles[RESOURCE_TEST_CATEGORY] = get_lang('QuestionCategory');
$resource_titles[RESOURCE_LEARNPATH] = get_lang('ToolLearnpath');
$resource_titles[RESOURCE_SCORM] = 'SCORM';
$resource_titles[RESOURCE_TOOL_INTRO] = get_lang('ToolIntro');
$resource_titles[RESOURCE_SURVEY] = get_lang('Survey');
$resource_titles[RESOURCE_GLOSSARY] = get_lang('Glossary');
$resource_titles[RESOURCE_WIKI] = get_lang('Wiki');
$resource_titles[RESOURCE_THEMATIC] = get_lang('Thematic');
$resource_titles[RESOURCE_ATTENDANCE] = get_lang('Attendance');
$resource_titles[RESOURCE_WORK] = get_lang('ToolStudentPublication');
?>
<script>
function exp(item) {
@ -401,7 +401,6 @@ class CourseSelectForm
/* Searching the documents resource that have been set to null because
$avoid_serialize is true in the display_form() function*/
if ($from == 'copy_course') {
if (is_array($resource)) {
$resource = array_keys($resource);

@ -10,53 +10,63 @@ require_once 'Resource.class.php';
*/
class CalendarEvent extends Resource
{
/**
* The title
*/
public $title;
/**
* The content
*/
public $content;
/**
* The start date
*/
public $start_date;
/**
* The end date
*/
public $end_date;
/**
* The attachment path
*/
public $attachment_path;
/**
* The title
*/
public $title;
/**
* The content
*/
public $content;
/**
* The start date
*/
public $start_date;
/**
* The end date
*/
public $end_date;
/**
* The attachment path
*/
public $attachment_path;
/**
* The attachment filename
*/
public $attachment_filename;
/**
* The attachment size
*/
public $attachment_size;
/**
* The attachment filename
*/
public $attachment_filename;
/**
* The attachment size
*/
public $attachment_size;
/**
* The attachment comment
*/
public $attachment_comment;
/**
* The attachment comment
*/
public $attachment_comment;
/**
* Create a new Event
* @param int $id
* @param string $title
* @param string $content
* @param string $date
* @param string $hour
* @param int $duration
*/
function __construct($id, $title, $content, $start_date, $end_date, $attachment_path = null, $attachment_filename= null, $attachment_size= null, $attachment_comment= null, $all_day = 0)
{
/**
* Create a new Event
* @param int $id
* @param string $title
* @param string $content
* @param string $date
* @param string $hour
* @param int $duration
*/
public function __construct(
$id,
$title,
$content,
$start_date,
$end_date,
$attachment_path = null,
$attachment_filename = null,
$attachment_size = null,
$attachment_comment = null,
$all_day = 0
) {
parent::__construct($id, RESOURCE_EVENT);
$this->title = $title;
@ -71,11 +81,12 @@ class CalendarEvent extends Resource
$this->attachment_comment = $attachment_comment;
}
/**
* Show this Event
*/
function show() {
parent::show();
echo $this->title.' ('.$this->start_date.' -> '.$this->end_date.')';
}
/**
* Show this Event
*/
function show()
{
parent::show();
echo $this->title.' ('.$this->start_date.' -> '.$this->end_date.')';
}
}

@ -19,6 +19,12 @@ class Nanogong
public $store_path;
public $params;
public $can_edit = false;
public $course_id;
public $session_id;
public $exercise_id;
public $question_id;
public $user_id;
public $course_info;
/* Files allowed to upload */
public $available_extensions = array('mp3', 'wav', 'ogg');
@ -113,7 +119,7 @@ class Nanogong
$this->question_id = 0;
}
$this->can_edit = false;
$this->can_edit = false;
if (api_is_allowed_to_edit()) {
$this->can_edit = true;
@ -123,7 +129,7 @@ class Nanogong
}
}
//Settings the params array
// Settings the params array
$this->params = $params;
$this->store_path = api_get_path(SYS_COURSE_PATH).$this->course_info['path'].'/exercises/';
$this->create_user_folder();

Loading…
Cancel
Save