ECM Installation guide

Common Spreadsheet

Spreadsheet contains common data configuration and by default also all sheets used to store data (contacts, courses, schedules, registrations, certificates, email templates,...).
To install it correctly follow steps lower:
  • Copy spreadsheet template ECM CZ Spreadsheet Template v1.1
  • Open in script editor associated script "Copy of ECM CZ Template v1.1" remove "Copy of "
    • Optionally, if you plan use common ScriptDb, open associated script "Copy of ECM Script Database" remove "Copy of " and save it as new version, get project key and then in "ECM CZ Template v1.1" link it as library named "ECMScriptDatabase"
  • Check linked libraries, if they are in last version
  • Save script as new version
  • If you plan use it as selfacer web publish script as web application and copy project key (later is used in script properties as webscriptId)
  • Select script, run any method, e.g. onInstall, and enable access to Gmail 
  • Run onInstall method and optionally edit created script properties, minimally notifyAdministrator, webscriptId, and language (EN, CZ or any other if was configured in Configuration sheet, content is described later)
  • Reload spreadsheet or run onOpen, wait few second and select in menu Konfigurace(Configuration) / Vytvořit listy(Create sheets). All configured sheets will be created with column names in selected language.
  • Optionally modify in in onEdit method list of sheet names for which will be onEdit triggered and "Last change" column filled by time of the last modification, which is used in case of synchronization between sources. After modification script code don't forget  run any method, e.g. onInstall, to reautorize access to Gmail.

Self-care Web interface

In script project "ECM CZ Template v1.1" is script, which creates self-care web GUI based on Google Apps Script UI Service (it was created before better HTML Service was available), which can be inserted to Google Sittes as script gadget or executed independently but it is not possible to insert it via iframe to pages on external web servers (ok, I know, there is one possibility via proxy on GAE, but it is workaround breaking some rules :-).
Published script url can be enhanced by following parameters (see in onGet method):
  • page=email - returned page will be littlebit formatted with logo bar picture above and login/registration page will be displayed, it can used as is best way how to add to email template link to student profile
  • page=kurzy - returned page will display list of actually scheduled courses