5.1 - FAQ - Control Panel

Top  Previous  Next

The  following are frequently asked questions relating to the control panel.

 

1. FAQ - How do I determine what type of user role I have been assigned? This can be found by referring to section > 3.5 - My Account

 

2. FAQ - What types of web services are available with ampEducator?

Currently you can use web services to access prospective student information. However we are planning to add a complete set of web services to access student, course and other information found in the ampEducator database. Contact your Amperea Representative to discuss building a Custom Web Service that is currently not listed here using Support Options.

 

3. FAQ - How can we access the web services?

You will first need to setup a user with a 'Web Services' role. This user will serve authenticate any requests you make through the web services. IMPORTANT! Note the username and password for this user as it is required to access the web services.

You will then need to download or dynamically access the web services WSDL file through a programming language of your choice.  ASP.NET, Java, and PHP all have built in methods which can make accessing web services easy. Once the WSDL is processed you will have access to the web services methods (see examples below).

 

4. FAQ - Where are the WSDL files for the different web services?

Currently we provide web services for prospective students and the hour clock. The WSDL files can be found at:

 

https://purl.ampeducator.com/ProspectWS?wsdl

https://purl.ampeducator.com/HourClockWS?wsdl 

 

where purl is the identifier you normally use to access the ampEducator application.

 

5. FAQ - What methods are available for the ProspectWS?

Currently there are only three methods available:

 

getProspect(String prospectID) which will return a Prospect object.

addProspect(Prospect prospect) which will return the ProspectID if successfull and 0 if it's not.

updateProspect(Prospect prospect) which will return a boolean indicating if the operation was successfull or not.

 

6. FAQ - Do you have any code examples for the ProspectWS methods?

The following PHP examples demonstrate two of the prospect methods. You will need the nuSoap toolkit to run this code.

 

<div style="background: #eeeeee; padding: 1em;">

<strong>// addProspect Method</strong>

<?php

require_once('lib/nusoap.php');

// Setup variables, you will need to setup a user with a 'Web Service' role and

// replace the $userName and $userPass below

$clientPURL = "demo";

$userName = "username";

$userPass = "password";

 

// Setup Endpoint and Namespace, no need to alter anything here

$endpoint = "https://".$clientPURL.".ampeducator.com/ProspectWS?wsdl"

$nameSpace = "http://webservices.ampeducator.amperea.com/";

// Get SOAP client and set authorization

$soapclient = new nusoap_client($endpoint);

$soapclient->setCredentials($userName, $userPass, "basic");

 

// Setup prospect object - normally you would populate this from a form

// submitted on your website 

$prospect = array();

$prospect['firstName']="Test"; // Required

$prospect['middleName']=""; 

$prospect['lastName']=""; 

$prospect['addressOne']=""; 

$prospect['addressTwo']=""; 

$prospect['city']=""; 

$prospect['province']=""; 

$prospect['postalCode']=""; 

$prospect['country']=""; 

$prospect['phone']=""; 

$prospect['altPhone']=""; 

$prospect['dateofBirth']=""; 

$prospect['email']=""; 

$prospect['followUpDate']=""; // YYYY-MM-DD Format

$prospect['heardThrough']=""; 

$prospect['sharedStatus']=""; 

$prospect['expectedDate']=""; // YYYY-MM-DD Format

$prospect['funnelStatus']=""; 

$prospect['locationID']="2"; // Required, normally 1 if single location

 

    

// Custom Fields

// 50 Character max, can be defined in ampEducator under Configuration

// Any date fields must be in YYYY-MM-DD Format

$prospect['customField1']=""; 

$prospect['customField2']=""; 

$prospect['customField3']=""; 

$prospect['customField4']=""; 

$prospect['customField5']=""; 

$prospect['customField6']=""; 

$prospect['customField7']=""; 

$prospect['customField8']=""; 

$prospect['customField9']="";

$prospect['customField10']=""; 

$prospect['customField11']=""; 

$prospect['customField12']=""; 

$prospect['customField13']=""; 

$prospect['customField14']=""; 

$prospect['customField15']=""; 

$prospect['customField16']=""; 

$prospect['customField17']=""; 

$prospect['customField18']=""; 

$prospect['customField19']=""; 

$prospect['customField20']=""; 

$prospect['customField21']=""; 

$prospect['customField22']=""; 

$prospect['customField23']=""; 

$prospect['customField24']=""; 

$prospect['customField25']=""; 

$prospect['customField26']=""; 

$prospect['customField27']=""; 

$prospect['customField28']=""; 

$prospect['customField29']=""; 

$prospect['customField30']=""; 

$param = array('Prospect'=>$prospect);

 

// Submit new prospect to web service

$response = $soapclient->call('addProspect', $param, $nameSpace);

  

   

// If successfull you will get back a ProspectID number otherwise you 

// will get back 0. From there users should be redirected accordingly.

if ($response==0) {

       

       echo "There was a problem adding the prospect.";

       

} else {

       

       echo "The prospect was successfully added with ID ".$response;

       

}

 

 

?>

 

</div>

 

<div style="background: #eeeeee; padding: 1em;">

<strong>//getProspect Method</strong>

 

<?php

 

require_once('lib/nusoap.php');

 

// Setup variables, you will need to setup a user with a 'Web Service' role and

// replace the $userName and $userPass below

 

$clientPURL = "demo";

$userName = "username";

$userPass = "password";

 

// Setup Endpoint and Namespace, no need to alter anything here

$endpoint = "https://".$clientPURL.".ampeducator.com/ProspectWS?wsdl";

$nameSpace = "http://webservices.ampeducator.amperea.com/";

 

// Get SOAP client and set authorization

$soapclient = new nusoap_client($endpoint);

$soapclient->setCredentials($userName, $userPass, "basic");

 

// Prospects can be retrieved by ID only

$prospectID = "30"; 

$param = array('ProspectID'=>$prospectID);

 

// Submit new prospect to web service

$prospect = $soapclient->call('getProspect', $param, $nameSpace);

  

   

// If successfull you will get back a prospect object

// To see the contents of the object...

echo '<pre>';

print_r($prospect);

echo '</pre>';

 

 

// To access the object you can use it like an associative array

$FirstName = $prospect['firstName'];

$LastName = $prospect['lastName'];

 

?>

 

</div>

 

7. FAQ - What type of error reporting is provided?

If something goes wrong processing your web services request, you will receive a SOAP Fault object containing the relevant details.

 

8. FAQ - What methods are available for the HourClockWS?

Currently there are two methods available:

 

getCurrentDateTime() which will return the current date and time of the hour clock in YYYY-MM-DD HH:MM:SS.

singInOut(String id) which will return an HourClockResponse object. 

 

The ID passed is the ID of the user (i.e. Student ID, Staff ID, Educator ID) appended by an 'S' for staff and 'E' for educator. ID Cards generated and scanned from ampEducator will automatically generate the correct ID.

 

9. FAQ - Do you have any code examples for the HourClockWS methods?

The following PHP examples demonstrate the hour clock methods. You will need the nuSoap toolkit to run this code.

 

<div style="background: #eeeeee; padding: 1em;">

<strong>// getCurrentDateTime</strong>

 

<?php

 

require_once('lib/nusoap.php');

 

// Setup variables, you will need to setup a user with a 'Web Service' role and

// replace the $userName and $userPass below

 

$clientPURL = "demo";

$userName = "username";

$userPass = "password";

 

// Setup Endpoint and Namespace, no need to alter anything here

$endpoint = "https://".$clientPURL.".ampeducator.com/HourClockWS?wsdl";

$nameSpace = "http://webservices.ampeducator.amperea.com/";

 

// Get SOAP client and set authorization

$soapclient = new nusoap_client($endpoint);

$soapclient->setCredentials($userName, $userPass, "basic");

 

// No parameters are required

$param = array();

 

// Submit request to web service

$response = $soapclient->call('getCurrentDateTime', $param, $nameSpace);

  

   

// If succesfull you will get the date and time in YYYY-MM-DD HH:MM:SS format.

 

?>

 

</div>

 

<div style="background: #eeeeee; padding: 1em;">

<strong>//signInOut</strong>

 

<?php

 

require_once('lib/nusoap.php');

 

// Setup variables, you will need to setup a user with a 'Web Service' role and

// replace the $userName and $userPass below

 

$clientPURL = "demo";

$userName = "username";

$userPass = "password";

 

// Setup Endpoint and Namespace, no need to alter anything here

$endpoint = "https://".$clientPURL.".ampeducator.com/HourClockWS?wsdl";

$nameSpace = "http://webservices.ampeducator.amperea.com/";

 

// Get SOAP client and set authorization

$soapclient = new nusoap_client($endpoint);

$soapclient->setCredentials($userName, $userPass, "basic");

 

// You need to retrieve the user ID normally from a form submission

$id = $_REQUEST['id']; 

$param = array('id'=>$id);

 

// Submit id to web service

// The web service will automatically determine if this user is signing in or out.

$hourClockResponse = $soapclient->call('signInOut', $param, $nameSpace);

  

   

// If successfull you will get back an HourClockResponse object

// To see the contents of the object and the available information...

echo '<pre>';

print_r($hourClockResponse);

echo '</pre>';

 

 

// To access the object you can use it like an associative array

$TotalHours = $hourClockResponse['totalHours'];

 

?>

 

</div>