21 $this->email = $a_email;
27 self::URL_DISPLAYER.
"convert/email",
28 array(
"email"=>$this->email),
32 if(!isset($json->status) ||
33 $json->status !=
"okay")
38 $this->uid = $json->userId;
47 self::URL_DISPLAYER.$this->uid.
"/groups.json" 52 foreach($json->groups as $group)
55 "title" => $group->name,
56 "size" => $group->badges
69 self::URL_DISPLAYER.$this->uid.
"/group/".$a_group_id.
".json" 73 $json->status ==
"missing")
80 foreach($json->badges as $raw)
82 $badge = $raw->assertion->badge;
85 $issued_on = is_numeric($raw->assertion->issued_on)
86 ? $raw->assertion->issued_on
87 : strtotime($raw->assertion->issued_on);
90 "title" => $badge->name,
91 "description" => $badge->description,
92 "image_url" => $badge->image,
93 "criteria_url" => $badge->criteria,
94 "issuer_name" => $badge->issuer->name,
95 "issuer_url" => $badge->issuer->origin,
108 include_once
"Services/WebServices/Curl/classes/class.ilCurlConnection.php";
112 $curl->setOpt(CURLOPT_FRESH_CONNECT,
true);
113 $curl->setOpt(CURLOPT_RETURNTRANSFER,
true);
114 $curl->setOpt(CURLOPT_FORBID_REUSE,
true);
115 $curl->setOpt(CURLOPT_HEADER, 0);
116 $curl->setOpt(CURLOPT_CONNECTTIMEOUT, 3);
117 $curl->setOpt(CURLOPT_POSTREDIR, 3);
120 $curl->setOpt(CURLOPT_SSL_VERIFYPEER,
false);
122 $curl->setOpt(CURLOPT_HTTPHEADER,
array(
123 "Accept: application/json",
129 $curl->setOpt(CURLOPT_POST, 1);
132 $curl->setOpt(CURLOPT_POSTFIELDS, http_build_query($a_param));
137 $curl->setOpt(CURLOPT_HTTPGET, 1);
141 (strpos($a_url,
"?") ===
false ?
"?" :
"").
142 http_build_query($a_param);
145 $curl->setOpt(CURLOPT_URL, $a_url);
147 $answer = $curl->exec();
155 return json_decode($answer);
Create styles array
The data for the language used.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
sendRequest($a_url, array $a_param=array(), $a_is_post=false)