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

NZOI / nztrain / 977 / 1
38%
master: 38%

Build:
DEFAULT BRANCH: master
Ran 25 Apr 2020 12:26PM UTC
Files 153
Run time 10s
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

25 Apr 2020 12:18PM UTC coverage: 33.139%. Remained the same
2.3.8

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

Source Files on job 977.1 (2.3.8)
  • Tree
  • List 0
  • Changed 1
  • Source Changed 1
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 674
  • Travis Job 977.1
  • 87243ef8 on github
  • Prev Job for 2.3.8 on master (#926.1)
  • Next Job for 2.3.8 on master (#980.1)
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