From 669f4f3688fb6d7d92985b345ffbb2e4130359d3 Mon Sep 17 00:00:00 2001 From: Ivanilson Melo Date: Thu, 18 Aug 2016 02:23:27 +0000 Subject: [PATCH] High school boletim. --- app/Telegram/Commands/AuthorizeCommand.php | 2 +- app/Telegram/Tools/Markify.php | 12 +++++++++++- composer.json | 2 +- composer.lock | 14 +++++++------- 4 files changed, 20 insertions(+), 10 deletions(-) diff --git a/app/Telegram/Commands/AuthorizeCommand.php b/app/Telegram/Commands/AuthorizeCommand.php index 0ae95d8..4ae0d50 100644 --- a/app/Telegram/Commands/AuthorizeCommand.php +++ b/app/Telegram/Commands/AuthorizeCommand.php @@ -68,8 +68,8 @@ public function handle($arguments) // Grab user info for display. $name = $suap_data['nome']; - $situation = $suap_data['situacao']; $program = $suap_data['curso']; + $situation = $suap_data['situacao']; // All set, message user. $this->replyWithMessage([ diff --git a/app/Telegram/Tools/Markify.php b/app/Telegram/Tools/Markify.php index 6b06786..d03453d 100644 --- a/app/Telegram/Tools/Markify.php +++ b/app/Telegram/Tools/Markify.php @@ -45,6 +45,16 @@ public static function parseBoletim($grades) { N2: ' . $grade['bm2_nota'] . ' '; } + if (isset($grade['bm3_nota']) && $grade['bm3_nota']) { + $course_info = $course_info . ' +N1: ' . $grade['bm3_nota'] . ' '; + } + + if (isset($grade['bm4_nota']) && $grade['bm4_nota']) { + $course_info = $course_info . ' +N1: ' . $grade['bm4_nota'] . ' '; + } + if (isset($grade['media']) && $grade['media']) { $course_info = $course_info . ' Média: ' . $grade['media'] . ' '; @@ -57,7 +67,7 @@ public static function parseBoletim($grades) { if (isset($grade['mfd']) && $grade['mfd']) { $course_info = $course_info . ' -NAF: ' . $grade['mfd']; +MFD/Conceito: ' . $grade['mfd']; } $course_info = $course_info . ' diff --git a/composer.json b/composer.json index 090c4c2..a8b01a7 100644 --- a/composer.json +++ b/composer.json @@ -7,7 +7,7 @@ "require": { "php": ">=5.5.9", "laravel/framework": "5.2.*", - "ivmelo/suapclient": "^0.0.1", + "ivmelo/suapclient": "^0.0.2", "irazasyed/telegram-bot-sdk": "^2.0", "pda/pheanstalk": "~3.0" }, diff --git a/composer.lock b/composer.lock index 8358362..6363aff 100644 --- a/composer.lock +++ b/composer.lock @@ -4,8 +4,8 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "66279ceaeb2efa5a1aa72aedc9b76598", - "content-hash": "012941608fa6b157c42a457026bfb5c0", + "hash": "bccc6f87b07ffbee91e6764dd449a5e9", + "content-hash": "d4439a581ea78bc88d4f42474daf2c23", "packages": [ { "name": "classpreloader/classpreloader", @@ -445,16 +445,16 @@ }, { "name": "ivmelo/suapclient", - "version": "v0.0.1", + "version": "v0.0.2", "source": { "type": "git", "url": "https://github.com/ivmelo/suap-client.git", - "reference": "66045d3092db7d557db67612667da3428f75073b" + "reference": "b17b68835a61b1e5a89c1160d6f84ab2ec66e2a7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ivmelo/suap-client/zipball/66045d3092db7d557db67612667da3428f75073b", - "reference": "66045d3092db7d557db67612667da3428f75073b", + "url": "https://api.github.com/repos/ivmelo/suap-client/zipball/b17b68835a61b1e5a89c1160d6f84ab2ec66e2a7", + "reference": "b17b68835a61b1e5a89c1160d6f84ab2ec66e2a7", "shasum": "" }, "require": { @@ -477,7 +477,7 @@ } ], "description": "A client to access data from SUAP.", - "time": "2016-08-16 00:24:46" + "time": "2016-08-17 04:55:50" }, { "name": "jakub-onderka/php-console-color",