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

Merge remote-tracking branch 'origin/OpenOLAT_15.2'

parents 96736e54 c0e4d5bf
No related branches found
No related tags found
No related merge requests found
......@@ -139,7 +139,6 @@ import org.olat.instantMessaging.OpenInstantMessageEvent;
import org.olat.modules.assessment.ui.AssessmentToolSecurityCallback;
import org.olat.modules.lecture.LectureModule;
import org.olat.modules.lecture.LectureService;
import org.olat.modules.lecture.RepositoryEntryLectureConfiguration;
import org.olat.modules.lecture.ui.LectureRepositoryAdminController;
import org.olat.modules.lecture.ui.LecturesSecurityCallback;
import org.olat.modules.lecture.ui.LecturesSecurityCallbackFactory;
......@@ -626,8 +625,7 @@ public class CourseRuntimeController extends RepositoryEntryRuntimeController im
}
private boolean isLectureEnabled() {
RepositoryEntryLectureConfiguration lectureConfig = lectureService.getRepositoryEntryLectureConfiguration(getRepositoryEntry());
return lectureConfig != null && lectureConfig.isLectureEnabled();
return lectureService.isRepositoryEntryLectureEnabled(getRepositoryEntry());
}
private void initToolsMenuStatistics(Dropdown tools, ICourse course, final UserCourseEnvironmentImpl uce) {
......
......@@ -53,9 +53,7 @@ import org.olat.course.run.userview.UserCourseEnvironment;
import org.olat.course.run.userview.UserCourseEnvironmentImpl;
import org.olat.modules.assessment.ui.event.AssessmentFormEvent;
import org.olat.modules.coach.model.EfficiencyStatementEntry;
import org.olat.modules.lecture.LectureModule;
import org.olat.modules.lecture.LectureService;
import org.olat.modules.lecture.RepositoryEntryLectureConfiguration;
import org.olat.modules.lecture.ui.ParticipantLectureBlocksController;
import org.olat.repository.RepositoryEntry;
import org.olat.repository.RepositoryEntrySecurity;
......@@ -92,9 +90,6 @@ public class UserDetailsController extends BasicController implements Activateab
private final Identity assessedIdentity;
@Autowired
private LectureModule lectureModule;
@Autowired
private LectureService lectureService;
@Autowired
......@@ -138,12 +133,9 @@ public class UserDetailsController extends BasicController implements Activateab
segmentView.addSegment(assessmentLink, selectSegment == Segment.assessment);
}
if(lectureModule.isEnabled()) {
RepositoryEntryLectureConfiguration lectureConfig = lectureService.getRepositoryEntryLectureConfiguration(entry);
if(lectureConfig != null && lectureConfig.isLectureEnabled()) {
lecturesLink = LinkFactory.createLink("details.lectures", mainVC, this);
segmentView.addSegment(lecturesLink, selectSegment == Segment.lectures);
}
if(lectureService.isRepositoryEntryLectureEnabled(entry)) {
lecturesLink = LinkFactory.createLink("details.lectures", mainVC, this);
segmentView.addSegment(lecturesLink, selectSegment == Segment.lectures);
}
if(selectSegment == Segment.assessment) {
......
......@@ -62,7 +62,7 @@ public interface LectureService {
/**
* Get (or create) the configuration object for the specified repossitory
* Get (or create) the configuration object for the specified repository
* entry.
*
* @param entry
......@@ -72,9 +72,8 @@ public interface LectureService {
/**
*
*
* @param entry
* @return
* @param entry The course
* @return true if the module is enabled and the course has the lectures enabled
*/
public boolean isRepositoryEntryLectureEnabled(RepositoryEntryRef 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