~azzar1/unity/add-show-desktop-key

« back to all changes in this revision

Viewing changes to userdb/users.sql

Move the remaining images to the new framework, in the new ivle.webapp.core
plugin.

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
    login       VARCHAR UNIQUE NOT NULL,
6
6
    passhash    VARCHAR,
7
7
    state       VARCHAR NOT NULL CHECK (state in ('no_agreement', 'pending',
8
 
                                              'enabled', 'disabled')),
 
8
                                              'enabled', 'disabled'))
 
9
                                 DEFAULT 'no_agreement',
9
10
    rolenm      VARCHAR NOT NULL CHECK (rolenm in ('anyone', 'student',
10
11
                                                   'marker', 'tutor',
11
12
                                                   'lecturer', 'admin')),
97
98
        oid INTEGER;
98
99
    BEGIN
99
100
        SELECT offeringid INTO oid FROM project_set WHERE project_set.projectsetid = NEW.projectsetid;
100
 
        PERFORM 1 FROM project_group, project_set WHERE project_group.projectsetid = project_set.projectsetid AND project_group.groupnm = NEW.groupnm;
 
101
        PERFORM 1 FROM project_group, project_set WHERE project_set.offeringid = oid AND project_group.projectsetid = project_set.projectsetid AND project_group.groupnm = NEW.groupnm;
101
102
        IF found THEN
102
103
            RAISE EXCEPTION ''a project group named % already exists in offering ID %'', NEW.groupnm, oid;
103
104
        END IF;
245
246
    date        TIMESTAMP NOT NULL,
246
247
    attempt     VARCHAR NOT NULL,
247
248
    complete    BOOLEAN NOT NULL,
 
249
    active      BOOLEAN NOT NULL DEFAULT true,
248
250
    PRIMARY KEY (problemid,loginid,date)
249
251
);
250
252