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

OO-1220: backport student overview of statement, fix issue with the score

parent 9696571b
No related branches found
No related tags found
No related merge requests found
......@@ -57,6 +57,7 @@ import org.olat.core.logging.OLATSecurityException;
import org.olat.core.util.WebappHelper;
import org.olat.core.util.resource.OresHelper;
import org.olat.core.util.vfs.QuotaManager;
import org.olat.modules.coach.ui.StudentOverviewController;
import org.olat.properties.Property;
import org.olat.user.ChangePrefsController;
import org.olat.user.DisplayPortraitController;
......@@ -90,6 +91,7 @@ public class UserAdminController extends BasicController implements Activateable
private static final String NLS_EDIT_UQUOTA = "edit.uquota";
private static final String NLS_VIEW_GROUPS = "view.groups";
private static final String NLS_VIEW_COURSES = "view.courses";
private static final String NLS_VIEW_EFF_STATEMENTS = "view.effStatements";
private static final String NLS_VIEW_SUBSCRIPTIONS = "view.subscriptions";
private VelocityContainer myContent;
......@@ -105,6 +107,7 @@ public class UserAdminController extends BasicController implements Activateable
private ProfileAndHomePageEditController userProfileCtr;
private CourseOverviewController courseCtr;
private GroupOverviewController grpCtr;
private StudentOverviewController efficicencyCtrl;
/**
......@@ -216,7 +219,9 @@ public class UserAdminController extends BasicController implements Activateable
Identity editor = ureq.getUserSession().getIdentity();
SecurityGroup frentixSuperAdminGroup = BaseSecurityManager.getInstance().findSecurityGroupByName("fxadmins");
if(BaseSecurityManager.getInstance().isIdentityInSecurityGroup(identity, frentixSuperAdminGroup)){
if(editor.equals(identity)) return true;
if(editor.equals(identity) || BaseSecurityManager.getInstance().isIdentityInSecurityGroup(editor, frentixSuperAdminGroup)) {
return true;
}
return false;
}
......@@ -307,6 +312,11 @@ public class UserAdminController extends BasicController implements Activateable
courseCtr = new CourseOverviewController(ureq, getWindowControl(), identity);
listenTo(courseCtr);
userTabP.addTab(translate(NLS_VIEW_COURSES), courseCtr.getInitialComponent());
if (isOlatAdmin) {
efficicencyCtrl = new StudentOverviewController(ureq, getWindowControl(), identity);
userTabP.addTab(translate(NLS_VIEW_EFF_STATEMENTS), efficicencyCtrl.getInitialComponent());
}
Boolean canSubscriptions = BaseSecurityModule.USERMANAGER_CAN_MODIFY_SUBSCRIPTIONS;
if (canSubscriptions.booleanValue() || isOlatAdmin) {
......
......@@ -23,10 +23,8 @@ import java.util.ArrayList;
import java.util.List;
import org.olat.core.gui.components.table.TableDataModel;
import org.olat.course.assessment.AssessmentHelper;
import org.olat.course.assessment.UserEfficiencyStatement;
import org.olat.modules.coach.model.EfficiencyStatementEntry;
import org.olat.modules.coach.ui.ProgressValue;
/**
*
......@@ -64,7 +62,7 @@ public class UserEfficiencyStatementTableDataModel implements TableDataModel<Use
}
case score: {
UserEfficiencyStatement s = entry;
return s == null ? null : AssessmentHelper.getRoundedScore(s.getScore());
return s == null ? null : s.getScore();
}
case passed: {
UserEfficiencyStatement s = entry;
......
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