3 /// send LAMS learning deisgn list as a string seperated by ":" to client
5 include_once("lib.php");
7 $result = lams_get_sequences($USER->username
,$courseid);
8 if(is_string($result)){//some exception happened!
9 $auth_exception = "AuthenticateException";
10 $server_not_found_exception = "ServerNotFoundException";
11 if(strpos($result,$auth_exception)){//found AuthenticationException in the error message
12 header("HTTP/1.1 401 Unauthenticated");
14 }else if (strpos($result,$server_not_found_exception)){
15 header("HTTP/1.1 417 Expectation Failed");
17 }else if ($result=="NOT_SET_UP"){
18 header("HTTP/1.1 402 Setup Required");
21 header("HTTP/1.1 502 Bad Gateway");
27 foreach($result as $design){
28 $list_str .= $design['sid'].",".$design['workspace'].",".$design['title'].":";
30 if (strlen($list_str)==0){
31 header("HTTP/1.1 504 Gateway Timeout");