Skip to content
Snippets Groups Projects
Commit a1cef865 authored by Rasmus Fuhse's avatar Rasmus Fuhse
Browse files

Resolve "OERSI API-URL hat sich geändert"

Closes #2512

Merge request studip/studip!1701
parent 00a3eede
No related branches found
No related tags found
No related merge requests found
......@@ -10,7 +10,7 @@ class OERHostOERSI extends OERHost
*/
public function fetchRemoteSearch($text = null, $tag = null)
{
$endpoint_url = 'https://oersi.de/resources/api-internal/search/oer_data/_search';
$endpoint_url = 'https://oersi.org/resources/api/search/oer_data/_search';
$appendix = Config::get()->OER_OERSI_ONLY_DOWNLOADABLE ? ' AND _exists_:encoding.contentUrl' : '';
if ($tag) {
$endpoint_url .= '?q=' . urlencode("keywords:" . $tag . $appendix);
......@@ -87,7 +87,7 @@ class OERHostOERSI extends OERHost
*/
public function fetchItemData(OERMaterial $material)
{
$endpoint_url = 'https://oersi.de/resources/' . urlencode($material['data']['id']) . '?format=json';
$endpoint_url = 'https://oersi.org/resources/' . urlencode($material['data']['id']) . '?format=json';
$output = @file_get_contents($endpoint_url, false, get_default_http_stream_context($endpoint_url));
if ($output) {
$output = json_decode($output, true);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment