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