Browse Source

Move attributes into object-attribute-reference and database-structure into db directory

pull/816/head
Augusto 3 years ago committed by Clément
parent
commit
f0a9a35a5f
  1. 47
      docs/attributes.md
  2. 57
      docs/db/database-structure.md
  3. 87
      docs/object-attribute-reference.md

47
docs/attributes.md

@ -1,47 +0,0 @@
# Object Attributes (attrs)
# This is still a work in progress (mistakes are common).
## For objects that have associated events
> Required in **bold**
- duration: number; The number of users that can be admitted in the event associated to the event.
- eventStartDelay: The number of minutes before the the event starts after the startAt field of the event.
- eventDuration: number; The duration in minutes of the event associated to the object.
- groupSize: number; The number of students that are required to be part of a group.
- groupMax: number; The max amount of members a group should have to be created.
- groupMin: number; The minimum amount of members a group should have to be created.
- expectedXp: number; The amount of Xp an object gives.
- baseXp: number; The starting point of the XP. It's used to calculate the xp per child object.
## Some specific attributes for object types:
- Exercise
- **language**: string; The programming language of the exercise, ex: 'go'
- start: type; Description
- delay: number; The amount of minutes that has to pass after the previous object before the current one is unlocked.
- special: boolean; True for a hackaton.
- startDay: number; The day relative to the beginning of the event associated to the parent event.
- scopeStart
- scopeEnd
- scopeExtraDuration
- auditsRequired: number; The number of approved audits that need to be done to consider an exercise as approved
- exerciseType: string
- `required`
- `enrichment`
- `bonus`
- `asynchronous`
- `synchronous`
- inScope, This attribute is used to determine if the exercise gives XP or not. If an exercise is not in scope then it doesn't give XP.
- status: It can have the values `blocked`, `available`, `succeeded` or `failed`.
- hasStarted
- rootName
- repositoryPath
- difficulty: A number that represents how hard it should be to complete an exercise (as much as that can be quantified).
- difficultyMod: A multipliyer of the difficulty
- Exam exercises:
On top of the exercise of the attributes of a normal exercise exam exercises need the following attributes.
- **group**: number; Identifies the position that an exercise can take in an exam.
e exam takes exercises randomly for each group. For instance: the first exercise of the exam will be an exercise with `group` = 1, the second one will be an exercise with `group` = 2, and so on.
- Onboarding
- phase
- submitted
- editing

57
docs/database-structure.md → docs/db/database-structure.md

@ -119,8 +119,20 @@ Objects are generic representations of elements in the structure of the curricul
Columns: Columns:
- id - id
- name - name
- type: See [object_type](#object_type) for the possible types. - type:
- `onboarding`
- `campus`
- `exercise`
- `quest`
- `signup`
- `exam`
- `raid`
- `project`
- `piscine`
- status: (Currently not in used, but it should always be `online` to avoid errors TODO: remove at some point). - status: (Currently not in used, but it should always be `online` to avoid errors TODO: remove at some point).
- `online`
- `offline`
- `draft`
- attrs: See [object attributes](attributes.md). - attrs: See [object attributes](attributes.md).
- childrenAttrs: Attributes that are applied to all the children objects. - childrenAttrs: Attributes that are applied to all the children objects.
- createdAt - createdAt
@ -128,7 +140,7 @@ Columns:
- externalRelationUrl (Maybe not needed). - externalRelationUrl (Maybe not needed).
- authorId (Maybe not needed). - authorId (Maybe not needed).
- campus: The campus the object is related to. - campus: The campus the object is related to.
- referenceId: If the object is a duplication this points to the reference (or creation) object. - referenceId: If the object is a duplication this field points to the reference object.
- referencedAt: The timestamp of the creation of the copy object. - referencedAt: The timestamp of the creation of the copy object.
### object_child ### object_child
@ -143,30 +155,6 @@ Columns:
- key: When generating the JS object this field will be the `key` of the child. It is also used in the url. - key: When generating the JS object this field will be the `key` of the child. It is also used in the url.
- index: Defines the position of the child object inside the parent object. - index: Defines the position of the child object inside the parent object.
### object_status
Columns:
- status
Possible values:
- `online`
- `offline`
- `draft`
### object_type
Columns:
- type
Possible values:
- `onboarding`
- `campus`
- `exercise`
- `quest`
- `signup`
- `exam`
- `raid`
- `project`
- `piscine`
### progress ### progress
It is a register of the steps in the progression of students doing the exercises and projects. It is a register of the steps in the progression of students doing the exercises and projects.
@ -234,7 +222,12 @@ Columns:
- grade - grade
- progressId: Not used anymore (TODO: Remove) - progressId: Not used anymore (TODO: Remove)
- attrs - attrs
- type, For the possible types see the table [result_type](#result_type) - type:
- `tester`
- `user_audit`
- `admit_audit`
- `admin_selection`
- `status`
- userId - userId
- groupId - groupId
- objectId - objectId
@ -244,16 +237,6 @@ Columns:
- isLast, Used to represent transitory states. A progress is only considered finished when `isLast` is `true`. - isLast, Used to represent transitory states. A progress is only considered finished when `isLast` is `true`.
- campus - campus
### result_type
Columns:
- type
- `tester`
- `user_audit`
- `admit_audit`
- `admin_selection`
- `status`
### role ### role
Columns: Columns:

87
docs/object-attribute-reference.md

@ -1,21 +1,66 @@
# Object Attribute Reference # Object Attributes (attrs)
## List all **USABLE** preset object attributes # This is still a work in progress (mistakes are common).
| Attribute | Type | Value | Description | ## For objects that have associated events
| ----------------- | -------- | ---------------------------------------------------------------------- | ------------------------------------------------------- |
| `xp` | function | `exerciceExpCalculation`, `examExpCalculation` or `raidExpCalculation` | Amount of experience points that an object will give. | > Required in **bold**
| `correctionPrice` | function | `correctionPrice` | Amount of correction points needed to test an exercise. |
| `duration` | number | | | - **capacity**: number; The number of users that can be admitted in the event associated to the event.
| `time` | string | | | - **registrationDuration**: number; The time of minutes a registrations lasts.
| `info` | object | | | - **eventDuration**: number; The duration in minutes of the event associated to the object.
- eventStartDelay: number: The time in minutes between the end of the registration and the beginning of the event.
## List all **RESERVED** preset object attributes - expectedXp: number; The amount of `Xp` an object gives.
- baseXp: number; The starting point of the `Xp`. It's used to calculate the `Xp` per child object.
| Attribute | Type | Value | Description |
| ------------ | -------- | ----- | ----------- | ## Some specific attributes for object types:
| `scopeStart` | function | | |
| `scopeEnd` | function | | | - Exercise
| `startDay` | function | | | - **language**: string; The programming language of the exercise, ex: 'go'
| `status` | function | | | - start: type; Description
| `week` | function | | | - delay: number; The amount of minutes that has to pass after the previous object before the current one is unlocked.
- special: boolean; True for a hackaton.
- startDay: number; The day relative to the beginning of the parent event.
- scopeStart
- scopeEnd
- scopeExtraDuration
- auditsRequired: number; The number of approved audits that need to be done to consider an exercise as approved
- exerciseType: string
- `required`
- `enrichment`
- `bonus`
- `asynchronous`
- `synchronous`
- inScope, This attribute is used to determine if the exercise gives `Xp` or not. If an exercise is not in scope then it doesn't give `Xp`.
- status: It can have the values `blocked`, `available`, `succeeded` or `failed`.
- hasStarted
- rootName
- repositoryPath
- difficulty: A number that represents how hard it should be to complete an exercise.
- difficultyMod: A multiplier of the difficulty
- Exam exercises:
On top of the exercise of the attributes of a normal exercise exam exercises need the following attributes.
- **group**: number; Identifies the position that an exercise can take in an exam. The exam takes exercises randomly for each group. For instance: the first exercise of the exam will be an exercise with `group` = 1, the second one will be an exercise with `group` = 2, and so on.
- Raid
- groupSize: number; The number of elements wanted in a raid group. The actual number of elements in a group will be depenedent in the availability of candidates. For example if the groupSize is 3 and there are 8 users in the event, you'll have groups with sizes: 3-3-2.
- Project
- groupMax: number; The max amount of members a group should have to be created.
- groupMin: number; The minimum amount of members a group should have to be created.
- Campus
- TODO
- Quest:
- TODO
- Piscine:
- TODO
- Onboarding:
- TODO
- Signup:
- TODO

Loading…
Cancel
Save