1 |
efrain |
1 |
<?php $maxlength=70; ?>
|
|
|
2 |
|
|
|
3 |
<form action="course.php" method="post">
|
|
|
4 |
<div>
|
|
|
5 |
<table class="courseoutcomes">
|
|
|
6 |
<tr>
|
|
|
7 |
<td>
|
|
|
8 |
<label for="removeoutcomes"><?php print_string('outcomescourse', 'grades'); ?></label>
|
|
|
9 |
<br />
|
|
|
10 |
<select id="removeoutcomes" size="20" name="removeoutcomes[]" multiple="multiple" class="form-control input-block-level">
|
|
|
11 |
<?php
|
|
|
12 |
if ($co_standard_notused) {
|
|
|
13 |
echo '<optgroup label="'.get_string('outcomescoursenotused', 'grades').'">';
|
|
|
14 |
foreach ($co_standard_notused as $outcome) {
|
|
|
15 |
echo '<option value="'.$outcome->id.'">'.shorten_text($outcome->get_name(), $maxlength).'</option>';
|
|
|
16 |
}
|
|
|
17 |
echo '</optgroup>';
|
|
|
18 |
}
|
|
|
19 |
if ($co_standard_used) {
|
|
|
20 |
echo '<optgroup label="'.get_string('outcomescourseused', 'grades').'">';
|
|
|
21 |
foreach ($co_standard_used as $outcome) {
|
|
|
22 |
echo '<option value="'.$outcome->id.'">'.shorten_text($outcome->get_name(), $maxlength).'</option>';
|
|
|
23 |
}
|
|
|
24 |
echo '</optgroup>';
|
|
|
25 |
}
|
|
|
26 |
if ($co_custom) {
|
|
|
27 |
echo '<optgroup label="'.get_string('outcomescoursecustom', 'grades').'">';
|
|
|
28 |
foreach ($co_custom as $outcome) {
|
|
|
29 |
echo '<option value="'.$outcome->id.'">'.shorten_text($outcome->get_name(), $maxlength).'</option>';
|
|
|
30 |
}
|
|
|
31 |
echo '</optgroup>';
|
|
|
32 |
}
|
|
|
33 |
?>
|
|
|
34 |
</select>
|
|
|
35 |
</td>
|
|
|
36 |
<?php
|
|
|
37 |
if (has_capability('moodle/grade:manageoutcomes', $context)) {
|
|
|
38 |
?>
|
|
|
39 |
<td class="pl-3 pr-3">
|
|
|
40 |
<div class="my-3">
|
|
|
41 |
<input name="add" class="btn btn-secondary" id="add" type="submit" value="<?php echo $OUTPUT->larrow() . ' ' .
|
|
|
42 |
get_string('add'); ?>" title="<?php print_string('add'); ?>" />
|
|
|
43 |
</div>
|
|
|
44 |
<div class="my-3">
|
|
|
45 |
<input name="remove" class="btn btn-secondary" id="remove" type="submit" value="<?php echo get_string('remove') .
|
|
|
46 |
' ' . $OUTPUT->rarrow(); ?>" title="<?php print_string('remove'); ?>" />
|
|
|
47 |
</div>
|
|
|
48 |
</td>
|
|
|
49 |
<?php } ?>
|
|
|
50 |
<td>
|
|
|
51 |
<label for="addoutcomes"><?php print_string('outcomesstandardavailable', 'grades'); ?></label>
|
|
|
52 |
<br />
|
|
|
53 |
<select id="addoutcomes" size="20" name="addoutcomes[]" multiple="multiple" class="form-control input-block-level">
|
|
|
54 |
|
|
|
55 |
<?php
|
|
|
56 |
foreach ($standardoutcomes as $outcome) {
|
|
|
57 |
echo '<option value="'.$outcome->id.'">'.shorten_text($outcome->get_name(), $maxlength).'</option>';
|
|
|
58 |
}
|
|
|
59 |
?>
|
|
|
60 |
</select>
|
|
|
61 |
</td>
|
|
|
62 |
</tr>
|
|
|
63 |
</table>
|
|
|
64 |
<input name="id" type="hidden" value="<?php echo $courseid?>"/>
|
|
|
65 |
<input type="hidden" name="sesskey" value="<?php echo sesskey() ?>" />
|
|
|
66 |
</div>
|
|
|
67 |
</form>
|