9.5 KiB
Database
Used database schema is generated by ORM framework Doctrine from ReCodEx API source code. Tables are directly mapped to entities, which are PHP classes annotated with data provided by ORM framework. In the following text there is a brief description of each such entity. There may be some additional database tables for many-to-many relations between entities, but these tables are not discussed in detail because there are only two columns with keys of both related tables in each one. Graphical database schema is added as attachement to this documentation.
Assignment
Assignment table represents exercise assignment in a group. It holds keys of the exercise and group where is the exercise assigned. Other columns are:
- isPublic -- assignment can be public (visible to students) or private (visible only to supervisor of the group)
- submissionCountLimit -- number of attempts student can make to solve the exercise
- scoreConfig -- configuration for calculating point score; actual syntax depends on used score calculator
- firstDeadline -- date and time after that no new submissions are received
- allowSecondDeadline, secondDeadline -- flag if another deadline is allowed, date and time of that deadline
- maxPointsBeforeFirstDeadline, maxPointsBeforeSecondDedline -- maximal amount of points for correct solutions for first (respectively second) deadline
- scoreCalculator -- name of used score score calculator or NULL for API's default one
- canViewLimitRatios -- flag if student can view percentage of used time and memory limits for each test
- deletedAt -- assignment cannot be deleted due to possible numerous dependencies, but can be hidden from the users; published assignments have NULL value, deleted ones have time of deletion
Comment
CommentThread
Exercise
ExerciseFile
ExternalLogin
ForgottenPassword
Group
GroupMembership
HardwareGroup
HardwareGroupAvailabilityLog
Instance
Licence
LocalizedAssignment
Login
Permission
ReferenceExerciseSolution
ReferenceSolutionEvaluation
- referenceSolution -- solution to which this evaluation belongs to
- hwGroup -- hardware group which was used during execution on worker
- resultsUrl -- filserver address from which results of reference evaluation can be internally accessed
- evaluation -- associated general evaluation
ReportedErrors
All errors which were reported to api from backend are sent to administrator of system and also stored in this table.
- type -- textual description of error type
- recipients -- list of email addresses to which error was sent
- subject -- subject as it was sent in email
- sentAt -- datetime when email with error report was sent
- description -- message as it was sent in email
Resource
- id -- textual identification of resource
- permissions -- permissions associated with this resource
Role
Roles serves for distinction of what user can do or cannot do. Thus every user has to have assigned some particular role from which decisions about access rights are made.
- id -- role textual identification
- parentRole -- reference to parent role
- childRoles -- array of roles which have this one as parent
- permissions -- permissions which are connected to this role
RuntimeEnvironment
Stores information about supported environments which can be used for evaluation on workers.
- name -- human readable name of runtime environment
- language -- language which can be used in this environment
- extensions -- list of extensions in yaml format
- platform -- textual description of platform
- description -- some further description concerning this environment
Solution
- user -- user to whom this solution belongs to
- files -- exercise solution files which user uploaded and are associated with solution
- solutionRuntimeConfig -- runtime configuration which was used during execution on worker
- evaluated -- true if solution was evaluated and results were processed
SolutionEvaluation
- evaluatedAt -- datetime of evaluation creation
- initFailed -- if true then one of the initiation tasks failed thus solution cannot be even compiled
- score -- overall score of user solution
- points -- points which were assigned to user for this solution
- bonusPoints -- bonus points assigned by some of the supervisors
- isValid -- can be used to ban user solution of exercise due to various reasons
- evaluationFailed -- true if whole evaluation failed on worker
- resultYml -- whole YAML file with evaluation results acquired indirectly from worker
- testResults -- results of all tests associated with user solution
SolutionFile
Parent of this entity is UploadedFile
, only added field is solution to which this file is associated.
- solution -- associated solution to which file belongs to
SolutionRuntimeConfig
- name -- human readable identificator of runtime configuration
- runtimeEnvironment -- corresponding runtime environment
- jobConfigFilePath -- path to job configuration which is stored at api server
- createdAt -- datetime of entity creation
- createdFrom -- parent solution runtime configuration from which this one was created
Submission
- submittedAt -- datetime of submission creation
- note -- user can provide note to his/hers exercise solution
- resultsUrl -- URL pointed to fileserver from which results of submission can be internally downloaded
- assignment -- corresponding assignment to which submission belongs to
- user -- user to whom submission belongs to
- submittedBy -- user who submitted solution of exercise, can be supervisor for instance
- solution -- corresponding solution
- asynchronous -- exercise solution was submitted asynchronously, this happens when supervisor or superadmin submit solution for particular user
- evaluation -- evaluation of this submission
SubmissionFailure
Logically queue of failed submissions which deserves further attention from administrator. Administrator can then resolve this issue and information about that will be stored too.
- type -- type of failure, can be for example broker_reject or evaluation_failure
- description -- description of failure which was provided by backend
- submission -- associated submission which failed
- createdAt -- datetime of entity creation
- resolvedAt -- datetime when failure was resolved
- resolutionNote -- user can provide description when failure is resolved
TestResult
Represents result of one logical test from job configuration.
- testName -- name of test which was stated in job configuration
- status -- overall status of test
- solutionEvaluation -- evaluation to which test result belongs
- score -- score which was assigned to test evaluation by judge
- memoryExceeded -- true if memory limit was exceeded
- usedMemoryRatio -- float number from 0.0 to 1.0 which represents percentage of user solution memory usage against memory limit from configuration
- timeExceeded -- true if time limit was exceeded
- usedTimeRatio -- float number from 0.0 to 1.0 which represents percentage of user solution time usage against time limit from configuration
- exitCode -- exit code which whole test returns
- message -- provided only on non-zero exit code
- stats -- textual representation of whole information about evaluation of test which arrived from worker
- judgeOutput -- output textual message from judge
UploadedFile
Entity which represents one file which was uploaded to api server. This entity uses Single Table Inheritance and its children are ExerciseFile
and SolutionFile
entities.
- name -- original name of file uploaded to api
- localFilePath -- destination where file is stored on api server
- uploadedAt -- datetime of file upload
- fileSize -- size of uploaded file in bytes
- user -- user which uploaded particular file
User
Keeps information about all users which are registered in ReCodEx.
- degreesBeforeName -- degrees before name which user acquired
- firstName -- first name
- lastName -- surname
- degreesAfterName -- degrees after name
- email -- email address which is used for sending email notifications
- avatarUrl -- url of profile picture
- isVerified -- user verified his/hers email address (not used at the moment)
- isAllowed -- if this field is set to false user cannot sign in to application
- createdAt -- datetime of user registration
- instance -- instance to which user belongs to
- settings -- settings which are connected to this user
- memberships -- array of groups in which is user assigned
- exercises -- exercises which user created and is their author
- role -- role of the user which is used to determine privileges
UserAction
Stores information about what routes on api user visited and some additional information about it. This datas should be collected only from logged users.
- user -- which user performed api request
- loggedAt -- time when action was performed
- action -- action which was requested on api
- params -- GET or POST parameters given by user
- code -- return code which was sent back by api
- data -- if call ended up with an exception, description of thrown exception should be there
UserSettings
User settings belong to some particular user and contains settings mostly for web application.
- darkTheme -- dark mode will be used in text editor in web application
- vimMode -- turn vim mode on in text editor used by web application
- defaultLanguage -- default language which will be used in web application