students

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 1, 2020 License: MIT Imports: 16 Imported by: 0

Documentation

Overview

Package students implements the student-facing pages on Skylab

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Students

type Students struct {
	// contains filtered or unexported fields
}

func New

func New(skylb skylab.Skylab) Students

func (Students) CanEditSubmission

func (stu Students) CanEditSubmission(next http.Handler) http.Handler

func (Students) CanEditTeamEvaluation

func (stu Students) CanEditTeamEvaluation(next http.Handler) http.Handler

func (Students) CanEditTeamFeedback

func (stu Students) CanEditTeamFeedback(next http.Handler) http.Handler

func (Students) CanViewSubmission

func (stu Students) CanViewSubmission(next http.Handler) http.Handler

func (Students) CanViewTeamEvaluation

func (stu Students) CanViewTeamEvaluation(next http.Handler) http.Handler

func (Students) CanViewUserEvaluation

func (stu Students) CanViewUserEvaluation(next http.Handler) http.Handler

func (Students) Dashboard

func (stu Students) Dashboard(w http.ResponseWriter, r *http.Request)

func (Students) GetSubmission

func (stu Students) GetSubmission(user skylab.User, milestone string) (form Submission, err error)

func (Students) GetTeam

func (stu Students) GetTeam(user skylab.User) (team Team, err error)

func (Students) ListFeedbacks

func (stu Students) ListFeedbacks(w http.ResponseWriter, r *http.Request)

func (Students) MilestoneTeamEvaluation

func (stu Students) MilestoneTeamEvaluation(section string) http.HandlerFunc

func (Students) StudentNoTeam

func (stu Students) StudentNoTeam(w http.ResponseWriter, r *http.Request, section string)

func (Students) SubmissionCreate

func (stu Students) SubmissionCreate(w http.ResponseWriter, r *http.Request)

func (Students) SubmissionEdit

func (stu Students) SubmissionEdit(w http.ResponseWriter, r *http.Request)

func (Students) SubmissionSubmit

func (stu Students) SubmissionSubmit(next http.Handler) http.Handler

func (Students) SubmissionUpdate

func (stu Students) SubmissionUpdate(next http.Handler) http.Handler

func (Students) SubmissionView

func (stu Students) SubmissionView(w http.ResponseWriter, r *http.Request)

func (Students) Team

func (stu Students) Team(w http.ResponseWriter, r *http.Request)

func (Students) TeamEvaluationCreate

func (stu Students) TeamEvaluationCreate(w http.ResponseWriter, r *http.Request)

func (Students) TeamEvaluationEdit

func (stu Students) TeamEvaluationEdit(w http.ResponseWriter, r *http.Request)

func (Students) TeamEvaluationSubmit

func (stu Students) TeamEvaluationSubmit(next http.Handler) http.Handler

func (Students) TeamEvaluationUpdate

func (stu Students) TeamEvaluationUpdate(next http.Handler) http.Handler

func (Students) TeamEvaluationView

func (stu Students) TeamEvaluationView(w http.ResponseWriter, r *http.Request)

func (Students) TeamFeedbackEdit

func (stu Students) TeamFeedbackEdit(w http.ResponseWriter, r *http.Request)

func (Students) UpdateEvaluationAnswers

func (stu Students) UpdateEvaluationAnswers(tesid int, form map[string][]string) error

func (Students) UpdateSubmissionAnswers

func (stu Students) UpdateSubmissionAnswers(tsid int, form map[string][]string) error

func (Students) UpsertEvaluationAnswers

func (stu Students) UpsertEvaluationAnswers(user skylab.User, milestone string, evaluatee int, form map[string][]string) error

func (Students) UserEvaluationView

func (stu Students) UserEvaluationView(w http.ResponseWriter, r *http.Request)

type Submission

type Submission struct {
	Cohort              string                 `db:"cohort"`
	Milestone           string                 `db:"milestone"`
	MilestoneTimestatus skylab.Timestatus      `db:"-"`
	Tid                 int                    `db:"tid"`
	TeamName            sql.NullString         `db:"team_name"`
	Questions           formx.Questions        `db:"questions"`
	Answers             formx.Answers          `db:"answers"`
	Submitted           sql.NullBool           `db:"submitted"`
	UpdatedAt           sql.NullTime           `db:"updated_at"`
	OverrideOpen        sql.NullBool           `db:"override_open"`
	QuestionAnswers     []formx.QuestionAnswer `db:"-"`
}

type Team

type Team struct {
	// Team
	TeamID       int            `db:"tid"`
	Cohort       string         `db:"cohort"`
	TeamName     sql.NullString `db:"team_name"`
	ProjectLevel string         `db:"project_level"`
	TeamData     types.JSONText `db:"team_data"`
	Status       string         `db:"status"`

	// Student One
	StudentOneID          int            `db:"stu1_uid"`
	StudentOneURID        int            `db:"stu1_urid"`
	StudentOneDisplayname sql.NullString `db:"stu1_displayname"`
	StudentOneEmail       string         `db:"stu1_email"`
	StudentOneData        types.JSONText `db:"stu1_data"`

	// Student Two
	StudentTwoID          int            `db:"stu2_uid"`
	StudentTwoURID        int            `db:"stu2_urid"`
	StudentTwoDisplayname sql.NullString `db:"stu2_displayname"`
	StudentTwoEmail       string         `db:"stu2_email"`
	StudentTwoData        types.JSONText `db:"stu2_data"`

	// Adviser
	AdviserID          sql.NullInt64  `db:"adv_uid"`
	AdviserURID        sql.NullInt64  `db:"adv_urid"`
	AdviserDisplayname sql.NullString `db:"adv_displayname"`
	AdviserEmail       sql.NullString `db:"adv_email"`

	// Mentor
	MentorID          sql.NullInt64  `db:"mnt_uid"`
	MentorURID        sql.NullInt64  `db:"mnt_urid"`
	MentorDisplayname sql.NullString `db:"mnt_displayname"`
	MentorEmail       sql.NullString `db:"mnt_email"`

	CreatedAt sql.NullTime `db:"created_at"`
	UpdatedAt sql.NullTime `db:"updated_at"`
	DeletedAt sql.NullTime `db:"deleted_at"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL