MDL-64280 core_outcome: Add/remove outcome buttons style.
[moodle.git] / grade / edit / outcome / course_form.html
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>';
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="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>';
57             }
58             ?>
59             </select>
60         </td>
61     </tr>
62 </table>
64 <?php
65 if (has_capability('moodle/grade:manageoutcomes', $context)) {
66 ?>
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
71 }
72 ?>
74 <input name="id" type="hidden" value="<?php echo $courseid?>"/>
75 <input type="hidden" name="sesskey" value="<?php echo sesskey() ?>" />
76 </div>
77 </form>