diff options
Diffstat (limited to 'public/app/controllers/Office.php')
| -rw-r--r-- | public/app/controllers/Office.php | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/public/app/controllers/Office.php b/public/app/controllers/Office.php index 9ff4e14..a876f6c 100644 --- a/public/app/controllers/Office.php +++ b/public/app/controllers/Office.php @@ -16,7 +16,6 @@ use app\extends\Cache_service; class Office { ## ------------------------------------------------------------------------- - ## ## SERVE METHODS (selects) ## ## ------------------------------------------------------------------------- @@ -114,10 +113,8 @@ class Office { ## ------------------------------------------------------------------------- - ## ## PETITION FORMS ## secretarial support / serve forms for teachers' requests and applications - ## ## ------------------------------------------------------------------------- @@ -256,8 +253,12 @@ class Office { ['name' => 'user_id', 'value' => $user_id] // pass user identity ]); - // #5: render the view ------------------------------------------------- - Render::view('templates/penalty', ['form' => $form]); + // #5: create ticket; then render the view ----------------------------- + $ticket = self::create_ticket(); // save ticket + Render::view('templates/penalty', [ + 'form' => $form, + 'ticket' => $ticket + ]); } @@ -282,11 +283,11 @@ class Office { public static function add_petition() { $post = Registry::get('REQUEST')->POST; - if (self::remove_ticket($post['ticket'])) { // check ticket + remove - $manager = new App_manager(); + $manager = new App_manager(); // use APP Manager + // to get the real author (user_id) of the petition $new_id = Content_model::add_petition([ 'user_id' => $manager->getUserToken()->getUser()->getID(), |
