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