Posted by phrankle on January 16, 2013 at 5:38pm
1 follower
Jump to:
| Project: | Quiz |
| Version: | 7.x-4.0-alpha12 |
| Component: | Code - Quiz core |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Issue Summary
How do I identify an individual Quiz with PHP? I'm trying to make a welcome page that indicates which Quizzes a user has taken and passed. Thanks!
Comments
#1
For example:
<?phpif ($quiz->show_passed && $user->uid && quiz_is_passed($user->uid, $quiz->nid, $quiz->vid)) {
drupal_set_message(t('You have already passed @quiz.', array('@quiz' => QUIZ_NAME)), 'status');
}
?>
Where $quiz refers to a particular quiz, say the first one I made.