-
-
Notifications
You must be signed in to change notification settings - Fork 204
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
feat: implement rs school app tests preview page #2482
Conversation
@RequiredRoles([Role.Admin, CourseRole.Manager]) | ||
@ApiOperation({ operationId: 'getAllMinimizedRSSchoolAppTests' }) | ||
@ApiOkResponse({ type: [MinimizedAutoTestTaskDto] }) | ||
async getAllMinimizedRSSchoolAppTests() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lets remove RSSchoolApp
from the name as it looks redundant
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also I suggest another name. minimized
looks confusing here as it's usually used for describing UI patterns.
What about the following names:
getAllAutoTests()
getBasicAutoTests()
|
||
@Get('/:id') | ||
@RequiredRoles([Role.Admin, CourseRole.Manager]) | ||
@ApiOperation({ operationId: 'getRSSchoolAppTest' }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
since module called auto-test
, I would name it as getAutoTest
. Application name looks weird in the name
constructor(task: Task) { | ||
this.id = task.id; | ||
this.name = task.name; | ||
this.maxAttemptsNumber = Number(task?.attributes?.public?.maxAttemptsNumber); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Number(undefined)
gives NaN
. Please add handling when the value is undefined
}); | ||
} | ||
|
||
public async getOne(id: number) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
findById
export default function () { | ||
return ( | ||
<ActiveCourseProvider> | ||
<SessionProvider allowedRoles={[CourseRole.Manager]} adminOnly> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<SessionProvider allowedRoles={[CourseRole.Manager]}>
)} | ||
{selectedTask?.descriptionUrl && ( | ||
<Descriptions.Item label="Description URL"> | ||
<a href={selectedTask?.descriptionUrl}>{selectedTask?.descriptionUrl}</a> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<a href={selectedTask?.descriptionUrl}>{selectedTask?.descriptionUrl}</a> | |
<a href={selectedTask?.descriptionUrl} target="_blank">{selectedTask?.descriptionUrl}</a> |
{selectedTask?.discipline?.name && ( | ||
<Descriptions.Item label="Discipline">{selectedTask?.discipline?.name}</Descriptions.Item> | ||
)} | ||
{selectedTask?.courses?.length && ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
{selectedTask?.courses?.length && ( | |
{selectedTask?.courses?.length > 0 && ( |
client/src/pages/admin/auto-test.tsx
Outdated
export default function () { | ||
return ( | ||
<ActiveCourseProvider> | ||
<SessionProvider allowedRoles={[CourseRole.Manager]} adminOnly> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<SessionProvider allowedRoles={[CourseRole.Manager]} adminOnly> | |
<SessionProvider allowedRoles={[CourseRole.Manager]}> |
🟢 Add
deploy
label if you want to deploy this Pull Request to staging environment🧑⚖️ Pull Request Naming Convention
area:*
label(s)🤔 This is a ...
🔗 Related issue link
Describe the source of requirement, like related issue link.
💡 Background and solution
implement page with auto tesk cards, when preview button is pressed, modal with full data opens
☑️ Self Check before Merge