You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

191 lines
6.9 KiB
Markdown

# Database
8 years ago
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.
8 years ago
## Assignment
8 years ago
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
## ReportedErrors
## Resource
8 years ago
- _id_ --
- _permissions_ --
## Role
8 years ago
- _id_ --
- _parentRole_ --
- _childRoles_ --
- _permissions_ --
## RuntimeEnvironment
8 years ago
- _name_ --
- _language_ --
- _extensions_ --
- _platform_ --
- _description_ --
## Solution
8 years ago
- _user_ --
- _files_ --
- _solutionRuntimeConfig_ --
- _evaluated_ --
## SolutionEvaluation
8 years ago
- _evaluatedAt_ --
- _initFailed_ --
- _score_ --
- _points_ --
- _bonusPoints_ --
- _isValid_ --
- _evaluationFailed_ --
- _resultYml_ --
- _testResults_ --
## SolutionFile
8 years ago
- _solution_ --
## SolutionRuntimeConfig
8 years ago
- _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
8 years ago
- _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
8 years ago
- _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
- _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.
8 years ago
- _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
8 years ago
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