MDL-64280 core_outcome: Add/remove outcome buttons style.
[moodle.git] / grade / edit / outcome / course_form.html
blobbaf056af5531eeac0b863c01ebc8bed300fc9853
1 <?php $maxlength=70; ?>
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>';
17 echo '</optgroup>';
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>';
24 echo '</optgroup>';
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>';
31 echo '</optgroup>';
34 </select>
35 </td>
36 <?php
37 if (has_capability('moodle/grade:manageoutcomes', $context)) {
39 <td class="p-l-1 p-r-1">
40 <p class="arrow_button">
41 <input name="add" class="btn btn_secondary" id="add" type="submit" value="<?php echo '&nbsp; ' . $OUTPUT->larrow() . ' &nbsp; &nbsp; ' .
42 get_string('add'); ?>" title="<?php print_string('add'); ?>" />
43 <br />
44 <input name="remove" class="btn btn_secondary" id="remove" type="submit" value="<?php echo '&nbsp;' . get_string('remove') . ' &nbsp; &nbsp; ' .
45 $OUTPUT->rarrow(); ?>" title="<?php print_string('remove'); ?>" />
46 </p>
47 </td>
48 <?php } ?>
49 <td>
50 <label for="addoutcomes"><?php print_string('outcomesstandardavailable', 'grades'); ?></label>
51 <br />
52 <select id="addoutcomes" size="20" name="addoutcomes[]" multiple="multiple" class="form-control input-block-level">
54 <?php
55 foreach ($standardoutcomes as $outcome) {
56 echo '<option value="'.$outcome->id.'">'.shorten_text($outcome->get_name(), $maxlength).'</option>';
59 </select>
60 </td>
61 </tr>
62 </table>
64 <?php
65 if (has_capability('moodle/grade:manageoutcomes', $context)) {
67 <p class="mdl-align">
68 <a href="<?php echo $CFG->wwwroot ?>/grade/edit/outcome/index.php?id=<?php echo $courseid; ?>"><?php echo get_string('editoutcomes','grades'); ?></a>
69 </p>
70 <?php
74 <input name="id" type="hidden" value="<?php echo $courseid?>"/>
75 <input type="hidden" name="sesskey" value="<?php echo sesskey() ?>" />
76 </div>
77 </form>