FileAction

Qualified name: tin.apps.assignments.models.FileAction

class FileAction(*args, **kwargs)[source]

Bases: Model

Runs a user uploaded script on files uploaded to an assignment.

This can also take (fake) environment variables like $FILE/$FILES, which are replaced with their actual value.

$FILES is expanded to a space separated list of paths that match the filter.

$FILE means the command will be called once with each file that matches the filter.

Parameters:

Relationship fields:

Parameters:

courses (ManyToManyField to Course) – Courses (related name: file_actions)

Methods

get_match_type_display

Shows the label of the match_type.

run

Runs the command on the input assignment

Attributes

MATCH_TYPES

case_sensitive_match

Type: BooleanField

command

Type: CharField

courses

Type: ManyToManyField to Course

description

Type: CharField

id

Type: BigAutoField

is_sandboxed

Type: BooleanField

match_type

Type: CharField

match_value

Type: CharField

name

Type: CharField

objects

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

run(assignment: Assignment)[source]

Runs the command on the input assignment