From 2c7074d2134f21ee0933d645ae2e2106da357d30 Mon Sep 17 00:00:00 2001 From: prashantsinalkar Date: Wed, 23 Nov 2016 15:38:11 +0530 Subject: added verify tbc certificate functionality --- textbook_companion.module | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'textbook_companion.module') diff --git a/textbook_companion.module b/textbook_companion.module index 3f55940..4310d49 100755 --- a/textbook_companion.module +++ b/textbook_companion.module @@ -642,7 +642,7 @@ function textbook_companion_menu() ), 'file' => 'cheque_contact.inc' ); - $items['certificate'] = array( + $items['certificates'] = array( 'title' => 'List of all Certificates', 'description' => 'List of all Certificates', 'page callback' => '_list_all_certificates', @@ -651,18 +651,27 @@ function textbook_companion_menu() ), 'file' => 'pdf/list_all_certificates.inc' ); - $items['certificate/generate_pdf'] = array( + $items['certificates/generate_pdf'] = array( 'title' => 'Download Certificate', 'description' => 'Download Certificate', 'page callback' => 'drupal_get_form', 'page arguments' => array( 'generate_pdf' ), + 'type' => MENU_NORMAL_ITEM, 'access arguments' => array( 'generate pdf' ), 'file' => 'pdf/generate_pdf.inc' ); + $items["certificates/verify"] = array( + "title" => "Certificate Verification", + "page callback" => "verify_certificates", + "access arguments" => array( + "verify certificates" + ), + 'file' => 'pdf/verify_certificates.inc', + ); /*******************/ $items['Summer_Internship_Forms/forms'] = array( 'title' => 'List of all Copyright Form and Undertaking Form for books', @@ -790,6 +799,10 @@ function textbook_companion_permission() "title" => t("list all certificates"), "description" => t("Allows users to list all certificates.") ), + "verify certificates" => array( + "title" => t("Verify certificates"), + "description" => t("Allows users to verify certificates.") + ), "generate pdf" => array( "title" => t("Generate pdf"), "description" => t("Allows users to Generate pdf.") -- cgit From 4e6cb8ce3b135de758f5b08edff0146411bda032 Mon Sep 17 00:00:00 2001 From: prashantsinalkar Date: Thu, 24 Nov 2016 17:13:21 +0530 Subject: changed the menu type --- textbook_companion.module | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'textbook_companion.module') diff --git a/textbook_companion.module b/textbook_companion.module index 4310d49..cf2d3cb 100755 --- a/textbook_companion.module +++ b/textbook_companion.module @@ -658,7 +658,7 @@ function textbook_companion_menu() 'page arguments' => array( 'generate_pdf' ), - 'type' => MENU_NORMAL_ITEM, + 'type' => MENU_CALLBACK, 'access arguments' => array( 'generate pdf' ), @@ -670,6 +670,7 @@ function textbook_companion_menu() "access arguments" => array( "verify certificates" ), + 'type' => MENU_CALLBACK, 'file' => 'pdf/verify_certificates.inc', ); /*******************/ -- cgit