ramp_database.model.UserInteraction

class ramp_database.model.UserInteraction(interaction=None, user=None, problem=None, event=None, ip=None, note=None, submission=None, submission_file=None, diff=None, similarity=None, session=None)

UserInteraction table.

This class is used to record the interaction of a user with the frontend.

Parameters
interactionsNone or str, default is None

The type of interaction.

userNone or ramp_database.model.User, default is None

The user instance.

problemNone or ramp_database.model.Problem, default is None

The problem instance.

eventNone or ramp_database.model.Event, default is None

The event instance.

ipNone or str, default is None

The ip address from the server.

noteNone or str, default is None

Some notes.

submissionNone or ramp_database.model.Submission, default is None

The submission instance.

submission_fileNone or ramp_database.model.SubmissionFile, default is None

The submission file instance.

diffNone or str, default is None

The difference between two submissions.

similarityNone or float, default is None

The similarity of the submission.

Attributes
idint

The ID of the table row.

timestampdatetime

The date and time the interaction was created.

interactionsstr

The type of interaction.

notestr

Some note regarding the interaction.

submission_file_diffstr

The difference between two submission files.

submission_file_similarityfloat

The similarity between two submission files.

ipstr

The IP of the remove server.

user_idint

The ID of the user linked to the interaction.

userramp_database.model.User

The user instance.

problem_idint

The ID of the problem.

problemramp_database.model.Problem

The problem instance.

event_team_idint

The ID of the event/team.

event_teamramp_database.model.EventTeam

The event/team instance.

submission_idint

The submission ID.

submissionramp_database.model.Submission

The submission instance.

submission_file_idint

The submission file ID.

submission_fileramp_database.model.SubmissionFile

The submission file instance.

sessionsqlalchemy.orm.Session

The session to directly perform the operation on the database.

__init__(interaction=None, user=None, problem=None, event=None, ip=None, note=None, submission=None, submission_file=None, diff=None, similarity=None, session=None)

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.