Commit | Line | Data |
---|---|---|
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 /> |
d388e8ec | 10 | <select id="removeoutcomes" size="20" name="removeoutcomes[]" multiple="multiple" class="form-control input-block-level"> |
cc791578 | 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 | ?> | |
d388e8ec | 39 | <td class="p-l-1 p-r-1"> |
72c31c77 | 40 | <p class="arrow_button"> |
d388e8ec LB |
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'); ?>" /> | |
72c31c77 | 43 | <br /> |
d388e8ec LB |
44 | <input name="remove" class="btn btn_secondary" id="remove" type="submit" value="<?php echo ' ' . get_string('remove') . ' ' . |
45 | $OUTPUT->rarrow(); ?>" title="<?php print_string('remove'); ?>" /> | |
72c31c77 | 46 | </p> |
47 | </td> | |
48 | <?php } ?> | |
49 | <td> | |
50 | <label for="addoutcomes"><?php print_string('outcomesstandardavailable', 'grades'); ?></label> | |
51 | <br /> | |
d388e8ec | 52 | <select id="addoutcomes" size="20" name="addoutcomes[]" multiple="multiple" class="form-control input-block-level"> |
72c31c77 | 53 | |
54 | <?php | |
55 | foreach ($standardoutcomes as $outcome) { | |
56 | echo '<option value="'.$outcome->id.'">'.shorten_text($outcome->get_name(), $maxlength).'</option>'; | |
57 | } | |
58 | ?> | |
59 | </select> | |
60 | </td> | |
cc791578 | 61 | </tr> |
62 | </table> | |
63 | ||
4a15febe AD |
64 | <?php |
65 | if (has_capability('moodle/grade:manageoutcomes', $context)) { | |
66 | ?> | |
67 | <p class="mdl-align"> | |
1f3e2596 | 68 | <a href="<?php echo $CFG->wwwroot ?>/grade/edit/outcome/index.php?id=<?php echo $courseid; ?>"><?php echo get_string('editoutcomes','grades'); ?></a> |
4a15febe AD |
69 | </p> |
70 | <?php | |
71 | } | |
72 | ?> | |
73 | ||
cc791578 | 74 | <input name="id" type="hidden" value="<?php echo $courseid?>"/> |
05565daa | 75 | <input type="hidden" name="sesskey" value="<?php echo sesskey() ?>" /> |
cc791578 | 76 | </div> |
72c31c77 | 77 | </form> |