--- C:\webhome\sites\all\modules\quiz\quiz.module.org	2008-10-06 23:50:08.000000000 +0900
+++ C:\webhome\sites\all\modules\quiz\quiz.module	2008-10-07 11:03:50.540500000 +0900
@@ -132,14 +132,14 @@ function quiz_menu() {
     //if ($node->type == 'quiz') {
 
   // Menu item for adding questions to quiz.
-  $items['node/%/questions'] = array(
+  $items['node/%quiz_type_access/questions'] = array(
     'title' => t('Manage questions'),
     'page callback' => 'quiz_questions',
     'page arguments' => array(1),
     'access arguments' => array('create quiz'),
     'type' => MENU_LOCAL_TASK,
   );
-  $items['node/%/admin'] = array(
+  $items['node/%quiz_type_access/admin'] = array(
     'title' => t('Quiz Admin', array('@quiz' => QUIZ_NAME)),
     'page callback' => 'theme_quiz_view',
     'page arguments' => array(1),
@@ -181,6 +181,18 @@ function quiz_menu() {
   return $items;
 }
 
+function quiz_type_access_load($arg) {
+  if (!is_numeric($arg)) {
+    return FALSE;
+  }
+  if ($node = node_load($arg)) {
+    if ($node->type == 'quiz') {
+      return $node;
+    }
+  }
+  return FALSE;
+}
+
 /**
  * Implementation of hook_form().
  * 
@@ -749,12 +761,12 @@ function quiz_theme() {
 	'quiz_question_feedback' => array(
 	  'arguments' => array('quiz' => NULL, 'report' => NULL),
 	),
-	'quiz_question_table' => array(
-	  'arguments' => array('questions' => NULL, 'quiz_id' => NULL),
-	),
 	'quiz_questions' => array(
       'arguments' => array('form' => NULL),
 	),	
+	'quiz_progress' => array(
+	  'arguments' => array('question_number' =>NULL, 'num_of_question' => NULL),
+	),
 	'quiz_no_feedback' => array(),	
   );
 }
@@ -1497,9 +1509,9 @@ function _quiz_get_questions($quiz_vid =
  * @return
  *  HTML output to create page.
  */
-function quiz_questions_form($context, $qid) {
+function quiz_questions_form($context, $node) {
   //$quiz = node_load(arg(1));
-  $quiz = node_load($qid);
+  $quiz = node_load($node->nid);
 
   // Set page title.
   drupal_set_title(check_plain($quiz->title));
@@ -1665,8 +1677,8 @@ function _quiz_get_unused_questions($qui
  *   ID of quiz to create
  * @return unknown
  */
-function quiz_questions($qid) {
-  return drupal_get_form('quiz_questions_form', $qid);
+function quiz_questions($node) {
+  return drupal_get_form('quiz_questions_form', $node);
 }
 
 /**
