Access to learning resources via an interface

32 views
Skip to first unread message

jamest...@gmail.com

unread,
Apr 30, 2018, 3:50:54 AM4/30/18
to OpenOLAT

Hello everybody,

 

I try to connect OpenOLAT to another system via the REST API. For this purpose, it would be helpful if I could export single learning resources via the API. It is not a problem to retrieve complete courses using /repo/courses/{courseId}/file, but exporting single learning resources using /repo/entries/{repoEntryKey}/file will not work. I get the status 406 if I do not release the resource for export to all authors before. But even after the release I get an empty file when exporting tests, even though the status 200 is returned.


Do you have any idea how I could manage to use learning resources from OpenOLAT automatically (e.g. using this or another interface) in another system? In particular, I'm interested in accessing tests and questions from the question pool.

 

Thanks and best regards,

James Trusty

Florian Gnaegi

unread,
Apr 30, 2018, 4:26:15 PM4/30/18
to open...@googlegroups.com
Hi Trusty

Did you set the downloadable flag to true in the GUI? 

For the question pool the REST API is not implemented yet. The API doest not cover 100% of the OpenOLAT features, only the parts that we need and so far there was no need fo the question pool. We can implement it on request. 

Cheers
Florian

--
--
Sie erhalten diese Nachricht, weil Sie Mitglied sind von Google
Groups-Gruppe "OpenOLAT".
Für das Erstellen von Beiträgen in dieser Gruppe senden Sie eine E-Mail
an open...@googlegroups.com
Um sich von dieser Gruppe abzumelden, senden Sie eine E-Mail an
openolat+u...@googlegroups.com
Weitere Optionen finden Sie in dieser Gruppe unter
http://groups.google.com/group/openolat?hl=de
-------------------------------------------------------------------------------------------------------------------
OpenOLAT - infinite learning - http://www.openolat.org

---
You received this message because you are subscribed to the Google Groups "OpenOLAT" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openolat+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--------------------------------------------------------------------
professional services for the e-learning system OpenOLAT
hosting - operating - support - development - mobile - consulting
--------------------------------------------------------------------
frentix  GmbH
Florian Gnägi, Geschäftsführer
Hardturmstrasse 76
CH-8005 Zürich, Switzerland


Find me on wire skype twitter xing linkedin 
--------------------------------------------------------------------

Message has been deleted

jamest...@gmail.com

unread,
May 1, 2018, 3:25:11 PM5/1/18
to OpenOLAT

Hello Florian,


Many thanks for the quick answer.


Yes, I did that before, as you can see in the attachments. Unfortunately, I still get an empty file:


curl -v https://administrator:openolat@[Domain]/restapi/repo/entries/720899/file


> GET /restapi/repo/entries/720899/file HTTP/1.1

> Host: [Domain]

> Authorization: Basic [***]

> User-Agent: curl/7.52.1

> Accept: */*


< HTTP/1.1 200

< Date: Tue, 01 May 2018 19:07:57 GMT

< Server: Apache

< Strict-Transport-Security: max-age=0; includeSubDomains

< X-OLAT-TOKEN: 391a9d4f-d33c-4f7c-a675-0fb0d1d7aa09

< Cache-Control: no-transform

< Content-Type: application/zip

< Content-Length: 0

< Set-Cookie: JSESSIONID=D57782C5CF8FC532FA498283F55AF1F6; Path=/; HttpOnly


I'm already surprised that I have to share the resource for all authors to download, so that the owner can export them via the API. That should not be necessary, since the creator can also export the resource via the GUI. As I already wrote, the publication is expected by the API, otherwise the status 406 will be delivered.


Best regards,

James Trusty


publication.PNG
info.PNG

Florian Gnaegi

unread,
May 1, 2018, 4:22:51 PM5/1/18
to open...@googlegroups.com
Hi James

You’re right, the method is not implemented for QTI2 tests, I’m sorry about that. I opened an issue, you can follow it here: https://jira.openolat.org/browse/OO-3459

The strange behavior with the authoring rights: this is some old stuff there. Actually, it would not be needed to make it author-public, however the checkbox appears only when the author-publish is enabled. I guess we could remove the download check if the user is either administrator or the owner of the resource. 

Cheers
Florian

--
--
Sie erhalten diese Nachricht, weil Sie Mitglied sind von Google
Groups-Gruppe "OpenOLAT".
Für das Erstellen von Beiträgen in dieser Gruppe senden Sie eine E-Mail
an open...@googlegroups.com
Um sich von dieser Gruppe abzumelden, senden Sie eine E-Mail an
openolat+u...@googlegroups.com
Weitere Optionen finden Sie in dieser Gruppe unter
http://groups.google.com/group/openolat?hl=de
-------------------------------------------------------------------------------------------------------------------
OpenOLAT - infinite learning - http://www.openolat.org

---
You received this message because you are subscribed to the Google Groups "OpenOLAT" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openolat+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
<publication.PNG><info.PNG>

Florian Gnägi

unread,
May 4, 2018, 3:01:02 AM5/4/18
to open...@googlegroups.com
Hi James

The problem is fixed in the default and the 12.4.x repo. We will release 12.4.2 today that will also include a fix for this. Thanks for reporting the issue. 

Cheers
Florian
Reply all
Reply to author
Forward
0 new messages