@@ -25,7 +25,7 @@ discard block |
||
| 25 | 25 | |
| 26 | 26 | defined('MOODLE_INTERNAL') || die(); |
| 27 | 27 | |
| 28 | -require_once($CFG->dirroot.'/cohort/lib.php'); |
|
| 28 | +require_once($CFG->dirroot . '/cohort/lib.php'); |
|
| 29 | 29 | |
| 30 | 30 | class mass_assign_processor { |
| 31 | 31 | |
@@ -36,7 +36,7 @@ discard block |
||
| 36 | 36 | private $registerpendencies; |
| 37 | 37 | private $allowallusers; |
| 38 | 38 | |
| 39 | - public function __construct($relationshipcohortid, $relationshipgroupid, $registerpendencies=false, $allowallusers=false, $authtype='') { |
|
| 39 | + public function __construct($relationshipcohortid, $relationshipgroupid, $registerpendencies = false, $allowallusers = false, $authtype = '') { |
|
| 40 | 40 | global $DB; |
| 41 | 41 | |
| 42 | 42 | $this->relationshipcohort = relationship_get_cohort($relationshipcohortid); |
@@ -45,7 +45,7 @@ discard block |
||
| 45 | 45 | } |
| 46 | 46 | |
| 47 | 47 | $this->relationshipgroup = $DB->get_record('relationship_groups', array('id' => $relationshipgroupid), '*', MUST_EXIST); |
| 48 | - if($this->relationshipgroup->uniformdistribution) { |
|
| 48 | + if ($this->relationshipgroup->uniformdistribution) { |
|
| 49 | 49 | throw new \moodle_exception('cantmassassign', 'local_relationship'); |
| 50 | 50 | } |
| 51 | 51 | |
@@ -415,7 +415,7 @@ discard block |
||
| 415 | 415 | 'level' => 'error' |
| 416 | 416 | ]; |
| 417 | 417 | } else { |
| 418 | - $data = (object)$params; |
|
| 418 | + $data = (object) $params; |
|
| 419 | 419 | $data->timecreated = time(); |
| 420 | 420 | $DB->insert_record('relationship_pendencies', $data); |
| 421 | 421 | $result->summary = 'registeredaspending'; |
@@ -443,9 +443,9 @@ discard block |
||
| 443 | 443 | } else { |
| 444 | 444 | for ($t = 9; $t < 11; $t++) { |
| 445 | 445 | for ($d = 0, $c = 0; $c < $t; $c++) { |
| 446 | - $d += $cpf{$c} * (($t + 1) - $c); |
|
| 446 | + $d += $cpf{$c}*(($t+1)-$c); |
|
| 447 | 447 | } |
| 448 | - $d = ((10 * $d) % 11) % 10; |
|
| 448 | + $d = ((10*$d)%11)%10; |
|
| 449 | 449 | if ($cpf{$c} != $d) { |
| 450 | 450 | return false; |
| 451 | 451 | } |