Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By 223p on
On the node page, my nodes of type quiz are empty; there is no nid, teaser, and the date is wrong (12/31/1967).
I have exhausted myself looking at the code of this module and SQL database to see if there is something wrong in the _view hook or table contents.
Here is the link to the problem page ...
And here is the direct link to the working quiz node ...
I am hoping that someone can give advice. I don't know how these values are assigned to the teaser box.
Comments
teaser fix
I copied the example in the story module:
And this fixed it. My code forgot the
&
operator on$node
and I mistakenly declared$node
as a global variable. Oops!Looking at the theme, I am understanding how this hook works. If $main is 1 in the if else statement than it calls my
node->teaser
variable, if it is 0 then it calls my custom node view!I posted earlier, if anyone wanted to help me develop this module. But since nobody answered I have been figuring out for 10 months now- how this Drupal works!
Basically what my quiz module does is combine a basic node module (body and teaser fields) with a java applet to result in an interactive page that takes the tab-delimited quiz data and presents as a multiple choice quiz that users can advance through.
Even though I fixed the the _
Even though I fixed the the _view hook of my module, I still don't understand what was going on.
quiz module
That's pretty cool. I use Drupal for supporting the college writing classes I teach and can see how a quiz module would be important for those of us in education. Great stuff!