ILIAS  Release_3_10_x_branch Revision 61812
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilnetucateXMLAPI Class Reference

API to communicate with a the CMSAPI of centra (c) Sascha Hofmann, 2004. More...

+ 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= '')
 addUserOLD (&$a_login_data, &$a_user_obj, $a_authority="leader")
 add user account to iLinc
 addUser (&$a_ilinc_user_obj, $a_authority="leader")
 add user account to iLinc
 editUser (&$a_ilinc_user_obj)
 change user account in 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_id, &$a_login, &$a_fullname)
 removeUser (&$a_user_obj)
 addClass ($a_course_id, $a_data)
 editClass ($a_class_id, $a_data)
 joinClass (&$a_ilinc_user_obj, $a_ilinc_class_id)
 userLogin (&$a_ilinc_user_obj)
 uploadPicture (&$a_ilinc_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)
- Public Member Functions inherited from ilXmlWriter
 ilXmlWriter ($version="1.0", $outEnc="utf-8", $inEnc="utf-8")
 constructor
 _ilXmlWriter ()
 destructor public
 xmlSetDtdDef ($dtdDef)
 Sets dtd definition.
 xmlSetStSheet ($stSheet)
 Sets stylesheet.
 xmlSetGenCmt ($genCmt)
 Sets generated comment.
 _xmlEscapeData ($data)
 Escapes reserved characters.
 xmlEncodeData ($data)
 Encodes text from input encoding into output encoding.
 xmlFormatElement ($array)
 Callback function for xmlFormatData; do not invoke directly.
 xmlHeader ()
 Writes xml header public.
 xmlStartTag ($tag, $attrs=NULL, $empty=FALSE, $encode=TRUE, $escape=TRUE)
 Writes a starttag.
 xmlEndTag ($tag)
 Writes an endtag.
 xmlComment ($comment)
 Writes a comment.
 xmlData ($data, $encode=TRUE, $escape=TRUE)
 Writes data.
 xmlElement ($tag, $attrs=NULL, $data=Null, $encode=TRUE, $escape=TRUE)
 Writes a basic element (no children, just textual content)
 xmlDumpFile ($file, $format=TRUE)
 Dumps xml document from memory into a file.
 xmlDumpMem ($format=TRUE)
 Returns xml document from memory.
 appendXML ($a_str)
 append xml string to document
 xmlClear ()
 clears xmlStr public

Additional Inherited Members

- Data Fields inherited from ilXmlWriter
 $xmlStr
 $version
 $outEnc
 $inEnc
 $dtdDef = ""
 $stSheet = ""
 $genCmt = "Generated by ILIAS XmlWriter"

Detailed Description

API to communicate with a the CMSAPI of centra (c) Sascha Hofmann, 2004.

Author
Sascha Hofmann sasch.nosp@m.ahof.nosp@m.mann@.nosp@m.gmx..nosp@m.de
Version
Id:
class.ilnetucateXMLAPI.php 15689 2008-01-08 15:55:14Z akill

Definition at line 15 of file class.ilnetucateXMLAPI.php.

Member Function Documentation

ilnetucateXMLAPI::addClass (   $a_course_id,
  $a_data 
)

Definition at line 448 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'];
// only update akclassvalues if akclassvalues are enabled
if (array_key_exists('akclassvalue1',$a_data))
{
$attr['akclassvalue1'] = $a_data['akclassvalue1'];
}
if (array_key_exists('akclassvalue2',$a_data))
{
$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 690 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_ilinc_user_obj,
  $a_authority = "leader" 
)

add user account to iLinc

Parameters
arraylogin data
stringuser fullname
stringpermission level (optional)

Definition at line 196 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_ilinc_user_obj->login; // required; max 64 chars
$attr['fullname'] = $a_ilinc_user_obj->user->getFullname($this->user_max_strlen); // required; max 32 chars
$attr['password'] = $a_ilinc_user_obj->passwd; // required; max 127 chars
$attr['authority'] = $a_authority; // optional; participant or leader, Default: leader
$attr['email'] = $a_ilinc_user_obj->user->getEmail(); // optional; max 64 chars
$attr['homepage'] = ""; // no standard in ILIAS; optional; max 255 chars
$attr['contactinfo'] = $a_ilinc_user_obj->user->getInstitution(); // optional; max 64 chars
$attr['comments'] = $a_ilinc_user_obj->user->getComment(); // no standard in ILIAS; optional; max 64 chars
$attr['phonenumber'] = $a_ilinc_user_obj->user->getPhoneOffice(); // optional; max 32 chars
$attr['akuservalue1'] = $a_ilinc_user_obj->akuservalue1; // optional; max 64 chars
$attr['akuservalue2'] = $a_ilinc_user_obj->akuservalue2; // optional; max 64 chars
$this->xmlStartTag('netucate.User',$attr);
$this->xmlEndTag('netucate.User');
$this->xmlEndTag('netucate.API.Request');
}

+ Here is the call graph for this function:

ilnetucateXMLAPI::addUserOLD ( $a_login_data,
$a_user_obj,
  $a_authority = "leader" 
)

add user account to iLinc

Parameters
arraylogin data
stringuser fullname
stringpermission level (optional)

Definition at line 152 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"]; // required; max 64 chars
$attr['fullname'] = $a_user_obj->getFullname($this->user_max_strlen); // required; max 32 chars
$attr['password'] = $a_login_data["passwd"]; // required; max 127 chars
$attr['authority'] = $a_authority; // optional; participant or leader, Default: leader
$attr['email'] = $a_user_obj->getEmail(); // optional; max 64 chars
$attr['homepage'] = ""; // no standard in ILIAS; optional; max 255 chars
$attr['contactinfo'] = $a_user_obj->getInstitution(); // optional; max 64 chars
$attr['comments'] = $a_user_obj->getComment(); // no standard in ILIAS; optional; max 64 chars
$attr['phonenumber'] = $a_user_obj->getPhoneOffice(); // optional; max 32 chars
$attr['akuservalue1'] = ""; // optional; max 64 chars
$attr['akuservalue2'] = ""; // optional; max 64 chars
$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 500 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'];
// only update akclassvalues if akclassvalues are enabled
if (array_key_exists('akclassvalue1',$a_data))
{
$attr['akclassvalue1'] = $a_data['akclassvalue1'];
}
if (array_key_exists('akclassvalue2',$a_data))
{
$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::editCourse (   $a_icrs_id,
  $a_icrs_arr 
)

Definition at line 718 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::editUser ( $a_ilinc_user_obj)

change user account in iLinc

Parameters
arraylogin data
stringuser fullname
stringpermission level (optional)

Definition at line 240 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'] = "User";
$this->xmlStartTag('netucate.Command',$attr);
$this->xmlEndTag('netucate.Command');
$attr = array();
$attr['userid'] = $a_ilinc_user_obj->id; // required;
//$attr['loginname'] = $a_ilinc_user_obj->login; // required; max 64 chars
$attr['fullname'] = $a_ilinc_user_obj->user->getFullname($this->user_max_strlen); // required; max 32 chars
//$attr['password'] = $a_ilinc_user_obj->passwd; // required; max 127 chars
//$attr['authority'] = $a_authority; // optional; participant or leader, Default: leader
$attr['email'] = $a_ilinc_user_obj->user->getEmail(); // optional; max 64 chars
//$attr['homepage'] = ""; // no standard in ILIAS; optional; max 255 chars
$attr['contactinfo'] = $a_ilinc_user_obj->user->getInstitution(); // optional; max 64 chars
$attr['comments'] = $a_ilinc_user_obj->user->getComment(); // no standard in ILIAS; optional; max 64 chars
$attr['phonenumber'] = $a_ilinc_user_obj->user->getPhoneOffice(); // optional; max 32 chars
$attr['akuservalue1'] = $a_ilinc_user_obj->akuservalue1; // optional; max 64 chars
$attr['akuservalue2'] = $a_ilinc_user_obj->akuservalue2; // optional; max 64 chars
$this->xmlStartTag('netucate.User',$attr);
$this->xmlEndTag('netucate.User');
$this->xmlEndTag('netucate.API.Request');
}

+ Here is the call graph for this function:

ilnetucateXMLAPI::findClass (   $a_class_id)

Definition at line 665 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 640 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 317 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_id,
$a_login,
$a_fullname 
)

Definition at line 383 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'] = $a_id;
$attr['loginname'] = $a_login;
$attr['fullname'] = $a_fullname;
$attr['lotnumber'] = "0"; // optional; The set of matching records to return. If 0, all matching records will be returned. If 1, matches 1-25 will be returned. If 2, matches 26-50 will be returned, etc.; Default: 0
$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 80 of file class.ilnetucateXMLAPI.php.

{
return $this->customer_id;
}
ilnetucateXMLAPI::getServerAddr ( )

Definition at line 55 of file class.ilnetucateXMLAPI.php.

{
return $this->server_addr;
}
ilnetucateXMLAPI::getServerPath ( )

Definition at line 70 of file class.ilnetucateXMLAPI.php.

References $server_path.

Referenced by sendRequest().

{
}

+ Here is the caller graph for this function:

ilnetucateXMLAPI::getServerPort ( )

Definition at line 60 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 75 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 65 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 ilXmlWriter\ilXmlWriter().

{
global $ilias;
define('ILINC_MEMBER_NOTSET','ilinc_notset');
define('ILINC_MEMBER_DOCENT','ilinc_docent');
define('ILINC_MEMBER_STUDENT','ilinc_student');
$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_ilinc_user_obj,
  $a_ilinc_class_id 
)

Definition at line 552 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'] = $a_ilinc_user_obj->login;
$attr['password'] = $a_ilinc_user_obj->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 277 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 611 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 748 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 412 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 92 of file class.ilnetucateXMLAPI.php.

References $ilErr, $lng, getServerPath(), getServerPort(), getServerScheme(), getServerTimeOut(), and ilXmlWriter\xmlDumpMem().

{
global $ilErr,$lng;
// get request xml data
$this->request = $this->xmlDumpMem();
// compose request header
$header = "Host: ".$this->getServerAddr()."\r\n";
$header .= "User-Agent: ILIAS open source\r\n";
$header .= "Content-Type: text/xml\r\n";
$header .= "Content-Length: ".strlen($this->request)."\r\n";
$header .= "Connection: close\r\n\r\n";
// determine protocol
if ($this->getServerScheme() == "https")
{
$scheme = "ssl";
}
else
{
$scheme = "http";
}
// open socket connection to server
$sock = @fsockopen($scheme."://".$this->getServerAddr(), $this->getServerPort(), $errno, $errstr, $this->getServerTimeOut());
if (!$sock)
{
$ilErr->raiseError($lng->txt('ilinc_connection_error'),$ilErr->MESSAGE);
}
// send request
fputs($sock, "POST ".$this->getServerPath()." HTTP/1.0\r\n");
fputs($sock,$header.$this->request);
$response = "";
// read response data and surpress error from buggy IIS software (missing 'close_notify' cause fatal error)
while (!feof($sock))
{
$response .= @fgets($sock, 128);
}
fclose($sock);
// return netucate response object
$response_obj = new ilnetucateResponse($response);
return $response_obj;
}

+ Here is the call graph for this function:

ilnetucateXMLAPI::setRequest (   $a_data)

Definition at line 85 of file class.ilnetucateXMLAPI.php.

{
$this->request = $a_data;
}
ilnetucateXMLAPI::setServerAddr (   $a_server_addr)

Definition at line 50 of file class.ilnetucateXMLAPI.php.

{
$this->server_addr = $a_server_addr;
}
ilnetucateXMLAPI::unregisterUser (   $a_ilinc_course_id,
  $a_ilinc_user_ids 
)

Definition at line 344 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'] = "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_ilinc_user_obj)

Definition at line 592 of file class.ilnetucateXMLAPI.php.

References ilXmlWriter\xmlEndTag(), ilXmlWriter\xmlHeader(), and ilXmlWriter\xmlStartTag().

{
$this->xmlHeader();
$this->xmlStartTag('netucate.API.Request');
$attr = array();
$attr['user'] = $a_ilinc_user_obj->login;
$attr['password'] = $a_ilinc_user_obj->passwd;
$attr['customerid'] = $this->customer_id;
$attr['id'] = "";
$attr['locale'] = $a_ilinc_user_obj->user->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_ilinc_user_obj)

Definition at line 572 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'] = $a_ilinc_user_obj->login;
$attr['password'] = $a_ilinc_user_obj->passwd;
$attr['customerid'] = $this->customer_id;
$attr['id'] = "";
$attr['locale'] = $a_ilinc_user_obj->user->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.

Parameters
stringinput text
Returns
string indented text private

Reimplemented from ilXmlWriter.

Definition at line 45 of file class.ilnetucateXMLAPI.php.

{
return $a_data;
}

The documentation for this class was generated from the following file: