Examples of ISISession


Examples of org.cast.isi.ISISession

   */
  public RatePanel(String id, ContentLoc contentLoc, String xmlId, String promptText) {
    super(id);
    this.contentLoc = contentLoc;
    this.xmlId = xmlId;
    ISISession session = ISISession.get();
    mUser = session.getTargetUserModel();
   
    // If teacher logged in, show ratings of the student they are looking at.
    boolean isTeacher = ISISession.get().getUser().getRole().subsumes(Role.TEACHER);
    if (isTeacher)
      readOnly = true;
View Full Code Here

Examples of org.cast.isi.ISISession

    }

    @Override
    protected void onSubmit()  {
      log.info("Login::onSubmit");
      ISISession session = ISISession.get();
      if(session.signIn((String)username.getModelObject(), (String)password.getModelObject())){

        eventService.createLoginSession(getRequest());
        eventService.saveLoginEvent();
       
        User user = session.getUser();
        if (!user.isValid()) {
          String notConfirmed = new StringResourceModel("Login.notConfirmed", this, null, "Account not confirmed.").getString();
          error(notConfirmed);
          return;
        }

        // Set default Period
        if (user != null && user.usesPeriods()) {
          session.setCurrentPeriodModel(new HibernateObjectModel<Period>(user.getPeriods().iterator().next()));
          Site currentSite = ISISession.get().getCurrentPeriodModel().getObject().getSite();
          IModel<Site> mCurrentSite = new Model<Site>(currentSite);
          session.setCurrentSiteModel(mCurrentSite);
        }       

        if (!continueToOriginalDestination()) {
          setResponsePage(getApplication().getHomePage());
          setRedirect(true);
View Full Code Here

Examples of org.cast.isi.ISISession

    addButton("up");
    addButton("side");
    addButton("down");

    ISISession session = ISISession.get();
    IModel<User> mUser = session.getTargetUserModel();

    // If teacher logged in, show ratings of the student they are looking at.
    boolean isTeacher = ISISession.get().getUser().getRole().subsumes(Role.TEACHER);
    if (isTeacher)
      readOnly = true;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.