@@ -320,7 +320,7 @@ |
||
| 320 | 320 | |
| 321 | 321 | $cohorts = $DB->get_records('relationship_cohorts', array('relationshipid' => $relationship->id)); |
| 322 | 322 | |
| 323 | - if(count($cohorts) == 0) { |
|
| 323 | + if (count($cohorts) == 0) { |
|
| 324 | 324 | |
| 325 | 325 | $relationshipgroups = $DB->get_records('relationship_groups', array('relationshipid' => $relationship->id)); |
| 326 | 326 | foreach ($relationshipgroups AS $g) { |
@@ -55,7 +55,7 @@ |
||
| 55 | 55 | $res = relationship_delete_relationship($relationship); |
| 56 | 56 | if($res === -1) { |
| 57 | 57 | print_string('has_cohorts', 'local_relationship'); |
| 58 | - } |
|
| 58 | + } |
|
| 59 | 59 | redirect($returnurl); |
| 60 | 60 | } |
| 61 | 61 | |
@@ -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_once($CFG->libdir.'/filelib.php'); |
|
| 26 | -require($CFG->dirroot.'/local/relationship/lib.php'); |
|
| 27 | -require_once($CFG->dirroot.'/local/relationship/locallib.php'); |
|
| 24 | +require_once(__DIR__ . '/../../config.php'); |
|
| 25 | +require_once($CFG->libdir . '/filelib.php'); |
|
| 26 | +require($CFG->dirroot . '/local/relationship/lib.php'); |
|
| 27 | +require_once($CFG->dirroot . '/local/relationship/locallib.php'); |
|
| 28 | 28 | |
| 29 | 29 | require_login(); |
| 30 | 30 | |
@@ -53,7 +53,7 @@ discard block |
||
| 53 | 53 | |
| 54 | 54 | if (optional_param('confirmdelete', 0, PARAM_BOOL) && confirm_sesskey() && $relationship->id) { |
| 55 | 55 | $res = relationship_delete_relationship($relationship); |
| 56 | - if($res === -1) { |
|
| 56 | + if ($res === -1) { |
|
| 57 | 57 | print_string('has_cohorts', 'local_relationship'); |
| 58 | 58 | } |
| 59 | 59 | redirect($returnurl); |