private void doConfirm(UserRequest ureq) {
   if (registrant != null) {
     String confirmUrl = registrant.getConfirmUrl();
     if (confirmUrl != null) {
       RedirectMediaResource redirect = new RedirectMediaResource(confirmUrl);
       ureq.getDispatchResult().setResultingMediaResource(redirect);
     }
   }
   updateButtons();
 }
  private void doJoin(UserRequest ureq) {
    boolean join = false;
    GoToError error = new GoToError();
    if (registrant == null) {
      registrant = meetingMgr.registerTraining(meeting, getIdentity(), error);
    }
    if (registrant != null) {
      String joinUrl = registrant.getJoinUrl();
      if (joinUrl != null) {
        RedirectMediaResource redirect = new RedirectMediaResource(joinUrl);
        ureq.getDispatchResult().setResultingMediaResource(redirect);
        join = true;
      }
    }
    if (!join) {
      final String errorMessage;
      if (error.hasError()) {
        if (error.getError() != null) {
          errorMessage = translate(error.getError().i18nKey());
        } else {
          errorMessage = translate("error.code.unkown");
        }
      } else {
        errorMessage = translate("error.code.unkown");
      }

      ControllerCreator creator =
          BaseFullWebappPopupLayoutFactory.createAuthMinimalPopupLayout(
              ureq,
              new ControllerCreator() {
                @Override
                public Controller createController(UserRequest lureq, WindowControl lwControl) {
                  // Wrap in column layout, popup window needs a layout controller
                  String title = "";
                  String text = errorMessage;
                  Controller ctr =
                      MessageUIFactory.createErrorMessage(lureq, lwControl, title, text);
                  LayoutMain3ColsController layoutCtr =
                      new LayoutMain3ColsController(lureq, lwControl, ctr);
                  layoutCtr.addDisposableChildController(ctr);
                  return layoutCtr;
                }
              });

      openInNewBrowserWindow(ureq, creator);
    }
    updateButtons();
  }
 private void doStart(UserRequest ureq) {
   if (registrant == null) {
     GoToError error = new GoToError();
     registrant = meetingMgr.registerTraining(meeting, getIdentity(), error);
   }
   GoToError error = new GoToError();
   String startUrl = meetingMgr.startTraining(meeting, error);
   if (startUrl != null) {
     RedirectMediaResource redirect = new RedirectMediaResource(startUrl);
     ureq.getDispatchResult().setResultingMediaResource(redirect);
   } else if (error.getError() == GoToErrors.TrainingInSession) {
     String joinUrl = registrant.getJoinUrl();
     RedirectMediaResource redirect = new RedirectMediaResource(joinUrl);
     ureq.getDispatchResult().setResultingMediaResource(redirect);
   }
 }