Skip to content
Snippets Groups Projects
initDatabase.sql 5.2 KiB
Newer Older
  • Learn to ignore specific revisions
  • Lukas Köhler's avatar
    Lukas Köhler committed
    INSERT INTO public.opensubmit_course (title, created, homepage, active, owner_id, lti_key, lti_secret)
     VALUES ('Roth-Fr1y', now(), 'https://lernen.h-da.de/course/view.php?id=8252', true,
     (select id from auth_user where username='m.roth'), null, null);
    
    INSERT INTO public.opensubmit_course (title, created, homepage, active, owner_id, lti_key, lti_secret)
     VALUES ('Roth-Fr1x', now(), 'https://lernen.h-da.de/course/view.php?id=8252', true,
     (select id from auth_user where username='m.roth'), null, null);
    
    INSERT INTO public.opensubmit_course (title, created, homepage, active, owner_id, lti_key, lti_secret)
     VALUES ('Roth-Fr2x', now(), 'https://lernen.h-da.de/course/view.php?id=8252', true,
     (select id from auth_user where username='m.roth'), null, null);
    
    INSERT INTO public.opensubmit_course (title, created, homepage, active, owner_id, lti_key, lti_secret)
     VALUES ('Roth-Fr2y', now(), 'https://lernen.h-da.de/course/view.php?id=8252', true,
     (select id from auth_user where username='m.roth'), null, null);
    
    
    INSERT INTO public.opensubmit_course (title, created, homepage, active, owner_id, lti_key, lti_secret)
     VALUES ('Ruehl-Fr2x', now(), 'https://lernen.h-da.de/course/view.php?id=8252', true,
     (select id from auth_user where username='s.ruehl'), null, null);
    
    INSERT INTO public.opensubmit_course (title, created, homepage, active, owner_id, lti_key, lti_secret)
     VALUES ('Ruehl-Fr2y', now(), 'https://lernen.h-da.de/course/view.php?id=8252', true,
     (select id from auth_user where username='s.ruehl'), null, null);
    
    INSERT INTO public.opensubmit_course (title, created, homepage, active, owner_id, lti_key, lti_secret)
     VALUES ('Ruehl-Fr4x', now(), 'https://lernen.h-da.de/course/view.php?id=8252', true,
     (select id from auth_user where username='s.ruehl'), null, null);
    
    INSERT INTO public.opensubmit_course (title, created, homepage, active, owner_id, lti_key, lti_secret)
     VALUES ('Ruehl-Fr4y', now(), 'https://lernen.h-da.de/course/view.php?id=8252', true,
     (select id from auth_user where username='s.ruehl'), null, null);
    
    INSERT INTO public.opensubmit_course (title, created, homepage, active, owner_id, lti_key, lti_secret)
     VALUES ('Ruehl-Do5x', now(), 'https://lernen.h-da.de/course/view.php?id=8252', true,
     (select id from auth_user where username='s.ruehl'), null, null);
    
    
    INSERT INTO public.opensubmit_course (title, created, homepage, active, owner_id, lti_key, lti_secret)
     VALUES ('Peter-Fr5x', now(), 'https://lernen.h-da.de/course/view.php?id=8252', true,
     (select id from auth_user where username='l.koehler'), null, null);
    
    INSERT INTO public.opensubmit_course (title, created, homepage, active, owner_id, lti_key, lti_secret)
     VALUES ('Peter-Fr5y', now(), 'https://lernen.h-da.de/course/view.php?id=8252', true,
     (select id from auth_user where username='l.koehler'), null, null);
    
    INSERT INTO public.opensubmit_course (title, created, homepage, active, owner_id, lti_key, lti_secret)
     VALUES ('Peter-Fr6x', now(), 'https://lernen.h-da.de/course/view.php?id=8252', true,
     (select id from auth_user where username='l.koehler'), null, null);
    
    INSERT INTO public.opensubmit_course (title, created, homepage, active, owner_id, lti_key, lti_secret)
     VALUES ('Peter-Fr6y', now(), 'https://lernen.h-da.de/course/view.php?id=8252', true,
     (select id from auth_user where username='l.koehler'), null, null);
    
    
    
    INSERT INTO public.opensubmit_assignment (title, download, created, publish_at, soft_deadline, hard_deadline,
    has_attachment, attachment_test_timeout, attachment_test_validity, validity_script_download, attachment_test_full,
    course_id, "gradingScheme_id", description, max_authors)
    SELECT
    'Praktikum 3', 'https://lernen.h-da.de/pluginfile.php/344926/mod_resource/content/1/Praktikum3.pdf',
    '2018-10-02 07:00:29.652859', '2018-10-01 07:00:29.652859', null,
    '2019-07-01 09:00:00.000000', true, 30, 'testscripts/validate.py', false, '', c.id, null, '', 1
    FROM (SELECT id FROM opensubmit_course) c;
    
    INSERT INTO public.opensubmit_assignment (title, download, created, publish_at, soft_deadline, hard_deadline,
    has_attachment, attachment_test_timeout, attachment_test_validity, validity_script_download, attachment_test_full,
    course_id, "gradingScheme_id", description, max_authors)
    SELECT
    'Praktikum 4', 'https://lernen.h-da.de/pluginfile.php/344927/mod_resource/content/1/Praktikum4.pdf',
    '2018-10-02 07:00:29.652859', '2018-10-01 07:00:29.652859', null,
    '2019-07-01 09:00:00.000000', true, 30, 'testscripts/validate.py', false, '', c.id, null, '', 1
    FROM (SELECT id FROM opensubmit_course) c;
    
    INSERT INTO public.opensubmit_assignment (title, download, created, publish_at, soft_deadline, hard_deadline,
    has_attachment, attachment_test_timeout, attachment_test_validity, validity_script_download, attachment_test_full,
    course_id, "gradingScheme_id", description, max_authors)
    SELECT
    'Praktikum 5', 'https://lernen.h-da.de/pluginfile.php/344935/mod_resource/content/1/Praktikum5.pdf',
    '2018-10-02 07:00:29.652859', '2018-10-01 07:00:29.652859', null,
    '2019-07-01 09:00:00.000000', true, 30, 'testscripts/validate.py', false, '', c.id, null, '', 1
    FROM (SELECT id FROM opensubmit_course) c;
    
    
    
    INSERT INTO opensubmit_assignment_test_machines (assignment_id, testmachine_id)
    SELECT a.id, t.id
    FROM  (SELECT id from opensubmit_assignment) a,
         (SELECT id from opensubmit_testmachine) t;