Adding Roles with Rules upon Webform submission not working — Why? Here's what I have done so far (in Drupal 7):

Created a webform quiz that only validates if all answers are correct
Created a role called &quot;Mid-program quiz: Passed&quot; that has permissions to view a particular page
Created a rule that says upon submission of the quiz, the submitting user should be granted the &quot;Mid-program quiz: Passed&quot; role.

But it's not working. The quiz is being submitted correctly but the role is not being assigned.
Here are the details of the rule that's failing to execute:

Event
Event: After a webform submission has been added
Conditions: Webform has name
Parameter: The form id of the submitted form: [form_id], Webforms: Mid-program quiz
Elements
(Here I wasn't sure whether to use [user], i.e. the user submitting the webform,  or [site:current-user], i.e. the currently logged-in user. So I did both.)
Add user role
Parameter: User: [user], Roles: Mid-program quiz: Passed
Add user role
Parameter: User: [site:current-user], Roles: Mid-program quiz: Passed

Can someone see where the problem is in this rule?
Thanks!
Adding Roles with Rules upon Webform submission not working — Why?

Okay, it looks like I figured it out:




 Event: After a webform has been submitted
 Condition: Webform has name
  
   Parameters: 
    
      The form id of the submitted form: [form_id]
      Webforms: Mid-program quiz
     
    
   
  
 
 Action: Add user role
  
   Parameters: 
    
     User: [user]
     Roles: Mid-program quiz: Passed
    
   
  
 




So the confusing things to watch out for are:


 "After a webform has been submitted" is the one to choose, over "After a webform submission has been added."
 Webform Has Name has first parameter as ID and second as the webform (as selected from a list of webforms). It makes it seem like you're saying nid has to be equal to a title, which doesn't seem like it would work, but that's apparently not what's happening.
 Add user role takes simply Parameter:user, rather than site:user or any other attribute of user