summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcovenantd2012-12-15 11:34:35 (GMT)
committer Sivaji2012-12-15 11:34:35 (GMT)
commit62ad92005058cc19fc40c1787f1777459701784b (patch)
tree2db327176869d413c5976d608de59390334bc53b
parentcf689f2ef22c38bdac7d93942043767de4942bd7 (diff)
Fix #1866404 - Add 'Take quiz' link as Views field by covenantd
-rw-r--r--includes/views/quiz.views.inc12
-rw-r--r--quiz.info1
2 files changed, 13 insertions, 0 deletions
diff --git a/includes/views/quiz.views.inc b/includes/views/quiz.views.inc
index 9b6119c..afc3396 100644
--- a/includes/views/quiz.views.inc
+++ b/includes/views/quiz.views.inc
@@ -15,6 +15,9 @@ function quiz_views_handlers() {
'quiz_views_handler_field_takes' => array(
'parent' => 'views_handler_field',
),
+ 'quiz_views_handler_field_node_link_take' => array(
+ 'parent' => 'views_handler_field_node_link',
+ ),
'quiz_views_handler_field_time' => array(
'parent' => 'views_handler_field',
),
@@ -270,6 +273,15 @@ function quiz_views_data() {
),
'sort' => array('handler' => 'views_handler_sort'),
),
+ 'take' => array(
+ 'field' => array(
+ 'title' => t('Take quiz link'),
+ 'help' => t('Allows users to take the quiz if available.'),
+ 'handler' => 'quiz_views_handler_field_node_link_take',
+ 'click sortable' => TRUE,
+ ),
+ 'sort' => array('handler' => 'views_handler_sort'),
+ ),
'tid' => array(
'title' => t('Term ID'),
'help' => t('The term ID used to select questions based on taxonomy.'),
diff --git a/quiz.info b/quiz.info
index ece6700..de2eb96 100644
--- a/quiz.info
+++ b/quiz.info
@@ -19,6 +19,7 @@ files[] = includes/views/handlers/quiz_views_handler_field_number_questions.inc
files[] = includes/views/handlers/quiz_views_handler_field_question_status.inc
files[] = includes/views/handlers/quiz_views_handler_field_score_aggregate.inc
files[] = includes/views/handlers/quiz_views_handler_field_takes.inc
+files[] = includes/views/handlers/quiz_views_handler_field_node_link_take.inc
files[] = includes/views/handlers/quiz_views_handler_field_time.inc
files[] = includes/views/handlers/quiz_views_handler_field_user_quiz_state.inc
files[] = includes/views/handlers/quiz_views_handler_filter_question_status.inc