Skip to content

Commit 0fc8091

Browse files
committed
Conserta bug da disciplina de seminário de integração para alunos de tads.
1 parent ea68d34 commit 0fc8091

File tree

2 files changed

+18
-10
lines changed

2 files changed

+18
-10
lines changed

src/Ivmelo/SUAP/SUAP.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -349,6 +349,14 @@ public function getGrades($ano_periodo = '')
349349
// Get if it's a high school course.
350350
$is_high_school = ($columns != 16);
351351

352+
// Some courses doesn't have grades, averages and stuff. (Seminários).
353+
if ($grade_row->filter('td')->eq(7)->attr('colspan') == '12') {
354+
// In that case, we'll just skip all grade columns.
355+
// Well do that by getting out of this loop.
356+
array_push($data, $course_data);
357+
continue;
358+
}
359+
352360
// Get wether the course skips the first and second bimester. (HIGH SCHOOL STUDENTS ONLY).
353361
$skips_12bm = ($grade_row->filter('td')->eq(7)->attr('colspan') == '4');
354362

tests/test.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,16 @@
2121
$client = new SUAP($student_id, $suap_key, true);
2222

2323
print_r($client->getGrades());
24-
print_r($client->getGrades('2016.1'));
25-
print_r($client->getStudentData());
26-
print_r($client->getCourses());
27-
print_r($client->getCourseData('TEC.0080'));
28-
print_r($client->filterCoursesByName('teste paradigma'));
29-
print_r($client->getClasses());
30-
//$client->getClasses('2016.1')
31-
print_r($client->getSchedule(2));
32-
// print_r($client->getSchedule(2, '2016.1'));
33-
print_r($client->getWeekSchedule());
24+
// print_r($client->getGrades('2016.1'));
25+
// print_r($client->getStudentData());
26+
// print_r($client->getCourses());
27+
// print_r($client->getCourseData('TEC.0080'));
28+
// print_r($client->filterCoursesByName('teste paradigma'));
29+
// print_r($client->getClasses());
30+
// //$client->getClasses('2016.1')
31+
// print_r($client->getSchedule(2));
32+
// // print_r($client->getSchedule(2, '2016.1'));
33+
// print_r($client->getWeekSchedule());
3434
} catch (Exception $e) {
3535
// Print exception message.
3636
// echo $e->getMessage();

0 commit comments

Comments
 (0)