remove old readme
[atutor.git] / docs / themes / default / instructor / groups / create_automatic.tmpl.php
1 <?php global $moduleFactory, $_pages;?>
2 <form method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>" name="form">
3         <div class="input-form">
4         <fieldset class="group_form"><legend class="group_form"><?php echo _AT('groups_create_automatic'); ?></legend>
5                 <div class="row">
6                         <span class="required" title="<?php echo _AT('required_field'); ?>">*</span><label for="type"><?php echo _AT('groups_type'); ?></label><br />
7                         <input type="text" name="type_title" id="type" value="<?php echo AT_print($_POST['type_title'], 'groups.type'); ?>" size="30" maxlength="60" />
8                 </div>
9
10                 <div class="row">
11                         <span class="required" title="<?php echo _AT('required_field'); ?>">*</span><label for="prefix"><?php echo _AT('group_prefix'); ?></label><br />
12                         <input type="text" name="prefix" id="prefix" value="<?php echo AT_print($_POST['prefix'], 'groups.prefix'); ?>" size="20" maxlength="40" />
13                 </div>
14
15                 <div class="row">
16                         <label for="description"><?php echo _AT('default_description'); ?></label><br />
17                         <textarea name="description" id="description" cols="10" rows="2"><?php echo AT_print($_POST['description'], 'groups.description'); ?></textarea>
18                 </div>
19
20                 <div class="row">
21                         <span class="required" title="<?php echo _AT('required_field'); ?>">*</span><?php echo _AT('number_of_groups'); ?><br />
22                 
23                         <p><?php echo _AT('num_students_currently_enrolled', $this->row['cnt']-1); ?></p>
24
25                         <input type="radio" name="num_g" value="1" id="num1" checked="checked" onclick="javascript:changer('num_groups', 'num_students');" /><label for="num1"><?php echo _AT('number_of_students_per_group'); ?></label> <input type="text" name="num_students" size="3" style="text-align: right" maxlength="4" />
26                         <br />
27                         <input type="radio" name="num_g" value="2" id="num2" onclick="javascript:changer('num_students', 'num_groups');" /><label for="num2"><?php echo _AT('number_of_groups'); ?></label> <input type="text" name="num_groups" size="3" style="text-align: right" maxlength="4" value="-" />
28                 </div>
29
30                 <div class="row">
31                         <?php echo _AT('fill_groups'); ?><br />
32                         <input type="checkbox" name="fill" value="1" id="fill_r" checked="checked" /><label for="fill_r"><?php echo _AT('fill_groups_randomly'); ?></label>
33                 </div>
34
35                 <div class="row">
36                         <?php echo _AT('tools'); ?><br />
37                                 <?php
38                                 $modules = $moduleFactory->getModules(AT_MODULE_STATUS_ENABLED, 0, TRUE);
39                                 $keys = array_keys($modules);
40                                 $i=0;
41                                 
42                                 ?>
43                                 <?php foreach($keys as $module_name): ?>
44                                         <?php $module =& $modules[$module_name]; ?>
45                                         
46                                         <?php if ($module->getGroupTool() && (in_array($module->getGroupTool(),$_pages[AT_NAV_HOME]) || in_array($module->getGroupTool(),$_pages[AT_NAV_COURSE])) ): ?>
47                                                 <input type="checkbox" value="<?php echo $module_name; ?>" name="modules[]" id="m<?php echo ++$i; ?>" /><label for="m<?php echo $i; ?>"><?php echo $module->getName(); ?></label><br />
48                                         
49                                         <?php endif; ?>
50                                 <?php endforeach; ?>
51                 </div>
52
53                 <div class="row buttons">
54                         <input type="submit" name="submit" value="<?php echo _AT('create'); ?>" accesskey="s" />
55                         <input type="submit" name="cancel" value="<?php echo _AT('cancel'); ?>" />
56                 </div>
57                 </fieldset>
58         </div>
59 </form>