Hello,

On my drupal site, I want to run an experiment where a set of users (with the role "assessor") have access to three different webforms that I want them to fill in so I can collect data. Each form is quite different, and they only need to submit each once. Each of them has "save as draft" enabled. When they've submitted all three, it's likely they won't come back.

I want them to gain access to these three forms from an "assessor area" node, where they can view.

I'd like that node to appear as follows (in the example, assessment one has been started and saved as a draft, assessment two hasn't been started, and the questionnaire [i.e. assessment three] has been completed):



==Assessment one==
Status: incomplete
Continue assessment one

==Assessment two==
Status: not started
Begin assessment two

==Questionnaire==
Status: complete
Complete: access disabled



Can I do this with a view? I'm not averse to using PHP to accomplish it.

Thanks for your time.

JB

Comments

dawehner’s picture

Project: Views (for Drupal 7) » Webform
Version: 6.x-2.11 » 6.x-3.x-dev
Component: Miscellaneous » Code

Let's move to webform

quicksketch’s picture

This unfortunately isn't possible for several reasons (all of which should be corrected in Webform):

- You can't start with "Node" view and then make a relationship over to the Webform Submissions table. This is necessary to build a listing of nodes that *have not* had their attached webforms submitted. That makes a item like this impossible:

==Assessment two==
Status: not started

- The "draft" column is not exposed at all to Views, making the "Status" column like this impossible:

==Assessment one==
Status: incomplete

- You may be able to use the existing "User: Submission count" field that Webform provides to determine if a user has started a form at all, but this handler also has some problems, see #921978: Webform Views Sorting. It may work well enough as is, but it also needs some work.

So the bottom line here is that this *should* be possible if Webform's Views integration were up to snuff, but right now it's got several problems that make this difficult or impossible. The Views integration should be improved to support the functionality you want.

quicksketch’s picture

Ah, in fact there is a "Webform submissions: Draft" field that you can use to accomplish the second point that I mentioned. Meaning the only thing not supported is a list of webform submissions by starting with a "Node" view.

quicksketch’s picture

Category: support » feature
quicksketch’s picture

Marked #1159790: Matching results as duplicate.

derhasi’s picture

Status: Active » Closed (duplicate)

This will be solved by fixing #1258044: Webform views integration needs to provide relationships for both user and node based views. as this will (hopefully) introduce a node to webform submission relationship.

derhasi’s picture

Version: 6.x-3.x-dev » 7.x-3.x-dev
Issue tags: +dvcs11