Created a bypass for second chance schools. A minor fix in CBController

parent 145dc316
......@@ -304,14 +304,15 @@ class CBController extends ControllerBase
public function getXMLElements($doc){
$webUserDetails = $doc->getElementsByTagName( "WebUserDetails" );
if (!$webUserDetails || $webUserDetails->length === 0)
return array( // to be changed to empty array
return false;
/* return array( // to be changed to empty array
'firstName' => '',
'surname' => '',
'fathersName' => '',
'comments' => '',
'tin' => '12345'
);
// return false;
); */
foreach( $webUserDetails as $element )
{
$comments = $element->getElementsByTagName( "comments" );
......@@ -330,13 +331,14 @@ class CBController extends ControllerBase
$tin = $tins->item(0)->nodeValue;
if (!$tin || $tin === '')
return array( // to be changed to empty array
return false;
/* return array( // to be changed to empty array
'firstName' => '',
'surname' => '',
'fathersName' => '',
'comments' => '',
'tin' => '12345'
);
); */
return array(
'firstName' => $firstName,
'surname' => $surname,
......
......@@ -218,4 +218,4 @@
</form>
<!-- <pre>{{studentDataGroup.value | json}}</pre> -->
<!-- <pre>{{studentDataGroup.value | json}}</pre> -->
......@@ -185,8 +185,11 @@ import {
return 1;
else if ((new Date().getFullYear()) - d.date.year < 15)
return 2;
if (!this.studentDataGroup.controls["lastschool_schoolname"].value.registry_no)
if (!this.studentDataGroup.controls["lastschool_schoolname"].value.registry_no &&
this.studentDataGroup.controls["lastschool_schoolname"].value.unit_type_id!==38)
return 3;
else if (this.studentDataGroup.controls["lastschool_schoolname"].value.unit_type_id===38)
this.studentDataGroup.controls["lastschool_schoolname"].value.registry_no='0000000'
if (this.studentDataGroup.controls["telnum"].value.length !== 10 )
return 4;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment