• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

NZOI / nztrain / 977
38%

Build:
DEFAULT BRANCH: master
Ran 25 Apr 2020 12:26PM UTC
Jobs 1
Files 153
Run time 11s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
977

push

travis-ci

web-flow
Change visibility of problem statement attachment to 'public' in importer (#112)

The problem series import worker previously set the visibility of the
file attachment containing the imported statement to 'protected'.

That doesn't make sense, because 'protected' means users can view the
file if they are *not* currently competing (comment: [1], logic: [2]).

As discussed in #106 (specifically comment [3] by @Holmes98), the
purpose of 'protected' is probably to prevent access to file
attachments of other problems/groups during closed-book contests. It
does not make sense to use it for problem statements, because users
need to be able to view them during the contest.

This commit changes the visibility to 'public'. It is safe (in the
sense that it won't make the problem statements visible before the
user starts the contest) because the controller also checks that the
containing problem is accessible.[4]

[1] app/models/filelink.rb:17
[2] app/policies/filelink_policy.rb:26
[3] https://github.com/NZOI/nztrain/issues/106#issuecomment-617556022
[4] app/controllers/filelinks/roots_controller.rb:53

2325 of 7016 relevant lines covered (33.14%)

4.8 hits per line

Jobs
ID Job ID Ran Files Coverage
1 977.1 (2.3.8) 25 Apr 2020 12:26PM UTC 0
33.14
Travis Job 977.1
Source Files on build 977
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #977
  • 87243ef8 on github
  • Prev Build on master (#926)
  • Next Build on master (#980)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc