Skip to content

Commit

Permalink
MDL-16177 Moving to admin folder
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolasconnault committed Aug 23, 2008
1 parent fb946d0 commit db1d500
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions generator.php → admin/generator.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

require_once('config.php');
require_once('../config.php');
/**
* SCRIPT CONFIGURATION
*/
Expand All @@ -24,8 +24,8 @@
$settings['number-of-modules'] = 50;
$settings['questions-per-course'] = 20;
$settings['questions-per-quiz'] = 5;
$settings['discussion-per-forum'] = 5;
$settings['posts-per-forum-discussion'] = 15;
$settings['discussions-per-forum'] = 5;
$settings['posts-per-discussion'] = 15;
$settings['entries-per-glossary'] = 1;
$settings['assignment-grades'] = true;
$settings['quiz-grades'] = true;
Expand Down Expand Up @@ -94,7 +94,7 @@
'help' => 'The number of questions to assign to each quiz. Default=5', 'type'=>'NUMBER', 'default' => 5),
array('short'=>'df', 'long' => 'discussions-per-forum',
'help' => 'The number of discussions to generate for each forum. Default=5', 'type'=>'NUMBER', 'default' => 5),
array('short'=>'pd', 'long' => 'posts-per-forum-discussion',
array('short'=>'pd', 'long' => 'posts-per-discussion',
'help' => 'The number of posts to generate for each forum discussion. Default=15', 'type'=>'NUMBER', 'default' => 15),
);

Expand Down Expand Up @@ -819,7 +819,7 @@ function definition_after_data() {
*/
if (in_array('forum', $settings['modules-list']) &&
$settings['discussions-per-forum'] &&
$settings['posts-per-forum-discussion']) {
$settings['posts-per-discussion']) {

$discussions_count = 0;
$posts_count = 0;
Expand Down Expand Up @@ -852,7 +852,7 @@ function definition_after_data() {
// Add posts to this discussion
$post_ids = array($discussion->firstpost);

for ($j = 0; $j < $settings['posts-per-forum-discussion']; $j++) {
for ($j = 0; $j < $settings['posts-per-discussion']; $j++) {
$global_user = clone($USER);
$user_id = $forum_users[array_rand($forum_users)];
$USER = $DB->get_record('user', array('id' => $user_id));
Expand Down

0 comments on commit db1d500

Please sign in to comment.