/** * @see org.olat.login.auth.AuthenticationController#init(org.olat.core.gui.UserRequest, * org.olat.core.gui.control.WindowControl) */ public OLATAuthenticationController(UserRequest ureq, WindowControl winControl) { // use fallback translator to registration module super( ureq, winControl, Util.createPackageTranslator(RegistrationManager.class, ureq.getLocale())); loginComp = createVelocityContainer("olat_log", "olatlogin"); if (userModule.isAnyPasswordChangeAllowed()) { pwLink = LinkFactory.createLink("_olat_login_change_pwd", "menu.pw", loginComp, this); pwLink.setElementCssClass("o_login_pwd"); } if (registrationModule.isSelfRegistrationEnabled() && registrationModule.isSelfRegistrationLoginEnabled()) { registerLink = LinkFactory.createLink("_olat_login_register", "menu.register", loginComp, this); registerLink.setElementCssClass("o_login_register"); registerLink.setTitle("menu.register.alt"); } // prepare login form loginForm = new OLATAuthentcationForm(ureq, winControl, "olat_login", getTranslator()); listenTo(loginForm); loginComp.put("loginForm", loginForm.getInitialComponent()); // Check if form is triggered by external loginworkflow that has been failed if (ureq.getParameterSet().contains(PARAM_LOGINERROR)) { showError(translate("login.error", WebappHelper.getMailConfig("mailReplyTo"))); } putInitialPanel(loginComp); }
@Override protected void initRuntimeTools(Dropdown toolsDropdown) { if (reSecurity.isEntryAdmin()) { membersLink = LinkFactory.createToolLink( "members", translate("details.members"), this, "o_sel_repo_members"); membersLink.setIconLeftCSS("o_icon o_icon-fw o_icon_membersmanagement"); toolsDropdown.addComponent(membersLink); } if (reSecurity.isEntryAdmin() || reSecurity.isCourseCoach() || reSecurity.isGroupCoach()) { assessmentLink = LinkFactory.createToolLink( "assessment", translate("command.openassessment"), this, "o_icon_assessment_tool"); assessmentLink.setElementCssClass("o_sel_course_assessment_tool"); toolsDropdown.addComponent(assessmentLink); } if (reSecurity.isEntryAdmin()) { RepositoryEntry re = getRepositoryEntry(); ordersLink = LinkFactory.createToolLink( "bookings", translate("details.orders"), this, "o_sel_repo_booking"); ordersLink.setIconLeftCSS("o_icon o_icon-fw o_icon_booking"); boolean booking = acService.isResourceAccessControled(re.getOlatResource(), null); ordersLink.setEnabled(booking); toolsDropdown.addComponent(ordersLink); } }
private void init(UserRequest ureq) { startButton = LinkFactory.createButton("start", myContent, this); startButton.setElementCssClass("o_sel_start_qti12_test"); startButton.setPrimary(true); startButton.setVisible(!userCourseEnv.isCourseReadOnly()); // fetch disclaimer file String sDisclaimer = (String) modConfig.get(IQEditController.CONFIG_KEY_DISCLAIMER); if (sDisclaimer != null) { VFSContainer baseContainer = userCourseEnv.getCourseEnvironment().getCourseFolderContainer(); int lastSlash = sDisclaimer.lastIndexOf('/'); if (lastSlash != -1) { baseContainer = (VFSContainer) baseContainer.resolve(sDisclaimer.substring(0, lastSlash)); sDisclaimer = sDisclaimer.substring(lastSlash); // first check if disclaimer exists on filesystem if (baseContainer == null || baseContainer.resolve(sDisclaimer) == null) { showWarning("disclaimer.file.invalid", sDisclaimer); } else { // screenreader do not like iframes, display inline iFrameCtr = new IFrameDisplayController(ureq, getWindowControl(), baseContainer); listenTo(iFrameCtr); // dispose automatically myContent.put("disc", iFrameCtr.getInitialComponent()); iFrameCtr.setCurrentURI(sDisclaimer); myContent.contextPut("hasDisc", Boolean.TRUE); } } } // push title and learning objectives, only visible on intro page myContent.contextPut("menuTitle", courseNode.getShortTitle()); myContent.contextPut("displayTitle", courseNode.getLongTitle()); // Adding learning objectives String learningObj = courseNode.getLearningObjectives(); if (learningObj != null) { Component learningObjectives = ObjectivesHelper.createLearningObjectivesComponent(learningObj, ureq); myContent.put("learningObjectives", learningObjectives); myContent.contextPut("hasObjectives", learningObj); // dummy value, just an exists operator } if (type.equals(AssessmentInstance.QMD_ENTRY_TYPE_ASSESS)) { checkChats(ureq); singleUserEventCenter.registerFor( this, getIdentity(), InstantMessagingService.TOWER_EVENT_ORES); } }