The current project I am working on is a on-boarding/training app. The app will allow administrative users to create courses, break up the courses into modules that consist of a single video, create quizzes per course that consist of a series of questions with multiple choice answers. Normal users will have the ability to “register” for these courses and ultimately take the quiz for each course that they register for.
I ran into some trouble while creating the processes that create the registered course, its modules, the courses quiz, the quiz’s questions, and the possible answers to the questions.
I envisioned the following steps:
- Based on user Course selection, create the User Course
- Iterate through the selected Course’s Modules and create User Modules
- Take the Course’s Quiz and create a User Quiz
- Iterate through the Course’s Quiz’s Questions and create a User Question
- and finally, iterate through each Quiz Question’s Answers and create corresponding User Question Answers
- Stay within the Hobby plan. (I wanted to have a pilot to demo first before having the client dish out $$)
- Seamless UX
I hope to explain the problems I came across, how I resolved my issues, and hopefully get some feedback on how others have solved a similar problem or how they may go about this differently.
No out of the box bubble action exists that allows you to loop through a list. I worked with other rapid application development platforms like Mendix whose visual workflow/logic builder has this feature.
(It would be a great feature to have in bubble. Just putting it out to the universe in hopes that the bubble gods here my plea It’s all love for bubble from me).
Thinking that this may solve my problem, I whipped up the workflows to handle:
- Iterating through the selected Course’s Modules
- Iterating through the Quiz’s Questions,
- and iterating through the Question’s Answers
It seemed like it would all work, but I didn’t realize that you have to be on a paid plan to access the scheduled api features. Given that my goal was to stay on the hobby plan for the time being, it was time to move on.
On my Course page, where users can register for Courses, is set up with the following:
A repeating group to display available courses to register for
A button within each Repeating Group cell allowing the User to Register for the given course
A custom state for the following
Module list to iterate on
Questions to iterate on
Answers to iterate on
The created User Course
The created User Quiz
The current Question
The current User Question
(3 total JB elements)
The Register button kicks off the following workflow
In my use case, my function in the JB element for my modules is bubble_fn_userModule. This JB element is set to trigger an event. In the Workflows, I have an event set up to run for that JB element only when its value is greater than 0.
The break down:
The last step in my first workflow creates the user quiz, user questions, and user answer components of the registered course.
The Questions are iterated in a similar fashion where I have a JB element set to trigger an event only when its value is greater than 0.
The workflow processed only once and my end result was everything I needed except that only one question was created and its corresponding answers.
I tried setting an “Imported” attribute on my Answers that would tell me if an Answer had been processed or not. I then tried to set the Only statement to run when all Answers had a “true” value set on Imported. My end result was the same as before with only one question and its corresponding answers created.
This worked exactly as I expected except that it takes about 25 seconds!!! No bueno…
So, I achieved my goal in not switching away from the Hobby plan, however my second goal is compromised in that the UX isn’t as seamless as I’d like it to be.
I thought of scheduling a custom event sometime in the future however, I don’t know of a way to easily store the many parameters I am using to make the proper associations within each workflow.
I know that this project will move forward to a paid plan at some point and maybe the scheduled API workflows will work out better for me.
All in all, I hope this really long post may help someone in some fashion.
Anyone have any similar experience?
How about them scheduled API workflows?