code: public Map<String, CmsModuleVersion> getInstalledModules() {
  
          String file = CmsModuleConfiguration.DEFAULT_XML_FILE_NAME;
          // /opencms/modules/module[?]
          String basePath = new StringBuffer("/").append(CmsConfigurationManager.N_ROOT).append("/").append(
              CmsModuleConfiguration.N_MODULES).append("/").append(CmsModuleXmlHandler.N_MODULE).append(
                  "[?]/").toString();
          Map<String, CmsModuleVersion> modules = new HashMap<String, CmsModuleVersion>();
          String name = "";
          for (int i = 1; name != null; i++) {
              if (i > 1) {
                  String ver = CmsModuleVersion.DEFAULT_VERSION;
                  try {
                      ver = getXmlHelper().getValue(
                          file,
                          CmsStringUtil.substitute(basePath, "?", "" + (i - 1)) + CmsModuleXmlHandler.N_VERSION);
                  } catch (@SuppressWarnings("unused") CmsXmlException e) {
                      // ignore
                  }
                  modules.put(name, new CmsModuleVersion(ver));
              }
              try {
                  name = getXmlHelper().getValue(
                      file,
                      CmsStringUtil.substitute(basePath, "?", "" + i) + CmsModuleXmlHandler.N_NAME);
              } catch (@SuppressWarnings("unused") CmsXmlException e) {
                  // ignore
              }
          }
          return modules;
      }
docs: Returns a map of all previously installed modules.<p>
  
  @return a map of <code>[String, {@link org.opencms.module.CmsModuleVersion}]</code> objects
  
  @see org.opencms.module.CmsModuleManager#getAllInstalledModules()