Inheritance diagram for ilnetucateXMLAPI:
Collaboration diagram for ilnetucateXMLAPI:Public Member Functions | |
| ilnetucateXMLAPI () | |
| Constructor public. | |
| xmlFormatData ($a_data) | |
| Indents text for better reading. | |
| setServerAddr ($a_server_addr) | |
| getServerAddr () | |
| getServerPort () | |
| getServerTimeOut () | |
| getServerPath () | |
| getServerScheme () | |
| getCustomerID () | |
| setRequest ($a_data) | |
| sendRequest ($a_request= '') | |
| addUser (&$a_login_data, &$a_user_obj, $a_authority="leader") | |
| add user account to iLinc | |
| registerUser ($a_ilinc_course_id, $a_ilinc_user_arr) | |
| findRegisteredUsersByRole ($a_ilinc_course_id, $a_instructorflag=false) | |
| unregisterUser ($a_ilinc_course_id, $a_ilinc_user_ids) | |
| findUser (&$a_user_obj) | |
| removeUser (&$a_user_obj) | |
| addClass ($a_course_id, $a_data) | |
| editClass ($a_class_id, $a_data) | |
| joinClass (&$a_user_obj, $a_ilinc_class_id) | |
| userLogin (&$a_user_obj) | |
| uploadPicture (&$a_user_obj) | |
| removeClass ($a_icla_id) | |
| findCourseClasses ($a_icrs_id) | |
| findClass ($a_class_id) | |
| addCourse (&$a_icrs_arr) | |
| editCourse ($a_icrs_id, $a_icrs_arr) | |
| removeCourse ($a_icrs_id) | |
Definition at line 15 of file class.ilnetucateXMLAPI.php.
| ilnetucateXMLAPI::addClass | ( | $ | a_course_id, | |
| $ | a_data | |||
| ) |
Definition at line 364 of file class.ilnetucateXMLAPI.php.
References ilXmlWriter::xmlClear(), ilXmlWriter::xmlEndTag(), ilXmlWriter::xmlHeader(), and ilXmlWriter::xmlStartTag().
{
$this->xmlClear();
$this->xmlHeader();
$this->xmlStartTag('netucate.API.Request');
$attr = array();
$attr['user'] = $this->reg_login;
$attr['password'] = $this->reg_passwd;
$attr['customerid'] = $this->customer_id;
$attr['id'] = "";
$attr['command'] = "Add";
$attr['object'] = "Class";
$this->xmlStartTag('netucate.Command',$attr);
$this->xmlEndTag('netucate.Command');
$attr = array();
$attr['courseid'] = $a_course_id;
$attr['name'] = $a_data['title'];
$attr['instructoruserid'] = $a_data['instructoruserid'];
$attr['description'] = $a_data['desc'];
$attr['alwaysopen'] = $a_data['alwaysopen'];
//$attr['password'] = $a_data['password'];
//$attr['bandwidth'] = $a_data['bandwidth'];
//$attr['appsharebandwidth'] = $a_data['appsharebandwidth'];
//$attr['message'] = $a_data['message'];
//$attr['floorpolicy'] = $a_data['floorpolicy'];
//$attr['conferencetypeid'] = $a_data['conferencetypeid'];
//$attr['videobandwidth'] = $a_data['videobandwidth'];
//$attr['videoframerate'] = $a_data['videoframerate'];
//$attr['enablepush'] = $a_data['enablepush'];
//$attr['issecure'] = $a_data['issecure'];
//$attr['akclassvalue1'] = $a_data['akclassvalue1'];
//$attr['akclassvalue2'] = $a_data['akclassvalue2'];
$this->xmlStartTag('netucate.Class',$attr);
$this->xmlEndTag('netucate.Class');
$this->xmlEndTag('netucate.API.Request');
//var_dump($this->xmlDumpMem());exit;
}
Here is the call graph for this function:| ilnetucateXMLAPI::addCourse | ( | &$ | a_icrs_arr | ) |
Definition at line 591 of file class.ilnetucateXMLAPI.php.
References ilXmlWriter::xmlClear(), ilXmlWriter::xmlEndTag(), ilXmlWriter::xmlHeader(), and ilXmlWriter::xmlStartTag().
{
$this->xmlClear();
$this->xmlHeader();
$this->xmlStartTag('netucate.API.Request');
$attr = array();
$attr['user'] = $this->reg_login;
$attr['password'] = $this->reg_passwd;
$attr['customerid'] = $this->customer_id;
$attr['id'] = "";
$attr['command'] = "Add";
$attr['object'] = "Course";
$this->xmlStartTag('netucate.Command',$attr);
$this->xmlEndTag('netucate.Command');
$attr = array();
$attr['name'] = $a_icrs_arr['title'];
$attr['homepage'] = $a_icrs_arr['homepage']; // (optional; if present and not empty, the value will be changed)
$attr['download'] = $a_icrs_arr['download']; // (optional; if present and not empty, the value will be changed)
$attr['description'] = $a_icrs_arr['desc']; // (optional; if present and not empty, the value will be changed)
$this->xmlStartTag('netucate.Course',$attr);
$this->xmlEndTag('netucate.Course');
$this->xmlEndTag('netucate.API.Request');
}
Here is the call graph for this function:| ilnetucateXMLAPI::addUser | ( | &$ | a_login_data, | |
| &$ | a_user_obj, | |||
| $ | a_authority = "leader" | |||
| ) |
add user account to iLinc
| array | login data | |
| string | user fullname | |
| string | permission level (optional) |
Definition at line 164 of file class.ilnetucateXMLAPI.php.
References ilXmlWriter::xmlClear(), ilXmlWriter::xmlEndTag(), ilXmlWriter::xmlHeader(), and ilXmlWriter::xmlStartTag().
{
$this->xmlClear();
$this->xmlHeader();
$this->xmlStartTag('netucate.API.Request');
$attr = array();
$attr['user'] = $this->reg_login;
$attr['password'] = $this->reg_passwd;
$attr['customerid'] = $this->customer_id;
$attr['id'] = "";
$attr['command'] = "Add";
$attr['object'] = "User";
$this->xmlStartTag('netucate.Command',$attr);
$this->xmlEndTag('netucate.Command');
$attr = array();
$attr['loginname'] = $a_login_data["login"];
$attr['fullname'] = $a_user_obj->getFullname($this->user_max_strlen);
$attr['password'] = $a_login_data["passwd"];
$attr['authority'] = $a_authority;
$attr['email'] = $a_user_obj->getEmail();
$this->xmlStartTag('netucate.User',$attr);
$this->xmlEndTag('netucate.User');
$this->xmlEndTag('netucate.API.Request');
}
Here is the call graph for this function:| ilnetucateXMLAPI::editClass | ( | $ | a_class_id, | |
| $ | a_data | |||
| ) |
Definition at line 406 of file class.ilnetucateXMLAPI.php.
References ilXmlWriter::xmlClear(), ilXmlWriter::xmlEndTag(), ilXmlWriter::xmlHeader(), and ilXmlWriter::xmlStartTag().
{
$this->xmlClear();
$this->xmlHeader();
$this->xmlStartTag('netucate.API.Request');
$attr = array();
$attr['user'] = $this->reg_login;
$attr['password'] = $this->reg_passwd;
$attr['customerid'] = $this->customer_id;
$attr['id'] = "";
$attr['command'] = "Edit";
$attr['object'] = "Class";
$this->xmlStartTag('netucate.Command',$attr);
$this->xmlEndTag('netucate.Command');
$attr = array();
$attr['classid'] = $a_class_id;
$attr['name'] = $a_data['name'];
$attr['instructoruserid'] = $a_data['instructoruserid'];
$attr['description'] = $a_data['description'];
$attr['alwaysopen'] = $a_data['alwaysopen'];
$attr['password'] = $a_data['password'];
$attr['message'] = $a_data['message'];
$attr['appsharebandwidth'] = $a_data['appsharebandwidth'];
$attr['bandwidth'] = $a_data['bandwidth'];
$attr['floorpolicy'] = $a_data['floorpolicy'];
$attr['conferencetypeid'] = $a_data['conferencetypeid'];
$attr['videobandwidth'] = $a_data['videobandwidth'];
$attr['videoframerate'] = $a_data['videoframerate'];
$attr['enablepush'] = $a_data['enablepush'];
$attr['issecure'] = $a_data['issecure'];
$attr['akclassvalue1'] = $a_data['akclassvalue1'];
$attr['akclassvalue2'] = $a_data['akclassvalue2'];
$this->xmlStartTag('netucate.Class',$attr);
$this->xmlEndTag('netucate.Class');
$this->xmlEndTag('netucate.API.Request');
}
Here is the call graph for this function:| ilnetucateXMLAPI::editCourse | ( | $ | a_icrs_id, | |
| $ | a_icrs_arr | |||
| ) |
Definition at line 619 of file class.ilnetucateXMLAPI.php.
References ilXmlWriter::xmlClear(), ilXmlWriter::xmlEndTag(), ilXmlWriter::xmlHeader(), and ilXmlWriter::xmlStartTag().
{
$this->xmlClear();
$this->xmlHeader();
$this->xmlStartTag('netucate.API.Request');
$attr = array();
$attr['user'] = $this->reg_login;
$attr['password'] = $this->reg_passwd;
$attr['customerid'] = $this->customer_id;
$attr['id'] = "";
$attr['command'] = "Edit";
$attr['object'] = "Course";
$this->xmlStartTag('netucate.Command',$attr);
$this->xmlEndTag('netucate.Command');
// Modifies any or all of the fields in a Course record. An empty parameter in an existing attribute (except the name) will cause the corresponding field to be cleared.
$attr = array();
$attr['courseid'] = $a_icrs_id; // (required; existing courseID)
$attr['name'] = $a_icrs_arr['title']; // (optional; if present and not empty, the value will be changed)
$attr['homepage'] = $a_icrs_arr['homepage']; // (optional; if present and not empty, the value will be changed)
$attr['download'] = $a_icrs_arr['download']; // (optional; if present and not empty, the value will be changed)
$attr['description'] = $a_icrs_arr['desc']; // (optional; if present and not empty, the value will be changed)
$this->xmlStartTag('netucate.Course',$attr);
$this->xmlEndTag('netucate.Course');
$this->xmlEndTag('netucate.API.Request');
}
Here is the call graph for this function:| ilnetucateXMLAPI::findClass | ( | $ | a_class_id | ) |
Definition at line 566 of file class.ilnetucateXMLAPI.php.
References ilXmlWriter::xmlClear(), ilXmlWriter::xmlEndTag(), ilXmlWriter::xmlHeader(), and ilXmlWriter::xmlStartTag().
{
$this->xmlClear();
$this->xmlHeader();
$this->xmlStartTag('netucate.API.Request');
$attr = array();
$attr['user'] = $this->reg_login;
$attr['password'] = $this->reg_passwd;
$attr['customerid'] = $this->customer_id;
$attr['id'] = "";
$attr['command'] = "Find";
$attr['object'] = "Class";
$this->xmlStartTag('netucate.Command',$attr);
$this->xmlEndTag('netucate.Command');
$attr = array();
$attr['classid'] = $a_class_id;
$this->xmlStartTag('netucate.Class',$attr);
$this->xmlEndTag('netucate.Class');
$this->xmlEndTag('netucate.API.Request');
}
Here is the call graph for this function:| ilnetucateXMLAPI::findCourseClasses | ( | $ | a_icrs_id | ) |
Definition at line 541 of file class.ilnetucateXMLAPI.php.
References ilXmlWriter::xmlClear(), ilXmlWriter::xmlEndTag(), ilXmlWriter::xmlHeader(), and ilXmlWriter::xmlStartTag().
{
$this->xmlClear();
$this->xmlHeader();
$this->xmlStartTag('netucate.API.Request');
$attr = array();
$attr['user'] = $this->reg_login;
$attr['password'] = $this->reg_passwd;
$attr['customerid'] = $this->customer_id;
$attr['id'] = "";
$attr['command'] = "Find";
$attr['object'] = "CourseClasses";
$this->xmlStartTag('netucate.Command',$attr);
$this->xmlEndTag('netucate.Command');
$attr = array();
$attr['courseid'] = $a_icrs_id;
$this->xmlStartTag('netucate.Course',$attr);
$this->xmlEndTag('netucate.Course');
$this->xmlEndTag('netucate.API.Request');
}
Here is the call graph for this function:| ilnetucateXMLAPI::findRegisteredUsersByRole | ( | $ | a_ilinc_course_id, | |
| $ | a_instructorflag = false | |||
| ) |
Definition at line 233 of file class.ilnetucateXMLAPI.php.
References ilXmlWriter::xmlClear(), ilXmlWriter::xmlEndTag(), ilXmlWriter::xmlHeader(), and ilXmlWriter::xmlStartTag().
{
$this->xmlClear();
$this->xmlHeader();
$this->xmlStartTag('netucate.API.Request');
$attr = array();
$attr['user'] = $this->reg_login;
$attr['password'] = $this->reg_passwd;
$attr['customerid'] = $this->customer_id;
$attr['id'] = "";
$attr['command'] = "Find";
$attr['object'] = "RegisteredUsersByRole";
$this->xmlStartTag('netucate.Command',$attr);
$this->xmlEndTag('netucate.Command');
$attr = array();
$attr['courseid'] = $a_ilinc_course_id;
$attr['instructorflag'] = ($a_instructorflag) ? "True" : "False";
$this->xmlStartTag('netucate.Course',$attr);
$this->xmlEndTag('netucate.Course');
$this->xmlEndTag('netucate.API.Request');
}
Here is the call graph for this function:| ilnetucateXMLAPI::findUser | ( | &$ | a_user_obj | ) |
Definition at line 299 of file class.ilnetucateXMLAPI.php.
References ilXmlWriter::xmlClear(), ilXmlWriter::xmlEndTag(), ilXmlWriter::xmlHeader(), and ilXmlWriter::xmlStartTag().
{
$this->xmlClear();
$this->xmlHeader();
$this->xmlStartTag('netucate.API.Request');
$attr = array();
$attr['user'] = $this->reg_login;
$attr['password'] = $this->reg_passwd;
$attr['customerid'] = $this->customer_id;
$attr['id'] = "";
$attr['command'] = "Find";
$attr['object'] = "User";
$this->xmlStartTag('netucate.Command',$attr);
$this->xmlEndTag('netucate.Command');
$attr = array();
$attr['userid'] = "2191";
$attr['loginname'] = "ffuss";
$attr['fullname'] = "Fred Fuss";
$attr['lotnumber'] = "1";
$this->xmlStartTag('netucate.User',$attr);
$this->xmlEndTag('netucate.User');
$this->xmlEndTag('netucate.API.Request');
}
Here is the call graph for this function:| ilnetucateXMLAPI::getCustomerID | ( | ) |
Definition at line 79 of file class.ilnetucateXMLAPI.php.
{
return $this->customer_id;
}
| ilnetucateXMLAPI::getServerAddr | ( | ) |
Definition at line 54 of file class.ilnetucateXMLAPI.php.
Referenced by sendRequest().
{
return $this->server_addr;
}
Here is the caller graph for this function:| ilnetucateXMLAPI::getServerPath | ( | ) |
Definition at line 69 of file class.ilnetucateXMLAPI.php.
Referenced by sendRequest().
{
return $this->server_path;
}
Here is the caller graph for this function:| ilnetucateXMLAPI::getServerPort | ( | ) |
Definition at line 59 of file class.ilnetucateXMLAPI.php.
Referenced by sendRequest().
{
return $this->server_port;
}
Here is the caller graph for this function:| ilnetucateXMLAPI::getServerScheme | ( | ) |
Definition at line 74 of file class.ilnetucateXMLAPI.php.
Referenced by sendRequest().
{
return $this->server_scheme;
}
Here is the caller graph for this function:| ilnetucateXMLAPI::getServerTimeOut | ( | ) |
Definition at line 64 of file class.ilnetucateXMLAPI.php.
Referenced by sendRequest().
{
return $this->server_timeout;
}
Here is the caller graph for this function:| ilnetucateXMLAPI::ilnetucateXMLAPI | ( | ) |
Constructor public.
Definition at line 21 of file class.ilnetucateXMLAPI.php.
References $ilias, and ilXmlWriter::ilXmlWriter().
{
global $ilias;
define('ILINC_MEMBER_NOTSET','ilinc_notset');
define('ILINC_MEMBER_DOCENT','ilinc_docent');
define('ILINC_MEMBER_STUDENT','ilinc_student');
parent::ilXmlWriter();
$this->ilias =& $ilias;
$this->reg_login = $this->ilias->getSetting("ilinc_registrar_login");
$this->reg_passwd = $this->ilias->getSetting("ilinc_registrar_passwd");
$this->customer_id = $this->ilias->getSetting("ilinc_customer_id");
$this->server_scheme = $this->ilias->getSetting("ilinc_protocol");
$this->server_addr = $this->ilias->getSetting("ilinc_server");
$this->server_path = $this->ilias->getSetting("ilinc_path");
$this->server_port = $this->ilias->getSetting("ilinc_port");
$this->server_timeout = $this->ilias->getSetting("ilinc_timeout");
$this->user_max_strlen = 32; // Max string length of full username (title + firstname + lastname)
}
Here is the call graph for this function:| ilnetucateXMLAPI::joinClass | ( | &$ | a_user_obj, | |
| $ | a_ilinc_class_id | |||
| ) |
Definition at line 447 of file class.ilnetucateXMLAPI.php.
References $data, ilXmlWriter::xmlClear(), ilXmlWriter::xmlEndTag(), ilXmlWriter::xmlHeader(), and ilXmlWriter::xmlStartTag().
{
$this->xmlClear();
$this->xmlHeader();
$this->xmlStartTag('netucate.API.Request');
$data = $a_user_obj->getiLincData();
$attr = array();
$attr['user'] = $data['login'];
$attr['password'] = $data['passwd'];
$attr['customerid'] = $this->customer_id;
$attr['id'] = "";
$attr['task'] = "JoinClass";
$attr['classid'] = $a_ilinc_class_id;
$this->xmlStartTag('netucate.Task',$attr);
$this->xmlEndTag('netucate.Task');
$this->xmlEndTag('netucate.API.Request');
}
Here is the call graph for this function:| ilnetucateXMLAPI::registerUser | ( | $ | a_ilinc_course_id, | |
| $ | a_ilinc_user_arr | |||
| ) |
Definition at line 193 of file class.ilnetucateXMLAPI.php.
References $user, ilXmlWriter::xmlClear(), ilXmlWriter::xmlEndTag(), ilXmlWriter::xmlHeader(), and ilXmlWriter::xmlStartTag().
{
$this->xmlClear();
$this->xmlHeader();
$this->xmlStartTag('netucate.API.Request');
$attr = array();
$attr['user'] = $this->reg_login;
$attr['password'] = $this->reg_passwd;
$attr['customerid'] = $this->customer_id;
$attr['id'] = "";
$attr['command'] = "Register";
$attr['object'] = "User";
$this->xmlStartTag('netucate.Command',$attr);
$this->xmlEndTag('netucate.Command');
$attr = array();
$attr['courseid'] = $a_ilinc_course_id;
$this->xmlStartTag('netucate.Course',$attr);
$this->xmlStartTag('netucate.User.List');
foreach ($a_ilinc_user_arr as $user)
{
$attr = array();
$attr['userid'] = $user['id'];
$attr['instructorflag'] = $user['instructor'];
$this->xmlStartTag('netucate.User',$attr);
$this->xmlEndTag('netucate.User');
}
$this->xmlEndTag('netucate.User.List');
$this->xmlEndTag('netucate.Course');
$this->xmlEndTag('netucate.API.Request');
//var_dump($a_ilinc_user_arr,$this->xmlDumpMem());exit;
}
Here is the call graph for this function:| ilnetucateXMLAPI::removeClass | ( | $ | a_icla_id | ) |
Definition at line 512 of file class.ilnetucateXMLAPI.php.
References ilXmlWriter::xmlClear(), ilXmlWriter::xmlEndTag(), ilXmlWriter::xmlHeader(), and ilXmlWriter::xmlStartTag().
{
$this->xmlClear();
$this->xmlHeader();
$this->xmlStartTag('netucate.API.Request');
$attr = array();
$attr['user'] = $this->reg_login;
$attr['password'] = $this->reg_passwd;
$attr['customerid'] = $this->customer_id;
$attr['id'] = "";
$attr['command'] = "Remove";
$attr['object'] = "Class";
$this->xmlStartTag('netucate.Command',$attr);
$this->xmlEndTag('netucate.Command');
$this->xmlStartTag('netucate.Class.List');
$attr = array();
$attr['classid'] = $a_icla_id;
$this->xmlStartTag('netucate.Class',$attr);
$this->xmlEndTag('netucate.Class');
$this->xmlEndTag('netucate.Class.List');
$this->xmlEndTag('netucate.API.Request');
}
Here is the call graph for this function:| ilnetucateXMLAPI::removeCourse | ( | $ | a_icrs_id | ) |
Definition at line 649 of file class.ilnetucateXMLAPI.php.
References ilXmlWriter::xmlClear(), ilXmlWriter::xmlEndTag(), ilXmlWriter::xmlHeader(), and ilXmlWriter::xmlStartTag().
{
$this->xmlClear();
$this->xmlHeader();
$this->xmlStartTag('netucate.API.Request');
$attr = array();
$attr['user'] = $this->reg_login;
$attr['password'] = $this->reg_passwd;
$attr['customerid'] = $this->customer_id;
$attr['id'] = "";
$attr['command'] = "Remove";
$attr['object'] = "Course";
$this->xmlStartTag('netucate.Command',$attr);
$this->xmlEndTag('netucate.Command');
$this->xmlStartTag('netucate.Course.List');
$attr = array();
$attr['courseid'] = $a_icrs_id;
$this->xmlStartTag('netucate.Class',$attr);
$this->xmlEndTag('netucate.Class');
/*
$attr = array();
$attr['courseid'] = "2191";
$this->xmlStartTag('netucate.Course',$attr);
$this->xmlEndTag('netucate.Course');
*/
$this->xmlEndTag('netucate.Course.List');
$this->xmlEndTag('netucate.API.Request');
}
Here is the call graph for this function:| ilnetucateXMLAPI::removeUser | ( | &$ | a_user_obj | ) |
Definition at line 328 of file class.ilnetucateXMLAPI.php.
References ilXmlWriter::xmlClear(), ilXmlWriter::xmlEndTag(), ilXmlWriter::xmlHeader(), and ilXmlWriter::xmlStartTag().
{
$this->xmlClear();
$this->xmlHeader();
$this->xmlStartTag('netucate.API.Request');
$attr = array();
$attr['user'] = $this->reg_login;
$attr['password'] = $this->reg_passwd;
$attr['customerid'] = $this->customer_id;
$attr['id'] = "";
$attr['command'] = "Remove";
$attr['object'] = "User";
$this->xmlStartTag('netucate.Command',$attr);
$this->xmlEndTag('netucate.Command');
$this->xmlStartTag('netucate.User.List');
$attr = array();
$attr['userid'] = "2191";
$attr['instructorflag'] = "True";
$this->xmlStartTag('netucate.User',$attr);
$this->xmlEndTag('netucate.User');
$attr = array();
$attr['userid'] = "2192";
$attr['loginname'] = "ffuss";
$this->xmlStartTag('netucate.User',$attr); // userid or loginname per User are required.
$this->xmlEndTag('netucate.User');
$this->xmlEndTag('netucate.User.List');
$this->xmlEndTag('netucate.API.Request');
}
Here is the call graph for this function:| ilnetucateXMLAPI::sendRequest | ( | $ | a_request = '' |
) |
Definition at line 91 of file class.ilnetucateXMLAPI.php.
References getServerAddr(), getServerPath(), getServerPort(), getServerScheme(), getServerTimeOut(), and ilXmlWriter::xmlDumpMem().
{
$this->request = $this->xmlDumpMem();
// workaround for error in iLinc API
/*if ($a_request == "userLogin")
{
//var_dump($this->request);exit;
//$this->request = ereg_replace("></netucate.Task>","/>",$this->request);
}*/
//var_dump($this->request);exit;
if ($this->getServerScheme() == "https")
{
$scheme = "ssl";
}
else
{
$scheme = "http";
}
$sock = fsockopen($scheme."://".$this->getServerAddr(), $this->getServerPort(), $errno, $errstr, $this->getServerTimeOut());
if (!$sock) die("$errstr ($errno)\n");
/*var_dump("POST ".$this->getServerPath()." HTTP/1.0\r\n");
var_dump("Host: ".$this->getServerScheme()."://".$this->getServerAddr().$this->getServerPath()."\r\n");
exit;
*/
fputs($sock, "POST ".$this->getServerPath()." HTTP/1.0\r\n");
fputs($sock, "Host: ".$this->getServerScheme()."://".$this->getServerAddr().$this->getServerPath()."\r\n");
fputs($sock, "Content-type: text/xml\r\n");
fputs($sock, "Content-length: " . strlen($this->request) . "\r\n");
fputs($sock, "Accept: */*\r\n");
fputs($sock, "\r\n");
fputs($sock, $this->request."\r\n");
fputs($sock, "\r\n");
$headers = "";
while ($str = trim(fgets($sock, 4096)))
{
$headers .= "$str\n";
}
$response = "";
while (!feof($sock))
{
$response .= fgets($sock, 4096);
}
fclose($sock);
// return netucate response object
$response_obj = new ilnetucateResponse($response);
/*if ($a_request == "joinClass")
{
var_dump($this->request,$response,$response_obj->data);exit;
}*/
return $response_obj;
}
Here is the call graph for this function:| ilnetucateXMLAPI::setRequest | ( | $ | a_data | ) |
Definition at line 84 of file class.ilnetucateXMLAPI.php.
{
$this->request = $a_data;
}
| ilnetucateXMLAPI::setServerAddr | ( | $ | a_server_addr | ) |
Definition at line 49 of file class.ilnetucateXMLAPI.php.
{
$this->server_addr = $a_server_addr;
}
| ilnetucateXMLAPI::unregisterUser | ( | $ | a_ilinc_course_id, | |
| $ | a_ilinc_user_ids | |||
| ) |
Definition at line 260 of file class.ilnetucateXMLAPI.php.
References $user_id, ilXmlWriter::xmlClear(), ilXmlWriter::xmlEndTag(), ilXmlWriter::xmlHeader(), and ilXmlWriter::xmlStartTag().
{
$this->xmlClear();
$this->xmlHeader();
$this->xmlStartTag('netucate.API.Request');
$attr = array();
$attr['user'] = $this->reg_login;
$attr['password'] = $this->reg_passwd;
$attr['customerid'] = $this->customer_id;
$attr['id'] = "";
$attr['command'] = "UnRegister";
$attr['object'] = "User";
$this->xmlStartTag('netucate.Command',$attr);
$this->xmlEndTag('netucate.Command');
$attr = array();
$attr['courseid'] = $a_ilinc_course_id;
$this->xmlStartTag('netucate.Course',$attr);
$this->xmlStartTag('netucate.User.List');
foreach ($a_ilinc_user_ids as $user_id)
{
$attr = array();
$attr['userid'] = $user_id;
$this->xmlStartTag('netucate.User',$attr);
$this->xmlEndTag('netucate.User');
}
$this->xmlEndTag('netucate.User.List');
$this->xmlEndTag('netucate.Course');
$this->xmlEndTag('netucate.API.Request');
}
Here is the call graph for this function:| ilnetucateXMLAPI::uploadPicture | ( | &$ | a_user_obj | ) |
Definition at line 491 of file class.ilnetucateXMLAPI.php.
References $data, ilXmlWriter::xmlEndTag(), ilXmlWriter::xmlHeader(), and ilXmlWriter::xmlStartTag().
{
$this->xmlHeader();
$this->xmlStartTag('netucate.API.Request');
$data = $a_user_obj->getiLincData();
$attr = array();
$attr['user'] = $data['login'];
$attr['password'] = $data['passwd'];
$attr['customerid'] = $this->customer_id;
$attr['id'] = "";
$attr['locale'] = $a_user_obj->getLanguage();
$attr['task'] = "UploadPicture";
$this->xmlStartTag('netucate.Task',$attr);
$this->xmlEndTag('netucate.Task');
$this->xmlEndTag('netucate.API.Request');
}
Here is the call graph for this function:| ilnetucateXMLAPI::userLogin | ( | &$ | a_user_obj | ) |
Definition at line 469 of file class.ilnetucateXMLAPI.php.
References ilXmlWriter::xmlClear(), ilXmlWriter::xmlEndTag(), ilXmlWriter::xmlHeader(), and ilXmlWriter::xmlStartTag().
{
$this->xmlClear();
$this->xmlHeader();
$this->xmlStartTag('netucate.API.Request');
$ilinc_data = $a_user_obj->getiLincData();
$attr = array();
$attr['user'] = $ilinc_data['login'];
$attr['password'] = $ilinc_data['passwd'];
$attr['customerid'] = $this->customer_id;
$attr['id'] = "";
$attr['locale'] = $a_user_obj->getLanguage();
$attr['task'] = "UserLogin";
$this->xmlStartTag('netucate.Task',$attr);
$this->xmlEndTag('netucate.Task');
$this->xmlEndTag('netucate.API.Request');
}
Here is the call graph for this function:| ilnetucateXMLAPI::xmlFormatData | ( | $ | data | ) |
Indents text for better reading.
| string | input text |
Reimplemented from ilXmlWriter.
Definition at line 44 of file class.ilnetucateXMLAPI.php.
{
return $a_data;
}
1.7.1