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

source-academy / cadet-frontend / 427 / 1
30%
master: 30%

Build:
DEFAULT BRANCH: master
Ran 25 Jul 2018 03:53AM UTC
Files 93
Run time 9s
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 Jul 2018 03:51AM UTC coverage: 25.47% (-0.003%) from 25.473%
427.1

push

travis-ci

ningyuansg
Submit and show MCQ Answer (#228)

* Add handleOptionSelect handler for MCQChooser

* Use handleOptionSelect in Button

Had to use a curried function to get around the "Lambdas forbidden in
rendering method" rule (and consequently save performance)

* Use handleMCQSubmit name instead

* Change mcq question prop -> mcqProps

Thus, anything that calls workspace will have to provide a method to
handle MCQs, if the question is an MCQ question

* Pass correct props for GradingWorkspace

* Use correct props for AssessmentWorkspace

* Remove unused import from workspace

* Format AssessmentWorkspace

* Add localState to remove visual lag of choosing

Before: Option chosen (active momentarily) -> dispatch (button inactive
due to current state) ->
component updated with answer (active)

Now: Constructor takes in current option from state -> Option chosen (active momentarily) -> local state updated (active) and dispatch is sent -> any update from the dispatch will cause constructor to set the state (during render) to the new option

* Pass in chosenOption prop from workspace parents

* Format and update a test

* Add workaround for mcq being passed as string

The issue has been created at the backend cadet repo -- #162.
As triple equality was used to verify if the button should be pressed,
this caused all the equality checks to return false (string is not ===
any number). I've added a workaround to parse the received string.

* Move parsing to the backend saga

* Format files

* Make resetWorkspace accept arguments to set values

* Export IWorkspaceState

* Change reducer for RESET_WORKSPACE

* Modify workspace parent containers

* Modify component handler definitions

* Use handleResetWorkspace to set editorValue

* Dont show save button for mcq question

* Format files

* Remove parsing

* Simplify chosenMCQAnswer expression

* Remove chosenMCQAnswer

I did not realise that this can just be us... (continued)

97 of 821 branches covered (11.81%)

Branch coverage included in aggregate %.

756 of 2528 relevant lines covered (29.91%)

1.28 hits per line

Source Files on job 427.1
  • Tree
  • List 0
  • Changed 12
  • Source Changed 12
  • Coverage Changed 11
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Build 411
  • Travis Job 427.1
  • 3923cc16 on github
  • Prev Job for on master (#405.1)
  • Next Job for on master (#442.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