@@ -21,10 +21,10 @@ discard block |
||
21 | 21 | * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
22 | 22 | */ |
23 | 23 | |
24 | -require_once(__DIR__.'/../../config.php'); |
|
25 | -require($CFG->dirroot.'/local/relationship/lib.php'); |
|
26 | -require_once($CFG->dirroot.'/local/relationship/locallib.php'); |
|
27 | -require_once($CFG->libdir.'/adminlib.php'); |
|
24 | +require_once(__DIR__ . '/../../config.php'); |
|
25 | +require($CFG->dirroot . '/local/relationship/lib.php'); |
|
26 | +require_once($CFG->dirroot . '/local/relationship/locallib.php'); |
|
27 | +require_once($CFG->libdir . '/adminlib.php'); |
|
28 | 28 | |
29 | 29 | require_login(); |
30 | 30 | |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | } |
66 | 66 | if ($editable) { |
67 | 67 | $url = new moodle_url('/local/relationship/edit_group.php', array('relationshipgroupid' => $relationshipgroup->id, 'uniformdistribution' => $uniformdistribution)); |
68 | - $line[] = $status.' ('.html_writer::link($url, $text).')'; |
|
68 | + $line[] = $status . ' (' . html_writer::link($url, $text) . ')'; |
|
69 | 69 | } else { |
70 | 70 | $line[] = $status; |
71 | 71 | } |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | if ($manager || $canassign) { |
81 | 81 | $buttons[] = html_writer::link(new moodle_url('/local/relationship/assign.php', array('relationshipgroupid' => $relationshipgroup->id)), |
82 | 82 | html_writer::empty_tag('img', array('src' => $OUTPUT->pix_url('t/assignroles'), 'alt' => get_string('assign', 'local_relationship'), 'title' => get_string('assign', 'local_relationship'), 'class' => 'iconsmall'))); |
83 | - if($relationshipcohort && empty($relationshipcohort->component) && !$relationshipcohort->uniformdistribution && !$relationshipgroup->uniformdistribution) { |
|
83 | + if ($relationshipcohort && empty($relationshipcohort->component) && !$relationshipcohort->uniformdistribution && !$relationshipgroup->uniformdistribution) { |
|
84 | 84 | $buttons[] = html_writer::link(new moodle_url('/local/relationship/mass_assign.php', array('relationshipgroupid' => $relationshipgroup->id)), |
85 | 85 | html_writer::empty_tag('img', array('src' => $OUTPUT->pix_url('t/add'), 'alt' => get_string('massassign', 'local_relationship'), 'title' => get_string('massassign', 'local_relationship'), 'class' => 'iconsmall'))); |
86 | 86 | } |
@@ -92,8 +92,8 @@ discard block |
||
92 | 92 | $table = new html_table(); |
93 | 93 | $table->head = array(get_string('name', 'local_relationship'), |
94 | 94 | get_string('memberscount', 'local_relationship'), |
95 | - get_string('limit', 'local_relationship').$OUTPUT->help_icon('userlimit', 'local_relationship'), |
|
96 | - get_string('uniformdistribute', 'local_relationship').$OUTPUT->help_icon('uniformdistribute', 'local_relationship'), |
|
95 | + get_string('limit', 'local_relationship') . $OUTPUT->help_icon('userlimit', 'local_relationship'), |
|
96 | + get_string('uniformdistribute', 'local_relationship') . $OUTPUT->help_icon('uniformdistribute', 'local_relationship'), |
|
97 | 97 | get_string('edit')); |
98 | 98 | $table->colclasses = array('leftalign name', |
99 | 99 | 'leftalign size', |
@@ -140,7 +140,7 @@ discard block |
||
140 | 140 | |
141 | 141 | $addgroup = new single_button(new moodle_url('/local/relationship/edit_group.php', array('relationshipid' => $relationshipid)), get_string('addgroup', 'local_relationship')); |
142 | 142 | $addgroups = new single_button(new moodle_url('/local/relationship/autogroup.php', array('relationshipid' => $relationshipid)), get_string('autogroup', 'local_relationship')); |
143 | - echo html_writer::tag('div', $OUTPUT->render($addgroup).$OUTPUT->render($addgroups), array('class' => 'buttons')); |
|
143 | + echo html_writer::tag('div', $OUTPUT->render($addgroup) . $OUTPUT->render($addgroups), array('class' => 'buttons')); |
|
144 | 144 | } else if ($manager) { |
145 | 145 | echo $OUTPUT->heading(get_string('noeditable', 'local_relationship')); |
146 | 146 | } |
@@ -22,11 +22,11 @@ discard block |
||
22 | 22 | * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
23 | 23 | */ |
24 | 24 | |
25 | -require_once(__DIR__.'/../../config.php'); |
|
26 | -require_once($CFG->dirroot.'/course/lib.php'); |
|
27 | -require_once($CFG->dirroot.'/cohort/lib.php'); |
|
28 | -require($CFG->dirroot.'/local/relationship/lib.php'); |
|
29 | -require_once($CFG->dirroot.'/local/relationship/locallib.php'); |
|
25 | +require_once(__DIR__ . '/../../config.php'); |
|
26 | +require_once($CFG->dirroot . '/course/lib.php'); |
|
27 | +require_once($CFG->dirroot . '/cohort/lib.php'); |
|
28 | +require($CFG->dirroot . '/local/relationship/lib.php'); |
|
29 | +require_once($CFG->dirroot . '/local/relationship/locallib.php'); |
|
30 | 30 | |
31 | 31 | require_login(); |
32 | 32 | |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | // Therefore, the mass assign only works in cohort without component. |
41 | 41 | // When uniform distribution is enabled, users are uniformly distribute to any group with uniformdistribution = 1 in the relationship, |
42 | 42 | // so uniform distribution needs to be disabled to mass assign users in a specific group. |
43 | -if(!empty($relationshipcohort->component) || $relationshipcohort->uniformdistribution || $relationshipgroup->uniformdistribution) { |
|
43 | +if (!empty($relationshipcohort->component) || $relationshipcohort->uniformdistribution || $relationshipgroup->uniformdistribution) { |
|
44 | 44 | print_error('cantmassassign', 'local_relationship'); |
45 | 45 | } |
46 | 46 |