openHPI / xikolo-android

📱 Android App of the HPI MOOC Platform
https://play.google.com/store/apps/dev?id=7185448023325736337
GNU General Public License v3.0
41 stars 15 forks source link

Native LTI and Peer Assessments #197

Closed bengelhaupt closed 4 years ago

bengelhaupt commented 4 years ago

Implements a LtiExerciseFragment and PeerAssessmentFragment.

The LtiExerciseFragment shows a hint Please note that a mobile device might not be the optimal choice for completing this task. / Hinweis: Bitte beachten Sie, dass ein Mobilgerät möglicherweise nicht die optimale Wahl für die Bearbeitung dieser Aufgabe ist. that the device might not be suited well for completing this task. This message is not shown if the device is a tablet.

Fixes #50

tobiasrohloff commented 4 years ago

Please merge with the schema changes on master.

bengelhaupt commented 4 years ago

For LTI, how is this message displayed? As a toast? I think I would prefer it as a dialog to make sure the user won't miss it. I would also prefer a wording like: This task is opened with an external tool that is not part of the openHPI app. It may not be optimized for mobile devices, so we recommend that you complete it on a computer.

The current implementation is as a static text below the launch button:

For peer assessments, I'm not even sure if we should allow to open it with in-app webviews. In most steps, users need to download or upload something and this won't work. So let's show the native info page (when the deadline hasn't passed yet) and say something like Peer Assessments are not optimized for mobile. Please use the web version on your computer.

Peer Assessments don't have a launch url like LTIs, thus no button (or am I missing something?: https://dev.xikolo.de/api-docs/#endpoint-peer-assessments).

tobiasrohloff commented 4 years ago

Peer Assessments don't need a special URL, you only need the id: https://open.hpi.de/peer_assessments/399a8fdd-c014-45f1-ab80-8fdf18259fe3

However, what do you think about my approach?

bengelhaupt commented 4 years ago

Put the hint in a dialog and add a user preference to hide it in future. Open LTI link in in-app browser to prevent deep link rerouting. "Open Peer assessment" button with self-built url.

bengelhaupt commented 4 years ago

Done. The Deep Link issue persisted even when using CustomTabs. So I wrote an extension to exclude specific packages from the chooser.