Morriar/box

List all submissions

Opened this issue · 2 comments

We need a target to get:

  • all the submissions (from /submission)
  • all the accepted submissions (with an ACCEPTED file in it)

The API and frontend should use this feature to allow the admin/box owner to list all the submissions.

done in the boxme.

Response copied from @privat in #6 :

$ ls submissions
sub1  sub2

$ boxme sub
submissions/sub1: not run
submissions/sub2: not run

$ boxme sub tests
# submissions/sub1/
[PASS] make. 
[PASS] test1. 
[FAIL] test2. diff -u tests/test2.res submissions/sub1//out/tests/test2.out
[FAIL] test3. diff -u tests-private/test3.res submissions/sub1//out/tests/test3.out
# submissions/sub2/
[PASS] make. 
[FAIL] test1. diff -u tests/test1.res submissions/sub2//out/tests/test1.out
[FAIL] test2. diff -u tests/test2.res submissions/sub2//out/tests/test2.out
[FAIL] test3. diff -u tests-private/test3.res submissions/sub2//out/tests/test3.out

$ boxme sub
submissions/sub1: 4 run, 2 passed, 2 failed
submissions/sub2: 4 run, 1 passed, 3 failed

new command user to list users and execute commands on user-approuved submissions

$ ls submissions/
10_user1  10_user2  1_user1  1_user2  1_user3  2_user1  2_user2  sub1  sub2

$ boxme user
user1
user2
user3

$ boxme status
# user1: submissions/10_user1
[NOT RUN] make.
[NOT RUN] test1.
[NOT RUN] test2.
[NOT RUN] test3.
# user2: submissions/1_user2
[NOT RUN] make.
[NOT RUN] test1.
[NOT RUN] test2.
[NOT RUN] test3.
# user3: no approuval

$ boxme user tests
# user1: submissions/10_user1
[PASS] make. 
[FAIL] test1. diff -u tests/test1.res submissions/10_user1/out/tests/test1.out
[FAIL] test2. diff -u tests/test2.res submissions/10_user1/out/tests/test2.out
[FAIL] test3. diff -u tests-private/test3.res submissions/10_user1/out/tests/test3.out
# user2: submissions/1_user2
[PASS] make. 
[FAIL] test1. diff -u tests/test1.res submissions/1_user2/out/tests/test1.out
[FAIL] test2. diff -u tests/test2.res submissions/1_user2/out/tests/test2.out
[FAIL] test3. diff -u tests-private/test3.res submissions/1_user2/out/tests/test3.out
# user3: no approuval