Documentation ¶
Overview ¶
Package project provides data structures for storing information about projects, submissions and files.
Index ¶
Constants ¶
const ( MODE = "mode" TYPE = "type" TIME = "time" FILE_MODE = "file_remote" ARCHIVE_MODE = "archive_remote" NAME = "name" PKG = "package" JSRC = ".java" BIN_DIR = "bin" SRC_DIR = "src" )
Constants used client and server-side to for submission data.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type File ¶
type File struct { Id bson.ObjectId `bson:"_id"` SubId bson.ObjectId `bson:"subid"` Name string `bson:"name"` Package string `bson:"package"` Type Type `bson:"type"` Time int64 `bson:"time"` Data []byte `bson:"data"` Results bson.M `bson:"results"` Comments []*Comment `bson:"comments"` }
File stores a single file's data from a submission.
func ParseName ¶
ParseName retrieves file metadata encoded in a file name. These file names must have the format: [[<package descriptor>"_"]*<file name>"_"]<time in nanoseconds> "_"<file number in current submission>"_"<modification char> Where values between '[]' are optional, '*' indicates 0 to many, values inside '""' are literals and values inside '<>' describe the contents at that position.
func (*File) CanProcess ¶
CanProcess returns whether a file is meant to be processed.
func (*File) LoadComments ¶
type Project ¶
type Project struct { Id bson.ObjectId `bson:"_id"` Name string `bson:"name"` User string `bson:"user"` Lang string `bson:"lang"` Time int64 `bson:"time"` Description string `bson:"description"` }
Project represents a Impendulo project.
type Skeleton ¶
type Submission ¶
type Submission struct { Id bson.ObjectId `bson:"_id"` ProjectId bson.ObjectId `bson:"projectid"` User string `bson:"user"` Mode string `bson:"mode"` Time int64 `bson:"time"` Comments []*Comment `bson:"comments"` }
Submission is used for individual project submissions
func NewSubmission ¶
func NewSubmission(pid bson.ObjectId, u, m string, t int64) *Submission
NewSubmission
func (*Submission) Format ¶
func (s *Submission) Format(p *Project) string
func (*Submission) LoadComments ¶
func (s *Submission) LoadComments() []*Comment