Skip to content

Assignment: Implement assignment tool with vue and symfony style - refs BT#22568 #6257

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

christianbeeznest
Copy link
Contributor

No description provided.

@christianbeeznest christianbeeznest marked this pull request as draft April 28, 2025 20:50
}

protected function filterProperty(
string $property,
Copy link

Choose a reason for hiding this comment

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

Method filterProperty has 7 arguments (exceeds 4 allowed). Consider refactoring.

return response.data
}

async function getAssignmentDetailForTeacher({ assignmentId, page = 1, itemsPerPage = 10, order = {} }) {
Copy link

Choose a reason for hiding this comment

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

Similar blocks of code found in 2 locations. Consider refactoring.

return response.data
}

async function getAssignmentDetail({ assignmentId, page = 1, itemsPerPage = 10, order = {} }) {
Copy link

Choose a reason for hiding this comment

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

Similar blocks of code found in 2 locations. Consider refactoring.

return $qb->getQuery()->getResult();
}

public function findStudentProgressByCourse(Course $course, ?Session $session): array
Copy link

Choose a reason for hiding this comment

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

Method findStudentProgressByCourse has 57 lines of code (exceeds 25 allowed). Consider refactoring.

}

public function findAssignmentSubmissionsPaginated(
int $assignmentId,
Copy link

Choose a reason for hiding this comment

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

Method findAssignmentSubmissionsPaginated has 5 arguments (exceeds 4 allowed). Consider refactoring.

class CreateStudentPublicationCommentAction extends BaseResourceFileAction
{
public function __invoke(
Request $request,
Copy link

Choose a reason for hiding this comment

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

Method __invoke has 8 arguments (exceeds 4 allowed). Consider refactoring.

* Handles the creation logic for a student publication comment resource.
*/
public function handleCreateCommentRequest(
AbstractResource $resource,
Copy link

Choose a reason for hiding this comment

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

Method handleCreateCommentRequest has 6 arguments (exceeds 4 allowed). Consider refactoring.


class CreateStudentPublicationCommentAction extends BaseResourceFileAction
{
public function __invoke(
Copy link

Choose a reason for hiding this comment

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

Method __invoke has 47 lines of code (exceeds 25 allowed). Consider refactoring.

class CreateStudentPublicationFileAction extends BaseResourceFileAction
{
public function __invoke(
Request $request,
Copy link

Choose a reason for hiding this comment

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

Method __invoke has 6 arguments (exceeds 4 allowed). Consider refactoring.


class CreateStudentPublicationFileAction extends BaseResourceFileAction
{
public function __invoke(
Copy link

Choose a reason for hiding this comment

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

Method __invoke has 29 lines of code (exceeds 25 allowed). Consider refactoring.

return $description;
}

protected function filterProperty(
Copy link

Choose a reason for hiding this comment

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

Function filterProperty has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.

class CreateStudentPublicationCorrectionFileAction extends BaseResourceFileAction
{
public function __invoke(
Request $request,
Copy link

Choose a reason for hiding this comment

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

Method __invoke has 6 arguments (exceeds 4 allowed). Consider refactoring.


class CreateStudentPublicationCorrectionFileAction extends BaseResourceFileAction
{
public function __invoke(
Copy link

Choose a reason for hiding this comment

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

Method __invoke has 27 lines of code (exceeds 25 allowed). Consider refactoring.

return $qb->getQuery()->getResult();
}

public function findStudentProgressByCourse(Course $course, ?Session $session): array
Copy link

Choose a reason for hiding this comment

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

Function findStudentProgressByCourse has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.

export default makeService("c_student_publications")
async function findStudentAssignments() {
const { sid, cid, gid } = useCidReq()
const params = new URLSearchParams({ cid, ...(sid && { sid }), ...(gid && { gid }) }).toString()
Copy link

Choose a reason for hiding this comment

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

Similar blocks of code found in 2 locations. Consider refactoring.

Copy link

codeclimate bot commented Apr 30, 2025

Code Climate has analyzed commit b00dc43 and detected 17 issues on this pull request.

Here's the issue category breakdown:

Category Count
Complexity 13
Duplication 4

View more on Code Climate.

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.

1 participant