sahana/eden

Creation of Assessment response returns user to wrong page (and gives 404 in Events)

Closed this issue · 5 comments

On an instance with Assessments (dc) module, optionally also Events (event) module

Steps to reproduce:

  1. Go to Assessments -> Templates -> Create
  2. Create a new template, fill in only mandatory fields (name)
  3. Go to Assessments -> Responses -> Create
  4. Create a new response, fill in only mandatory fields (template from step 3)

Clicking on Save returns user to /eden/dc/index instead of expected /eden/dc/respnse. Even though it would be acceptable in this case, it gets worse in combination with Events module as an assessment created from event's Assessments tab ends up on /eden/event/respnse/1/answer which gives Error 404.

(It's understandable from the source code why it's called respnse instead of response, however it seems that it also creates some unexpected behavior which needs to be handled explicitly.)

Actually, you should be forwarded to dc/respnse/1/answer - not dc/respnse.

The problem here is that the answer-table for this response is never created because the template lacks questions. Without that table, however, the URL is plain invalid, so you are returned to the module index page.

The problem on the event-tab is that whilst the answer-table exists, it lacks the key to bind it to the response, and consequently, the answer-component doesn't exist for that either. However, you're also not forwarded to the correct controller (must be dc not event, but the setting does not switch controller) - so you never see that.

Generally, like it has been pointed out here several times already - the DC module needs significant integration work before it can be used in the default template. Reporting issues like this one is a bit of a side-track - fixing those won't complete the integration, but completing the integration is likely to make them obsolete.

You're welcome to test the module in the default template and give feedback on that, but I would rather strongly recommend to change the testing strategy then from destructive to acceptance?

That same recommendation applies also to several other modules that are disabled by default - it can well be that they are either work in progress, or unmaintained, or require some pieces from the template that have not been ported to default yet.

Beware of the clay models parked between the real cars here ;)

...because they may - like this one - lack a steering wheel ;) no fun driving :P

DC can only really be tested in the UCCE template currently.
It was designed before that but evolved to a point where the default no longer works as-is.

Clicking on Save returns user to /eden/dc/index instead of expected /eden/dc/respnse.

I don't see that...my last fix there means an error is shown & the user is taken to the template:
81d40dc

it gets worse in combination with Events module as an assessment created from event's Assessments tab ends up on /eden/event/respnse/1/answer which gives Error 404.

Indeed...let me work on that