Skip to content
Snippets Groups Projects
Commit dfc8b8f6 authored by srosse's avatar srosse
Browse files

OO-200: Instructor permission mapped to coach and not author

parent 6bc49a34
No related branches found
No related tags found
No related merge requests found
......@@ -265,13 +265,20 @@ public class LTIRunController extends BasicController {
* @return
*/
private String setRoles(Roles roles) {
StringBuilder rolesStr = new StringBuilder("Learner");
if (roles.isAuthor()) rolesStr.append(",").append("Instructor");
if (roles.isOLATAdmin()) rolesStr.append(",").append("Administrator");
StringBuilder rolesStr;
if (roles.isGuestOnly()) {
rolesStr = new StringBuilder();
rolesStr.append("Guest");
rolesStr = new StringBuilder("Guest");
} else {
rolesStr = new StringBuilder("Learner");
boolean coach = courseEnv.getCourseGroupManager().isIdentityCourseCoach(getIdentity());
if (coach) {
rolesStr.append(",").append("Instructor");
}
if (roles.isOLATAdmin()) {
rolesStr.append(",").append("Administrator");
}
}
return rolesStr.toString();
}
......
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