summaryrefslogtreecommitdiff
path: root/public/app/controllers/Office.php
diff options
context:
space:
mode:
Diffstat (limited to 'public/app/controllers/Office.php')
-rw-r--r--public/app/controllers/Office.php32
1 files changed, 22 insertions, 10 deletions
diff --git a/public/app/controllers/Office.php b/public/app/controllers/Office.php
index a876f6c..83135de 100644
--- a/public/app/controllers/Office.php
+++ b/public/app/controllers/Office.php
@@ -112,7 +112,6 @@ class Office {
- ## -------------------------------------------------------------------------
## PETITION FORMS
## secretarial support / serve forms for teachers' requests and applications
## -------------------------------------------------------------------------
@@ -265,11 +264,8 @@ class Office {
- ## -------------------------------------------------------------------------
- ##
- ## PETITION SUBMITS
+ ## PETITION SUBMIT
## handle submits of forms
- ##
## -------------------------------------------------------------------------
@@ -309,11 +305,30 @@ class Office {
+
+ ## LIST PETITIONS
## -------------------------------------------------------------------------
- ##
+
+
+ public static function user_petitions()
+ {
+ $manager = new App_manager(); // use APP Manager
+ // to get the requester's user_id
+
+ $list = Content_model::user_petitions(
+ $manager->getUserToken()->getUser()->getID() // user-id
+ );
+
+ Render::json([
+ 'success' => true,
+ 'data' => $list
+ ]);
+ }
+
+
+
## TICKET METHODS (create, remove)
## tickets eliminate CSRF attacks
- ##
## -------------------------------------------------------------------------
/** create_ticket
@@ -369,10 +384,7 @@ class Office {
- ## -------------------------------------------------------------------------
- ##
## ADMIN METHODS (insert, updated etc.)
- ##
## -------------------------------------------------------------------------