Mercurial > hg > orthanc-education
changeset 101:b8810b2fcd75
removed list of instructors/learners from /education/api-plugins/project
| author | Sebastien Jodogne <s.jodogne@gmail.com> |
|---|---|
| date | Wed, 19 Aug 2026 14:30:49 +0200 |
| parents | c33fe2ff7091 |
| children | 663566c7bc0f |
| files | Sources/EducationPluginsApi.cpp |
| diffstat | 1 files changed, 13 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/Sources/EducationPluginsApi.cpp Wed Aug 19 14:14:45 2026 +0200 +++ b/Sources/EducationPluginsApi.cpp Wed Aug 19 14:30:49 2026 +0200 @@ -30,9 +30,9 @@ #include "../Resources/Orthanc/Plugins/OrthancPluginCppWrapper.h" -void GetProjectMembers(OrthancPluginRestOutput* output, - const char* url, - const OrthancPluginHttpRequest* request) +void GetProjectInfo(OrthancPluginRestOutput* output, + const char* url, + const OrthancPluginHttpRequest* request) { if (request->authenticationPayloadSize != 0) { @@ -67,8 +67,13 @@ { answer["name"] = project->GetName(); answer["description"] = project->GetDescription(); - HttpToolbox::CopySetOfStrings(answer["instructors"], project->GetInstructors()); - HttpToolbox::CopySetOfStrings(answer["learners"], project->GetLearners()); + answer["policy"] = EnumerationToString(project->GetPolicy()); + + /** + * It makes no sense to report "project->GetInstructors()" and + * "project->GetLearners()" here, as they might be pointless + * (for instance, if using LTI-based authentication). + **/ } } @@ -79,7 +84,8 @@ void RegisterEducationPluginsApiRoutes() { - // All the routes below must be branched under "/education/api-plugins/" + // All the routes below must be branched under "/education/api-plugins/", + // which is protected by "DoAuthorization()" - OrthancPlugins::RegisterRestCallback<GetProjectMembers>("/education/api-plugins/project-info", true); + OrthancPlugins::RegisterRestCallback<GetProjectInfo>("/education/api-plugins/project", true); }
