Merge branch 'MDL-41379_outcomes' of https://github.com/andyjdavis/moodle
[moodle.git] / grade / edit / outcome / course_form.html
CommitLineData
72c31c77 1<?php $maxlength=70; ?>
2
0297e313 3<form action="course.php" method="post">
cc791578 4<div>
accdf036 5<table class="courseoutcomes">
cc791578 6 <tr>
cc791578 7 <td>
04259694 8 <label for="removeoutcomes"><?php print_string('outcomescourse', 'grades'); ?></label>
cc791578 9 <br />
10 <select id="removeoutcomes" size="20" name="removeoutcomes[]" multiple="multiple">
11 <?php
0297e313 12 if ($co_standard_notused) {
13 echo '<optgroup label="'.get_string('outcomescoursenotused', 'grades').'">';
14 foreach ($co_standard_notused as $outcome) {
72c31c77 15 echo '<option value="'.$outcome->id.'">'.shorten_text($outcome->get_name(), $maxlength).'</option>';
0297e313 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) {
72c31c77 22 echo '<option value="'.$outcome->id.'">'.shorten_text($outcome->get_name(), $maxlength).'</option>';
0297e313 23 }
24 echo '</optgroup>';
25 }
26 if ($co_custom) {
27 echo '<optgroup label="'.get_string('outcomescoursecustom', 'grades').'">';
28 foreach ($co_custom as $outcome) {
72c31c77 29 echo '<option value="'.$outcome->id.'">'.shorten_text($outcome->get_name(), $maxlength).'</option>';
0297e313 30 }
31 echo '</optgroup>';
cc791578 32 }
33 ?>
34 </select>
35 </td>
72c31c77 36 <?php
37 if (has_capability('moodle/grade:manageoutcomes', $context)) {
38 ?>
39 <td>
40 <p class="arrow_button">
92e01ab7 41 <input name="add" id="add" type="submit" value="<?php echo '&nbsp; '.$OUTPUT->larrow().' &nbsp; &nbsp; '.get_string('add'); ?>" title="<?php print_string('add'); ?>" />
72c31c77 42 <br />
92e01ab7 43 <input name="remove" id="remove" type="submit" value="<?php echo '&nbsp;'.$OUTPUT->rarrow().' &nbsp; &nbsp; '.get_string('remove'); ?>" title="<?php print_string('remove'); ?>" />
72c31c77 44 </p>
45 </td>
46 <?php } ?>
47 <td>
48 <label for="addoutcomes"><?php print_string('outcomesstandardavailable', 'grades'); ?></label>
49 <br />
50 <select id="addoutcomes" size="20" name="addoutcomes[]" multiple="multiple">
51
52 <?php
53 foreach ($standardoutcomes as $outcome) {
54 echo '<option value="'.$outcome->id.'">'.shorten_text($outcome->get_name(), $maxlength).'</option>';
55 }
56 ?>
57 </select>
58 </td>
cc791578 59 </tr>
60</table>
61
4a15febe
AD
62<?php
63if (has_capability('moodle/grade:manageoutcomes', $context)) {
64?>
65 <p class="mdl-align">
1f3e2596 66 <a href="<?php echo $CFG->wwwroot ?>/grade/edit/outcome/index.php?id=<?php echo $courseid; ?>"><?php echo get_string('editoutcomes','grades'); ?></a>
4a15febe
AD
67 </p>
68<?php
69}
70?>
71
cc791578 72<input name="id" type="hidden" value="<?php echo $courseid?>"/>
05565daa 73<input type="hidden" name="sesskey" value="<?php echo sesskey() ?>" />
cc791578 74</div>
72c31c77 75</form>