User Tools

Site Tools


emis_developer_manual

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
emis_developer_manual [2026/01/02 20:44] – [Public REST API] ghacheyemis_developer_manual [2026/04/08 07:08] (current) – [[Optional] Various Visual Studio Configuration] ghachey
Line 283: Line 283:
 === Tab vs Spaces Setup === === Tab vs Spaces Setup ===
  
-In VS you can set the handling of tabs for each file type. VS will expand the tab to the number of spaces you specify when the file is displayed. So it doesn't matter what tab size you specify, the file will look nicely indented, if you use the VS option to replace tabs with spacesThis will cause inconsistent indentations when reading the file with any other default tab stop. In particular, you'll see strange behavior when the file is displayed in SourceTree. +Spaces are now to be used instead of tabs. They work better in a world where AI is heavily used. Developers of Pacific EMIS has agreed on:
- +
-The original developers of this project agree to Use Keep Tabs option as shown below for all file types. To do this go into** Tools - Options - Text Editor** settings. +
- +
-This needs to be set for each file type. Developers of Pacific EMIS has agreed on:+
  
   * C#: 4 spaces   * C#: 4 spaces
   * Everything else (CSS/Javascript/TypeScript): 2 spaces   * Everything else (CSS/Javascript/TypeScript): 2 spaces
  
-Below is example of setting up Javascript.+This configuration is enforced using a .editorconfig right in the root of the repository.
  
-{{ :developer-manual:vs-tabs-settings.png }} +CSS you can turn off the hierarchical indentation.
- +
-CSS would be the same as Javascript except you can turn off the hierarchical indentation.+
  
 {{ :developer-manual:css-indentation-configuration.jpg?nolink |}} {{ :developer-manual:css-indentation-configuration.jpg?nolink |}}
- 
-And then C#. 
- 
-{{ :developer-manual:tab-vs-settings-1.png?nolink |}} 
- 
-In SourceTree, the built-in diff viewer always expands tabs as 4 spaces. It works best for seeing what “real” differences are between versions to use the option Ignore Whitespace as shown below. Although the change in white space will not be displayed, it will still be regarded by git as a change to the file. 
- 
-{{ :developer-manual:tab-vs-settings-2.png?nolink |}} 
- 
-Also note these options in Visual Studio under **Edit - Advanced**: 
- 
-  * **Tabify Selected Lines** - converts leading spaces to tabs. Respects the tab size setting in **Tools - Options** when making this conversion. It is recommended to run this on files before submitting a commit. 
-  * **View White Space** - toggle display spaces and tabs (CTRL-E,S) 
  
 ==== Troubleshooting Visual Studio Build/Run Errors ==== ==== Troubleshooting Visual Studio Build/Run Errors ====
Line 1092: Line 1073:
  
 <note important>One thing that we are not able to deliver from the local server is the google fonts; and the (phasing out) fontawesome fonts. The google fonts have to come from google. So if these are not previously loaded (in browser cache) then we need an internet connection to get them. This is really the only thing that forces us across the internet now. If Pacific EMIS cannot get these google fonts; then the ‘character equivalent’ of each icon in font family material-icons is displayed. Hence you see odd bits of text on the screen where there should be an icon. There is not much we can do about this, but it is worth noting that this is not affected by remote mode; in fact in remote mode, if there is no internet connection, then you would need to get all the libraries from browser cache for the app to have a hope of working.</note> <note important>One thing that we are not able to deliver from the local server is the google fonts; and the (phasing out) fontawesome fonts. The google fonts have to come from google. So if these are not previously loaded (in browser cache) then we need an internet connection to get them. This is really the only thing that forces us across the internet now. If Pacific EMIS cannot get these google fonts; then the ‘character equivalent’ of each icon in font family material-icons is displayed. Hence you see odd bits of text on the screen where there should be an icon. There is not much we can do about this, but it is worth noting that this is not affected by remote mode; in fact in remote mode, if there is no internet connection, then you would need to get all the libraries from browser cache for the app to have a hope of working.</note>
 +
 ===== Low Level Documentation and API ===== ===== Low Level Documentation and API =====
  
Line 1121: Line 1103:
   *   Also use pTeacherRead.TeacherSurveyV which provides denormalised values (school, surveyYear).   *   Also use pTeacherRead.TeacherSurveyV which provides denormalised values (school, surveyYear).
  
-===== Accessing TeacherSurvey XML =====+=== Accessing TeacherSurvey XML ===
  
 The functions pTeacherRead.Activities and pTeacherRead.TeacherQualCert shred the source XML on TeacherSurvey into relational records. The functions pTeacherRead.Activities and pTeacherRead.TeacherQualCert shred the source XML on TeacherSurvey into relational records.
  
-===== Main functions =====+=== Main functions ===
  
   * Handles both formats (PDF/XLSX) of source XML to produce a common rowset — consumers downstream of these functions deal with a consistent data format regardless of collection source.   * Handles both formats (PDF/XLSX) of source XML to produce a common rowset — consumers downstream of these functions deal with a consistent data format regardless of collection source.
Line 1151: Line 1133:
   * Includes teaching staff and non‑teaching staff (A, X).   * Includes teaching staff and non‑teaching staff (A, X).
  
-==== Common filters on TeacherLocation ====+=== Common filters on TeacherLocation ===
  
 TAMX in ('T','M') — filters to staff performing some teaching duty. M staff also perform Admin or X Other duties. TAMX in ('T','M') — filters to staff performing some teaching duty. M staff also perform Admin or X Other duties.
Line 1169: Line 1151:
 All teacher reporting from the warehouse should ultimately draw from warehouse.TeacherLocation so that interpretations of Allocated and Qualified/Certified match those embodied in pTeacherRead.TeacherQualCert. All teacher reporting from the warehouse should ultimately draw from warehouse.TeacherLocation so that interpretations of Allocated and Qualified/Certified match those embodied in pTeacherRead.TeacherQualCert.
  
-==== Examples ====+=== Examples ===
  
 <code sql> <code sql>
Line 1197: Line 1179:
 To overcome this, we weight a teacher's activities as a fraction of all their teaching activities. If Teacher A has 2 activities (1 in ISCED 1 and 1 in ISCED 2), their weighting for ISCED 1 is 0.5 and for ISCED 2 is 0.5, so their contribution to the page total is 1. To overcome this, we weight a teacher's activities as a fraction of all their teaching activities. If Teacher A has 2 activities (1 in ISCED 1 and 1 in ISCED 2), their weighting for ISCED 1 is 0.5 and for ISCED 2 is 0.5, so their contribution to the page total is 1.
  
-==== Terminology ====+=== Terminology ===
  
 FTPT (Full Time / Part Time) weighting — teaching activities in some group (ISCED, EdLevel, Sector, Class Level) as a fraction of the total teaching activities of that teacher. FTPT (Full Time / Part Time) weighting — teaching activities in some group (ISCED, EdLevel, Sector, Class Level) as a fraction of the total teaching activities of that teacher.
Line 1219: Line 1201:
 Summary: a teacher will have entries in this table (for a given year) for each ISCED Level in which they teach; exactly one of these records will have Allocated = 1. Summary: a teacher will have entries in this table (for a given year) for each ISCED Level in which they teach; exactly one of these records will have Allocated = 1.
  
-==== Head Count (unweighted totals) ====+=== Head Count (unweighted totals) ===
  
 Head Count = number of teachers who do any activity in that group regardless of other activities. One teacher may be included in multiple categories; head counts cannot be summed without double counting. Head Count = number of teachers who do any activity in that group regardless of other activities. One teacher may be included in multiple categories; head counts cannot be summed without double counting.
emis_developer_manual.1767386659.txt.gz · Last modified: 2026/01/02 20:44 by ghachey