/** Reset all flags(expand,collapse,auto numbering) and set all indexes to -1 and lists to null */
  public void resetValues() {
    setShowModuleId(-1);
    nomodsFlag = null;
    count = 0;
    selectedModId = -1;
    moduleSelected = false;
    selectedModIds = null;
    selectedSecIds = null;

    selectedSecId = -1;
    sectionSelected = false;
    FacesContext ctx = FacesContext.getCurrentInstance();
    ValueBinding binding = Util.getBinding("#{authorPreferences}");
    AuthorPreferencePage preferencePage = (AuthorPreferencePage) binding.getValue(ctx);
    String expFlag = preferencePage.getUserView();
    if (expFlag.equals("true")) {
      expandAllFlag = true;
    } else {
      expandAllFlag = false;
    }
    String autonum = preferencePage.getMaterialAutonumber();
    if (autonum.equals("true")) {
      autonumber = true;
    } else {
      autonumber = false;
    }
    selectAllFlag = false;
    listSize = 0;
    moduleDateBeans = null;
    mdbeansMap = null;
    secObjMap = null;
  }
  public ListAuthModulesPage() {

    FacesContext context = FacesContext.getCurrentInstance();
    ValueBinding binding = Util.getBinding("#{meleteSiteAndUserInfo}");
    MeleteSiteAndUserInfo mPage = (MeleteSiteAndUserInfo) binding.getValue(context);

    courseId = mPage.getCurrentSiteId();
    userId = mPage.getCurrentUser().getId();

    Map params = context.getExternalContext().getRequestParameterMap();
    if (((String) params.get("listauthmodulesform:lamexp")) == null) {
      nomodsFlag = null;
      setShowModuleId(-1);
      count = 0;
      selectedModId = -1;
      moduleSelected = false;
      selectedModIds = null;
      selectedSecIds = null;

      selectedSecId = -1;
      sectionSelected = false;
      selectAllFlag = false;
      listSize = 0;
      binding = Util.getBinding("#{authorPreferences}");
      AuthorPreferencePage preferencePage = (AuthorPreferencePage) binding.getValue(context);
      String expFlag = preferencePage.getUserView();
      if (expFlag.equals("true")) {
        expandAllFlag = true;
      } else {
        expandAllFlag = false;
      }
    }
  }