OpenOLAT LMS binding preparation
This commit is contained in:
parent
4cd05d5e2e
commit
a7d3b51005
2 changed files with 11 additions and 4 deletions
|
@ -63,7 +63,7 @@ public final class LmsSetup implements GrantEntity, Activatable {
|
|||
/** The Ans Delft binding is on the way */
|
||||
ANS_DELFT(/* Features.COURSE_API , Features.SEB_RESTRICTION */),
|
||||
/** The OpenOLAT binding is on the way */
|
||||
OPEN_OLAT(/* Features.COURSE_API , Features.SEB_RESTRICTION */);
|
||||
OPEN_OLAT(Features.COURSE_API, Features.SEB_RESTRICTION);
|
||||
|
||||
public final EnumSet<Features> features;
|
||||
|
||||
|
|
|
@ -83,12 +83,15 @@ public class OlatLmsAPITemplate extends AbstractCachedCourseAccess implements Lm
|
|||
final LmsSetupTestResult testLmsSetupSettings = testLmsSetupSettings();
|
||||
if (testLmsSetupSettings.hasAnyError()) {
|
||||
return testLmsSetupSettings;
|
||||
} else {
|
||||
|
||||
}
|
||||
|
||||
// TODO check if the course API of the remote LMS is available
|
||||
// if not, create corresponding LmsSetupTestResult error
|
||||
return LmsSetupTestResult.ofQuizAccessAPIError(LmsType.OPEN_OLAT, "TODO: implement LMS access check");
|
||||
|
||||
return LmsSetupTestResult.ofOkay(LmsType.OPEN_OLAT);
|
||||
//return LmsSetupTestResult.ofOkay(LmsType.OPEN_OLAT);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -196,8 +199,11 @@ public class OlatLmsAPITemplate extends AbstractCachedCourseAccess implements Lm
|
|||
final String quizName = filterMap.getString(QuizData.FILTER_ATTR_QUIZ_NAME);
|
||||
final DateTime quizFromTime = (filterMap != null) ? filterMap.getQuizFromTime() : null;
|
||||
|
||||
// TODO get all course / quiz data from remote LMS that matches the filter criteria.
|
||||
// put loaded QuizData to the cache: super.putToCache(quizDataCollection);
|
||||
// TODO Get all course / quiz data from remote LMS that matches the filter criteria.
|
||||
// If the LMS API uses paging, go through all pages using the filter criteria
|
||||
// and collect the course data.
|
||||
// Transform the data from courses / quizzes from LMS into QuizData objects
|
||||
// Put loaded QuizData objects to the cache: super.putToCache(quizDataCollection);
|
||||
// before returning it.
|
||||
|
||||
return () -> {
|
||||
|
@ -209,6 +215,7 @@ public class OlatLmsAPITemplate extends AbstractCachedCourseAccess implements Lm
|
|||
protected Supplier<Collection<QuizData>> quizzesSupplier(final Set<String> ids) {
|
||||
|
||||
// TODO get all quiz / course data for specified identifiers from remote LMS
|
||||
// Transform the data from courses / quizzes from LMS into QuizData objects
|
||||
// and put it to the cache: super.putToCache(quizDataCollection);
|
||||
// before returning it.
|
||||
|
||||
|
|
Loading…
Reference in a new issue