@@ -24,8 +24,8 @@ discard block |
||
| 24 | 24 | namespace local_relationship; |
| 25 | 25 | defined('MOODLE_INTERNAL') || die(); |
| 26 | 26 | |
| 27 | -require_once($CFG->dirroot.'/cohort/lib.php'); |
|
| 28 | -require($CFG->dirroot.'/local/relationship/lib.php'); |
|
| 27 | +require_once($CFG->dirroot . '/cohort/lib.php'); |
|
| 28 | +require($CFG->dirroot . '/local/relationship/lib.php'); |
|
| 29 | 29 | |
| 30 | 30 | class mass_assign_processor { |
| 31 | 31 | |
@@ -34,7 +34,7 @@ discard block |
||
| 34 | 34 | private $relationshipgroup; |
| 35 | 35 | private $authtype; |
| 36 | 36 | |
| 37 | - public function __construct($relationshipcohortid, $relationshipgroupid, $authtype='') { |
|
| 37 | + public function __construct($relationshipcohortid, $relationshipgroupid, $authtype = '') { |
|
| 38 | 38 | global $DB; |
| 39 | 39 | |
| 40 | 40 | $this->relationshipcohort = relationship_get_cohort($relationshipcohortid, false); |
@@ -77,7 +77,7 @@ discard block |
||
| 77 | 77 | $this->tracker->total++; |
| 78 | 78 | |
| 79 | 79 | $moodleuserid = $this->process_user($value); |
| 80 | - if($moodleuserid) { |
|
| 80 | + if ($moodleuserid) { |
|
| 81 | 81 | $this->process_relationship($moodleuserid, $allowallusers); |
| 82 | 82 | } |
| 83 | 83 | } |
@@ -110,7 +110,7 @@ discard block |
||
| 110 | 110 | $this->tracker->track('status', get_string('morethanoneusersccp', 'local_relationship'), 'info'); |
| 111 | 111 | $this->tracker->invalid++; |
| 112 | 112 | return; |
| 113 | - } else if(count($pessoas) == 1) { |
|
| 113 | + } else if (count($pessoas) == 1) { |
|
| 114 | 114 | $pessoa = reset($pessoas); |
| 115 | 115 | $moodleuser = $this->find_user('idnumber', $cpf); |
| 116 | 116 | if (empty($moodleuser)) { |
@@ -248,9 +248,9 @@ discard block |
||
| 248 | 248 | } else { |
| 249 | 249 | for ($t = 9; $t < 11; $t++) { |
| 250 | 250 | for ($d = 0, $c = 0; $c < $t; $c++) { |
| 251 | - $d += $cpf{$c} * (($t + 1) - $c); |
|
| 251 | + $d += $cpf{$c}*(($t+1)-$c); |
|
| 252 | 252 | } |
| 253 | - $d = ((10 * $d) % 11) % 10; |
|
| 253 | + $d = ((10*$d)%11)%10; |
|
| 254 | 254 | if ($cpf{$c} != $d) { |
| 255 | 255 | return false; |
| 256 | 256 | } |