Some fixes in the dummy content creation see #5197

skala
Julio Montoya 13 years ago
parent a8133a1b18
commit ea1c92bb50
  1. 2
      main/coursecopy/classes/DummyCourseCreator.class.php
  2. 2
      main/coursecopy/classes/Event.class.php
  3. 3
      main/coursecopy/classes/ForumTopic.class.php

@ -227,7 +227,7 @@ class DummyCourseCreator
// create forums
for ($forum_id = 1; $forum_id <= $number_of_forums; $forum_id ++)
{
$forum = new Forum($forum_id, $this->get_dummy_content('title'),$this->get_dummy_content('description') , rand(1, $number_of_categories), $last_forum_post[$forum_id]);
$forum = new Forum($forum_id, $this->get_dummy_content('title'),$this->get_dummy_content('description'), rand(1, $number_of_categories), $last_forum_post[$forum_id]);
$this->course->add_resource($forum);
}
}

@ -60,7 +60,7 @@ class Event extends Resource
* @param string $hour
* @param int $duration
*/
function Event($id,$title,$content,$start_date,$end_date, $attachment_path, $attachment_filename, $attachment_size, $attachment_comment) {
function Event($id,$title,$content,$start_date,$end_date, $attachment_path = null, $attachment_filename= null, $attachment_size= null, $attachment_comment= null) {
parent::Resource($id,RESOURCE_EVENT);
$this->title = $title;

@ -78,7 +78,7 @@ class ForumTopic extends Resource
/**
* Create a new ForumTopic
*/
function ForumTopic($id, $title, $time, $topic_poster_id, $topic_poster_name, $forum_id, $last_post, $replies, $views, $sticky, $locked, $time_closed, $weight, $title_qualify, $qualify_max)
function ForumTopic($id, $title, $time, $topic_poster_id, $topic_poster_name, $forum_id, $last_post, $replies, $views = 0, $sticky = 0, $locked = 0, $time_closed = null, $weight = 0, $title_qualify = null, $qualify_max = 0)
{
parent::Resource($id, RESOURCE_FORUMTOPIC);
$this->title = $title;
@ -96,6 +96,7 @@ class ForumTopic extends Resource
$this->title_qualify = $title_qualify;
$this->qualify_max = $qualify_max;
}
/**
* Show this resource
*/

Loading…
Cancel
Save