@@ -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 | |
@@ -34,7 +34,7 @@ discard block |
||
| 34 | 34 | private $authtype; |
| 35 | 35 | private $registerpendencies; |
| 36 | 36 | |
| 37 | - public function __construct($relationshipcohortid, $relationshipgroupid, $registerpendencies=false, $authtype='') { |
|
| 37 | + public function __construct($relationshipcohortid, $relationshipgroupid, $registerpendencies = false, $authtype = '') { |
|
| 38 | 38 | global $DB; |
| 39 | 39 | |
| 40 | 40 | $this->relationshipcohort = relationship_get_cohort($relationshipcohortid, false); |
@@ -129,7 +129,7 @@ discard block |
||
| 129 | 129 | 'desc' => get_string('morethanoneusersccp', 'local_relationship'), |
| 130 | 130 | 'level' => 'error' |
| 131 | 131 | ]; |
| 132 | - } else if(count($pessoas) == 1) { |
|
| 132 | + } else if (count($pessoas) == 1) { |
|
| 133 | 133 | $pessoa = reset($pessoas); |
| 134 | 134 | $moodleuser = $this->find_user('idnumber', $pessoa->idpessoa); |
| 135 | 135 | if (empty($moodleuser)) { |
@@ -318,7 +318,7 @@ discard block |
||
| 318 | 318 | } |
| 319 | 319 | |
| 320 | 320 | if (empty($result->summary)) { |
| 321 | - $data = (object)$params; |
|
| 321 | + $data = (object) $params; |
|
| 322 | 322 | $data->timecreated = time(); |
| 323 | 323 | $DB->insert_record('relationship_pendencies', $data); |
| 324 | 324 | $result->summary = 'registeredaspending'; |
@@ -345,9 +345,9 @@ discard block |
||
| 345 | 345 | } else { |
| 346 | 346 | for ($t = 9; $t < 11; $t++) { |
| 347 | 347 | for ($d = 0, $c = 0; $c < $t; $c++) { |
| 348 | - $d += $cpf{$c} * (($t + 1) - $c); |
|
| 348 | + $d += $cpf{$c}*(($t+1)-$c); |
|
| 349 | 349 | } |
| 350 | - $d = ((10 * $d) % 11) % 10; |
|
| 350 | + $d = ((10*$d)%11)%10; |
|
| 351 | 351 | if ($cpf{$c} != $d) { |
| 352 | 352 | return false; |
| 353 | 353 | } |