I have created a drupal quiz site without depending any quiz modules. I want the user to be able to save their Test result against their profile. So they can see when they log in.

The Result will be like this usually:

Total Result: 24/30.
Main Subject: Main_Subject_Name.
Sub-sub1 score: 12/15.
Sub-Sub2 score: 12/15.

There can be any no. of sub-subjects depending on test. It would be great if I could be able to pull them later with views.

This is what i have in mind. Create a content type results with 2 fields. User Id and Data. User id will hold the uid and in data i will add a json(ified) version of the result for later use. Is this ok? or are there any drupal specific ways to do this?

1 Answer 1


You can also create fields directly attached to the User entity just as you would to a content type. It may make more sense to store the information for a specific user in fields attached to their identity directly. You can create views and panels to display the information however you want and provide hook functions in a custom module to do whatever specialized calculations you desire for presenting averages, grades etc.

I also noticed that you have used the Profile tag which relates to a module that has been deprecated for D7. If you have the module enabled, I recommend not using it for any future site since it will very likely not be maintained in D8.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.