Index: quiz.module
===================================================================
RCS file: /cvs/drupal/contributions/modules/quiz/quiz.module,v
retrieving revision 1.84
diff -u -r1.84 quiz.module
--- quiz.module	31 Oct 2006 21:06:56 -0000	1.84
+++ quiz.module	27 Nov 2006 22:51:14 -0000
@@ -508,17 +508,26 @@
   // Format Quiz Dates
   $output .= '<h3>'. t('%quiz start/end', array('%quiz' => $quiz_name)) .'</h3>';
   if(!$node->quiz_always){
+
+  	// if we are previewing, make sure the dates are timestamps and not form arrays
+  	if (is_array($node->quiz_open)) {
+  	  quiz_translate_form_date(&$node, 'quiz_open');
+  	}
+  	if (is_array($node->quiz_close)) {
+  	  quiz_translate_form_date(&$node, 'quiz_close');
+  	}
+
+    // format the availability info
     $output .= "<p>" . format_date($node->quiz_open) . " &mdash; " . format_date($node->quiz_close) ."</p>";
     $output .= "<p><strong>". t('Days %quiz live for', array('%quiz' => $quiz_name)) ."</strong> " . floor((strtotime($node->close) - strtotime($node->open)) / 60 / 60 / 24) . "</p>";
-
     $remaining = floor(($node->quiz_close - time()) / 60 / 60 / 24);
     $remaining = ($remaining < 0)?"Expired":$remaining;
     $output .= "<p><strong>Days remaining:</strong> " . $remaining . "</p>";
-
     $elapsed = floor((time() - $node->quiz_open) / 60 / 60 / 24);
     $elapsed = ($elapsed < 0)?(-$elapsed)." days to go":$elapsed;
     $output .= "<p><strong>Days since start:</strong> " . $elapsed . "</p>";
-  } 
+
+  }
   else {
     $output .= '<p>'. t('This Quiz is always available.') .'</p>'."\n";
   }
@@ -554,9 +563,11 @@
   }
 
   // Format quiz questions
-  $output .= '<h3>'. t('%quiz Questions', array('%quiz' => $quiz_name)) .'</h3>';
-  $questions = _quiz_get_questions();
-  $output .= theme('quiz_question_table', $questions);
+  if(is_numeric(arg(1))){
+    $output .= '<h3>'. t('%quiz Questions', array('%quiz' => $quiz_name)) .'</h3>';
+    $questions = _quiz_get_questions();
+    $output .= theme('quiz_question_table', $questions);
+  }
   
   return $output;
 }
