Skip to content

feat: Controller para obter o currículo base do Bacharelado em Ciência da Computação#23

Open
Teruya11 wants to merge 1 commit intomainfrom
feature/get-base-curriculum
Open

feat: Controller para obter o currículo base do Bacharelado em Ciência da Computação#23
Teruya11 wants to merge 1 commit intomainfrom
feature/get-base-curriculum

Conversation

@Teruya11
Copy link
Copy Markdown
Contributor

@Teruya11 Teruya11 commented May 23, 2025

@Teruya11 Teruya11 requested a review from KakeyaK May 23, 2025 20:13
@Teruya11
Copy link
Copy Markdown
Contributor Author

Esqueci de marcar, precisa da branch feature/models

@KakeyaK KakeyaK requested review from Copilot June 18, 2025 00:40
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds a new controller to fetch the base curriculum for the Bachelor’s in Computer Science (BCC) and select the most recent mandatory record per subject.

  • Introduces TestController with getMandatoryFromBCC method
  • Queries CurriculumTable for mandatory entries matching a curriculum code prefix
  • Groups results by subject and picks the latest entry for each
Comments suppressed due to low confidence (4)

app/Http/Controllers/CourseController.php:6

  • The class name TestController does not match the file name or its purpose. Rename it to CourseController (or another meaningful name) to keep naming consistent.
class TestController extends Controller

app/Http/Controllers/CourseController.php:8

  • Add a docblock to explain the purpose of this method, its parameters (e.g., format of $curriculumCode), and the return type to improve maintainability.
	public function getMandatoryFromBCC($curriculumCode)

app/Http/Controllers/CourseController.php:1

  • There are no tests covering this new controller method. Consider adding unit or integration tests to validate query logic and grouping behavior.
<?php

app/Http/Controllers/CourseController.php:10

  • PHP uses . for string concatenation, not +. Change $curriculumCode + "%" to $curriculumCode . "%" to build the LIKE pattern correctly.
		$baseCurriculum = CurriculumTable::where("id_curriculum", "like", $curriculumCode + "%")

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants