00001 <?php
00002
00003 require_once "class.ilnetucateResponse.php";
00004 require_once "./classes/class.ilXmlWriter.php";
00005
00015 class ilnetucateXMLAPI extends ilXmlWriter
00016 {
00021 function ilnetucateXMLAPI()
00022 {
00023 global $ilias;
00024
00025 define('ILINC_MEMBER_NOTSET','ilinc_notset');
00026 define('ILINC_MEMBER_DOCENT','ilinc_docent');
00027 define('ILINC_MEMBER_STUDENT','ilinc_student');
00028
00029 parent::ilXmlWriter();
00030
00031 $this->ilias =& $ilias;
00032
00033 $this->reg_login = $this->ilias->getSetting("ilinc_registrar_login");
00034 $this->reg_passwd = $this->ilias->getSetting("ilinc_registrar_passwd");
00035 $this->customer_id = $this->ilias->getSetting("ilinc_customer_id");
00036 $this->server_scheme = $this->ilias->getSetting("ilinc_protocol");
00037 $this->server_addr = $this->ilias->getSetting("ilinc_server");
00038 $this->server_path = $this->ilias->getSetting("ilinc_path");
00039 $this->server_port = $this->ilias->getSetting("ilinc_port");
00040 $this->server_timeout = $this->ilias->getSetting("ilinc_timeout");
00041 $this->user_max_strlen = 32;
00042
00043 }
00044
00045 function xmlFormatData($a_data)
00046 {
00047 return $a_data;
00048 }
00049
00050 function setServerAddr($a_server_addr)
00051 {
00052 $this->server_addr = $a_server_addr;
00053 }
00054
00055 function getServerAddr()
00056 {
00057 return $this->server_addr;
00058 }
00059
00060 function getServerPort()
00061 {
00062 return $this->server_port;
00063 }
00064
00065 function getServerTimeOut()
00066 {
00067 return $this->server_timeout;
00068 }
00069
00070 function getServerPath()
00071 {
00072 return $this->server_path;
00073 }
00074
00075 function getServerScheme()
00076 {
00077 return $this->server_scheme;
00078 }
00079
00080 function getCustomerID()
00081 {
00082 return $this->customer_id;
00083 }
00084
00085 function setRequest($a_data)
00086 {
00087 $this->request = $a_data;
00088 }
00089
00090
00091
00092 function sendRequest($a_request = '')
00093 {
00094 global $ilErr,$lng;
00095
00096
00097 $this->request = $this->xmlDumpMem();
00098
00099
00100 $header = "Host: ".$this->getServerAddr()."\r\n";
00101 $header .= "User-Agent: ILIAS open source\r\n";
00102 $header .= "Content-Type: text/xml\r\n";
00103 $header .= "Content-Length: ".strlen($this->request)."\r\n";
00104 $header .= "Connection: close\r\n\r\n";
00105
00106
00107 if ($this->getServerScheme() == "https")
00108 {
00109 $scheme = "ssl";
00110 }
00111 else
00112 {
00113 $scheme = "http";
00114 }
00115
00116
00117 $sock = @fsockopen($scheme."://".$this->getServerAddr(), $this->getServerPort(), $errno, $errstr, $this->getServerTimeOut());
00118
00119 if (!$sock)
00120 {
00121 $ilErr->raiseError($lng->txt('ilinc_connection_error'),$ilErr->MESSAGE);
00122 }
00123
00124
00125 fputs($sock, "POST ".$this->getServerPath()." HTTP/1.0\r\n");
00126 fputs($sock,$header.$this->request);
00127
00128 $response = "";
00129
00130
00131 while (!feof($sock))
00132 {
00133 $response .= @fgets($sock, 128);
00134 }
00135
00136 fclose($sock);
00137
00138
00139 $response_obj = new ilnetucateResponse($response);
00140
00141 return $response_obj;
00142 }
00143
00152 function addUserOLD(&$a_login_data,&$a_user_obj,$a_authority = "leader")
00153 {
00154 $this->xmlClear();
00155 $this->xmlHeader();
00156
00157 $this->xmlStartTag('netucate.API.Request');
00158
00159 $attr = array();
00160 $attr['user'] = $this->reg_login;
00161 $attr['password'] = $this->reg_passwd;
00162 $attr['customerid'] = $this->customer_id;
00163 $attr['id'] = "";
00164 $attr['command'] = "Add";
00165 $attr['object'] = "User";
00166 $this->xmlStartTag('netucate.Command',$attr);
00167 $this->xmlEndTag('netucate.Command');
00168
00169 $attr = array();
00170 $attr['loginname'] = $a_login_data["login"];
00171 $attr['fullname'] = $a_user_obj->getFullname($this->user_max_strlen);
00172 $attr['password'] = $a_login_data["passwd"];
00173 $attr['authority'] = $a_authority;
00174 $attr['email'] = $a_user_obj->getEmail();
00175 $attr['homepage'] = "";
00176 $attr['contactinfo'] = $a_user_obj->getInstitution();
00177 $attr['comments'] = $a_user_obj->getComment();
00178 $attr['phonenumber'] = $a_user_obj->getPhoneOffice();
00179 $attr['akuservalue1'] = "";
00180 $attr['akuservalue2'] = "";
00181
00182 $this->xmlStartTag('netucate.User',$attr);
00183 $this->xmlEndTag('netucate.User');
00184
00185 $this->xmlEndTag('netucate.API.Request');
00186 }
00187
00196 function addUser(&$a_ilinc_user_obj,$a_authority = "leader")
00197 {
00198 $this->xmlClear();
00199 $this->xmlHeader();
00200
00201 $this->xmlStartTag('netucate.API.Request');
00202
00203 $attr = array();
00204 $attr['user'] = $this->reg_login;
00205 $attr['password'] = $this->reg_passwd;
00206 $attr['customerid'] = $this->customer_id;
00207 $attr['id'] = "";
00208 $attr['command'] = "Add";
00209 $attr['object'] = "User";
00210 $this->xmlStartTag('netucate.Command',$attr);
00211 $this->xmlEndTag('netucate.Command');
00212
00213 $attr = array();
00214 $attr['loginname'] = $a_ilinc_user_obj->login;
00215 $attr['fullname'] = $a_ilinc_user_obj->user->getFullname($this->user_max_strlen);
00216 $attr['password'] = $a_ilinc_user_obj->passwd;
00217 $attr['authority'] = $a_authority;
00218 $attr['email'] = $a_ilinc_user_obj->user->getEmail();
00219 $attr['homepage'] = "";
00220 $attr['contactinfo'] = $a_ilinc_user_obj->user->getInstitution();
00221 $attr['comments'] = $a_ilinc_user_obj->user->getComment();
00222 $attr['phonenumber'] = $a_ilinc_user_obj->user->getPhoneOffice();
00223 $attr['akuservalue1'] = $a_ilinc_user_obj->akuservalue1;
00224 $attr['akuservalue2'] = $a_ilinc_user_obj->akuservalue2;
00225
00226 $this->xmlStartTag('netucate.User',$attr);
00227 $this->xmlEndTag('netucate.User');
00228
00229 $this->xmlEndTag('netucate.API.Request');
00230 }
00231
00240 function editUser(&$a_ilinc_user_obj)
00241 {
00242 $this->xmlClear();
00243 $this->xmlHeader();
00244
00245 $this->xmlStartTag('netucate.API.Request');
00246
00247 $attr = array();
00248 $attr['user'] = $this->reg_login;
00249 $attr['password'] = $this->reg_passwd;
00250 $attr['customerid'] = $this->customer_id;
00251 $attr['id'] = "";
00252 $attr['command'] = "Edit";
00253 $attr['object'] = "User";
00254 $this->xmlStartTag('netucate.Command',$attr);
00255 $this->xmlEndTag('netucate.Command');
00256
00257 $attr = array();
00258 $attr['userid'] = $a_ilinc_user_obj->id;
00259
00260 $attr['fullname'] = $a_ilinc_user_obj->user->getFullname($this->user_max_strlen);
00261
00262
00263 $attr['email'] = $a_ilinc_user_obj->user->getEmail();
00264
00265 $attr['contactinfo'] = $a_ilinc_user_obj->user->getInstitution();
00266 $attr['comments'] = $a_ilinc_user_obj->user->getComment();
00267 $attr['phonenumber'] = $a_ilinc_user_obj->user->getPhoneOffice();
00268 $attr['akuservalue1'] = $a_ilinc_user_obj->akuservalue1;
00269 $attr['akuservalue2'] = $a_ilinc_user_obj->akuservalue2;
00270
00271 $this->xmlStartTag('netucate.User',$attr);
00272 $this->xmlEndTag('netucate.User');
00273
00274 $this->xmlEndTag('netucate.API.Request');
00275 }
00276
00277 function registerUser($a_ilinc_course_id,$a_ilinc_user_arr)
00278 {
00279 $this->xmlClear();
00280 $this->xmlHeader();
00281
00282 $this->xmlStartTag('netucate.API.Request');
00283
00284 $attr = array();
00285 $attr['user'] = $this->reg_login;
00286 $attr['password'] = $this->reg_passwd;
00287 $attr['customerid'] = $this->customer_id;
00288 $attr['id'] = "";
00289 $attr['command'] = "Register";
00290 $attr['object'] = "User";
00291 $this->xmlStartTag('netucate.Command',$attr);
00292 $this->xmlEndTag('netucate.Command');
00293
00294 $attr = array();
00295 $attr['courseid'] = $a_ilinc_course_id;
00296 $this->xmlStartTag('netucate.Course',$attr);
00297
00298 $this->xmlStartTag('netucate.User.List');
00299
00300 foreach ($a_ilinc_user_arr as $user)
00301 {
00302 $attr = array();
00303 $attr['userid'] = $user['id'];
00304 $attr['instructorflag'] = $user['instructor'];
00305 $this->xmlStartTag('netucate.User',$attr);
00306 $this->xmlEndTag('netucate.User');
00307 }
00308
00309 $this->xmlEndTag('netucate.User.List');
00310
00311 $this->xmlEndTag('netucate.Course');
00312
00313 $this->xmlEndTag('netucate.API.Request');
00314
00315 }
00316
00317 function findRegisteredUsersByRole($a_ilinc_course_id,$a_instructorflag = false)
00318 {
00319 $this->xmlClear();
00320 $this->xmlHeader();
00321
00322 $this->xmlStartTag('netucate.API.Request');
00323
00324 $attr = array();
00325 $attr['user'] = $this->reg_login;
00326 $attr['password'] = $this->reg_passwd;
00327 $attr['customerid'] = $this->customer_id;
00328 $attr['id'] = "";
00329 $attr['command'] = "Find";
00330 $attr['object'] = "RegisteredUsersByRole";
00331 $this->xmlStartTag('netucate.Command',$attr);
00332 $this->xmlEndTag('netucate.Command');
00333
00334 $attr = array();
00335 $attr['courseid'] = $a_ilinc_course_id;
00336 $attr['instructorflag'] = ($a_instructorflag) ? "True" : "False";
00337 $this->xmlStartTag('netucate.Course',$attr);
00338
00339 $this->xmlEndTag('netucate.Course');
00340
00341 $this->xmlEndTag('netucate.API.Request');
00342 }
00343
00344 function unregisterUser($a_ilinc_course_id, $a_ilinc_user_ids)
00345 {
00346 $this->xmlClear();
00347 $this->xmlHeader();
00348
00349 $this->xmlStartTag('netucate.API.Request');
00350
00351 $attr = array();
00352 $attr['user'] = $this->reg_login;
00353 $attr['password'] = $this->reg_passwd;
00354 $attr['customerid'] = $this->customer_id;
00355 $attr['id'] = "";
00356 $attr['command'] = "UnRegister";
00357 $attr['object'] = "User";
00358 $this->xmlStartTag('netucate.Command',$attr);
00359 $this->xmlEndTag('netucate.Command');
00360
00361 $attr = array();
00362 $attr['courseid'] = $a_ilinc_course_id;
00363 $this->xmlStartTag('netucate.Course',$attr);
00364
00365 $this->xmlStartTag('netucate.User.List');
00366
00367 foreach ($a_ilinc_user_ids as $user_id)
00368 {
00369 $attr = array();
00370 $attr['userid'] = $user_id;
00371 $this->xmlStartTag('netucate.User',$attr);
00372 $this->xmlEndTag('netucate.User');
00373 }
00374
00375 $this->xmlEndTag('netucate.User.List');
00376
00377 $this->xmlEndTag('netucate.Course');
00378
00379 $this->xmlEndTag('netucate.API.Request');
00380 }
00381
00382
00383 function findUser(&$a_id,&$a_login,&$a_fullname)
00384 {
00385 $this->xmlClear();
00386 $this->xmlHeader();
00387
00388 $this->xmlStartTag('netucate.API.Request');
00389
00390 $attr = array();
00391 $attr['user'] = $this->reg_login;
00392 $attr['password'] = $this->reg_passwd;
00393 $attr['customerid'] = $this->customer_id;
00394 $attr['id'] = "";
00395 $attr['command'] = "Find";
00396 $attr['object'] = "User";
00397 $this->xmlStartTag('netucate.Command',$attr);
00398 $this->xmlEndTag('netucate.Command');
00399
00400 $attr = array();
00401 $attr['userid'] = $a_id;
00402 $attr['loginname'] = $a_login;
00403 $attr['fullname'] = $a_fullname;
00404 $attr['lotnumber'] = "0";
00405 $this->xmlStartTag('netucate.User',$attr);
00406 $this->xmlEndTag('netucate.User');
00407
00408 $this->xmlEndTag('netucate.API.Request');
00409 }
00410
00411
00412 function removeUser(&$a_user_obj)
00413 {
00414 $this->xmlClear();
00415 $this->xmlHeader();
00416
00417 $this->xmlStartTag('netucate.API.Request');
00418
00419 $attr = array();
00420 $attr['user'] = $this->reg_login;
00421 $attr['password'] = $this->reg_passwd;
00422 $attr['customerid'] = $this->customer_id;
00423 $attr['id'] = "";
00424 $attr['command'] = "Remove";
00425 $attr['object'] = "User";
00426 $this->xmlStartTag('netucate.Command',$attr);
00427 $this->xmlEndTag('netucate.Command');
00428
00429 $this->xmlStartTag('netucate.User.List');
00430
00431 $attr = array();
00432 $attr['userid'] = "2191";
00433 $attr['instructorflag'] = "True";
00434 $this->xmlStartTag('netucate.User',$attr);
00435 $this->xmlEndTag('netucate.User');
00436
00437 $attr = array();
00438 $attr['userid'] = "2192";
00439 $attr['loginname'] = "ffuss";
00440 $this->xmlStartTag('netucate.User',$attr);
00441 $this->xmlEndTag('netucate.User');
00442
00443 $this->xmlEndTag('netucate.User.List');
00444
00445 $this->xmlEndTag('netucate.API.Request');
00446 }
00447
00448 function addClass($a_course_id,$a_data)
00449 {
00450 $this->xmlClear();
00451 $this->xmlHeader();
00452
00453 $this->xmlStartTag('netucate.API.Request');
00454
00455 $attr = array();
00456 $attr['user'] = $this->reg_login;
00457 $attr['password'] = $this->reg_passwd;
00458 $attr['customerid'] = $this->customer_id;
00459 $attr['id'] = "";
00460 $attr['command'] = "Add";
00461 $attr['object'] = "Class";
00462 $this->xmlStartTag('netucate.Command',$attr);
00463 $this->xmlEndTag('netucate.Command');
00464
00465 $attr = array();
00466 $attr['courseid'] = $a_course_id;
00467 $attr['name'] = $a_data['title'];
00468 $attr['instructoruserid'] = $a_data['instructoruserid'];
00469 $attr['description'] = $a_data['desc'];
00470 $attr['alwaysopen'] = $a_data['alwaysopen'];
00471
00472
00473
00474
00475
00476
00477
00478
00479
00480
00481
00482
00483 if (array_key_exists('akclassvalue1',$a_data))
00484 {
00485 $attr['akclassvalue1'] = $a_data['akclassvalue1'];
00486 }
00487 if (array_key_exists('akclassvalue2',$a_data))
00488 {
00489 $attr['akclassvalue2'] = $a_data['akclassvalue2'];
00490 }
00491
00492 $this->xmlStartTag('netucate.Class',$attr);
00493 $this->xmlEndTag('netucate.Class');
00494
00495 $this->xmlEndTag('netucate.API.Request');
00496
00497
00498 }
00499
00500 function editClass($a_class_id,$a_data)
00501 {
00502 $this->xmlClear();
00503 $this->xmlHeader();
00504
00505 $this->xmlStartTag('netucate.API.Request');
00506
00507 $attr = array();
00508 $attr['user'] = $this->reg_login;
00509 $attr['password'] = $this->reg_passwd;
00510 $attr['customerid'] = $this->customer_id;
00511 $attr['id'] = "";
00512 $attr['command'] = "Edit";
00513 $attr['object'] = "Class";
00514 $this->xmlStartTag('netucate.Command',$attr);
00515 $this->xmlEndTag('netucate.Command');
00516
00517 $attr = array();
00518 $attr['classid'] = $a_class_id;
00519 $attr['name'] = $a_data['name'];
00520 $attr['instructoruserid'] = $a_data['instructoruserid'];
00521 $attr['description'] = $a_data['description'];
00522 $attr['alwaysopen'] = $a_data['alwaysopen'];
00523
00524
00525
00526
00527
00528
00529
00530
00531
00532
00533
00534
00535 if (array_key_exists('akclassvalue1',$a_data))
00536 {
00537 $attr['akclassvalue1'] = $a_data['akclassvalue1'];
00538 }
00539 if (array_key_exists('akclassvalue2',$a_data))
00540 {
00541 $attr['akclassvalue2'] = $a_data['akclassvalue2'];
00542 }
00543
00544 $this->xmlStartTag('netucate.Class',$attr);
00545 $this->xmlEndTag('netucate.Class');
00546
00547 $this->xmlEndTag('netucate.API.Request');
00548
00549
00550 }
00551
00552 function joinClass(&$a_ilinc_user_obj,$a_ilinc_class_id)
00553 {
00554 $this->xmlClear();
00555 $this->xmlHeader();
00556
00557 $this->xmlStartTag('netucate.API.Request');
00558
00559 $attr = array();
00560 $attr['user'] = $a_ilinc_user_obj->login;
00561 $attr['password'] = $a_ilinc_user_obj->passwd;
00562 $attr['customerid'] = $this->customer_id;
00563 $attr['id'] = "";
00564 $attr['task'] = "JoinClass";
00565 $attr['classid'] = $a_ilinc_class_id;
00566 $this->xmlStartTag('netucate.Task',$attr);
00567 $this->xmlEndTag('netucate.Task');
00568
00569 $this->xmlEndTag('netucate.API.Request');
00570 }
00571
00572 function userLogin(&$a_ilinc_user_obj)
00573 {
00574 $this->xmlClear();
00575 $this->xmlHeader();
00576
00577 $this->xmlStartTag('netucate.API.Request');
00578
00579 $attr = array();
00580 $attr['user'] = $a_ilinc_user_obj->login;
00581 $attr['password'] = $a_ilinc_user_obj->passwd;
00582 $attr['customerid'] = $this->customer_id;
00583 $attr['id'] = "";
00584 $attr['locale'] = $a_ilinc_user_obj->user->getLanguage();
00585 $attr['task'] = "UserLogin";
00586 $this->xmlStartTag('netucate.Task',$attr);
00587 $this->xmlEndTag('netucate.Task');
00588
00589 $this->xmlEndTag('netucate.API.Request');
00590 }
00591
00592 function uploadPicture(&$a_ilinc_user_obj)
00593 {
00594 $this->xmlHeader();
00595
00596 $this->xmlStartTag('netucate.API.Request');
00597
00598 $attr = array();
00599 $attr['user'] = $a_ilinc_user_obj->login;
00600 $attr['password'] = $a_ilinc_user_obj->passwd;
00601 $attr['customerid'] = $this->customer_id;
00602 $attr['id'] = "";
00603 $attr['locale'] = $a_ilinc_user_obj->user->getLanguage();
00604 $attr['task'] = "UploadPicture";
00605 $this->xmlStartTag('netucate.Task',$attr);
00606 $this->xmlEndTag('netucate.Task');
00607
00608 $this->xmlEndTag('netucate.API.Request');
00609 }
00610
00611 function removeClass($a_icla_id)
00612 {
00613 $this->xmlClear();
00614 $this->xmlHeader();
00615
00616 $this->xmlStartTag('netucate.API.Request');
00617
00618 $attr = array();
00619 $attr['user'] = $this->reg_login;
00620 $attr['password'] = $this->reg_passwd;
00621 $attr['customerid'] = $this->customer_id;
00622 $attr['id'] = "";
00623 $attr['command'] = "Remove";
00624 $attr['object'] = "Class";
00625 $this->xmlStartTag('netucate.Command',$attr);
00626 $this->xmlEndTag('netucate.Command');
00627
00628 $this->xmlStartTag('netucate.Class.List');
00629
00630 $attr = array();
00631 $attr['classid'] = $a_icla_id;
00632 $this->xmlStartTag('netucate.Class',$attr);
00633 $this->xmlEndTag('netucate.Class');
00634
00635 $this->xmlEndTag('netucate.Class.List');
00636
00637 $this->xmlEndTag('netucate.API.Request');
00638 }
00639
00640 function findCourseClasses($a_icrs_id)
00641 {
00642 $this->xmlClear();
00643 $this->xmlHeader();
00644
00645 $this->xmlStartTag('netucate.API.Request');
00646
00647 $attr = array();
00648 $attr['user'] = $this->reg_login;
00649 $attr['password'] = $this->reg_passwd;
00650 $attr['customerid'] = $this->customer_id;
00651 $attr['id'] = "";
00652 $attr['command'] = "Find";
00653 $attr['object'] = "CourseClasses";
00654 $this->xmlStartTag('netucate.Command',$attr);
00655 $this->xmlEndTag('netucate.Command');
00656
00657 $attr = array();
00658 $attr['courseid'] = $a_icrs_id;
00659 $this->xmlStartTag('netucate.Course',$attr);
00660 $this->xmlEndTag('netucate.Course');
00661
00662 $this->xmlEndTag('netucate.API.Request');
00663 }
00664
00665 function findClass($a_class_id)
00666 {
00667 $this->xmlClear();
00668 $this->xmlHeader();
00669
00670 $this->xmlStartTag('netucate.API.Request');
00671
00672 $attr = array();
00673 $attr['user'] = $this->reg_login;
00674 $attr['password'] = $this->reg_passwd;
00675 $attr['customerid'] = $this->customer_id;
00676 $attr['id'] = "";
00677 $attr['command'] = "Find";
00678 $attr['object'] = "Class";
00679 $this->xmlStartTag('netucate.Command',$attr);
00680 $this->xmlEndTag('netucate.Command');
00681
00682 $attr = array();
00683 $attr['classid'] = $a_class_id;
00684 $this->xmlStartTag('netucate.Class',$attr);
00685 $this->xmlEndTag('netucate.Class');
00686
00687 $this->xmlEndTag('netucate.API.Request');
00688 }
00689
00690 function addCourse(&$a_icrs_arr)
00691 {
00692 $this->xmlClear();
00693 $this->xmlHeader();
00694
00695 $this->xmlStartTag('netucate.API.Request');
00696
00697 $attr = array();
00698 $attr['user'] = $this->reg_login;
00699 $attr['password'] = $this->reg_passwd;
00700 $attr['customerid'] = $this->customer_id;
00701 $attr['id'] = "";
00702 $attr['command'] = "Add";
00703 $attr['object'] = "Course";
00704 $this->xmlStartTag('netucate.Command',$attr);
00705 $this->xmlEndTag('netucate.Command');
00706
00707 $attr = array();
00708 $attr['name'] = $a_icrs_arr['title'];
00709 $attr['homepage'] = $a_icrs_arr['homepage'];
00710 $attr['download'] = $a_icrs_arr['download'];
00711 $attr['description'] = $a_icrs_arr['desc'];
00712 $this->xmlStartTag('netucate.Course',$attr);
00713 $this->xmlEndTag('netucate.Course');
00714
00715 $this->xmlEndTag('netucate.API.Request');
00716 }
00717
00718 function editCourse($a_icrs_id,$a_icrs_arr)
00719 {
00720 $this->xmlClear();
00721 $this->xmlHeader();
00722
00723 $this->xmlStartTag('netucate.API.Request');
00724
00725 $attr = array();
00726 $attr['user'] = $this->reg_login;
00727 $attr['password'] = $this->reg_passwd;
00728 $attr['customerid'] = $this->customer_id;
00729 $attr['id'] = "";
00730 $attr['command'] = "Edit";
00731 $attr['object'] = "Course";
00732 $this->xmlStartTag('netucate.Command',$attr);
00733 $this->xmlEndTag('netucate.Command');
00734
00735
00736 $attr = array();
00737 $attr['courseid'] = $a_icrs_id;
00738 $attr['name'] = $a_icrs_arr['title'];
00739 $attr['homepage'] = $a_icrs_arr['homepage'];
00740 $attr['download'] = $a_icrs_arr['download'];
00741 $attr['description'] = $a_icrs_arr['desc'];
00742 $this->xmlStartTag('netucate.Course',$attr);
00743 $this->xmlEndTag('netucate.Course');
00744
00745 $this->xmlEndTag('netucate.API.Request');
00746 }
00747
00748 function removeCourse($a_icrs_id)
00749 {
00750 $this->xmlClear();
00751 $this->xmlHeader();
00752
00753 $this->xmlStartTag('netucate.API.Request');
00754
00755 $attr = array();
00756 $attr['user'] = $this->reg_login;
00757 $attr['password'] = $this->reg_passwd;
00758 $attr['customerid'] = $this->customer_id;
00759 $attr['id'] = "";
00760 $attr['command'] = "Remove";
00761 $attr['object'] = "Course";
00762 $this->xmlStartTag('netucate.Command',$attr);
00763 $this->xmlEndTag('netucate.Command');
00764
00765 $this->xmlStartTag('netucate.Course.List');
00766
00767 $attr = array();
00768 $attr['courseid'] = $a_icrs_id;
00769 $this->xmlStartTag('netucate.Class',$attr);
00770 $this->xmlEndTag('netucate.Class');
00771
00772
00773
00774
00775
00776
00777
00778
00779 $this->xmlEndTag('netucate.Course.List');
00780
00781 $this->xmlEndTag('netucate.API.Request');
00782 }
00783
00784 }
00785 ?>