Skip to content
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

SAK-50917 WC SakaiGrader when grading move peer review rubrics to an accordion #13257

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

st-manu
Copy link
Contributor

@st-manu st-manu commented Jan 30, 2025

https://sakaiproject.atlassian.net/browse/SAK-50917

After adding the rubrics, the content of each peer review may be too lengthy to display all of them expanded. I have changed the format to an accordion (as it is in the classic grader).

image
image
image

image

@ern ern changed the title SAK-50917 Peer Review-Rubrics: Instructor does not see the peer review rubric when grading SAK-50917 Rubrics when grading move peer review rubrics to an accordion Jan 30, 2025
@ern ern changed the title SAK-50917 Rubrics when grading move peer review rubrics to an accordion SAK-50917 WC SakaiGrader when grading move peer review rubrics to an accordion Jan 30, 2025
@adrianfish
Copy link
Contributor

@st-manu Screenshots look great!

<div>
<span class="fw-bold me-2">${this._i18n.grade}</span>
<span>${pr.scoreDisplay}</span>
<div class="accordion" id="accordionPeerReviews">
Copy link
Contributor

Choose a reason for hiding this comment

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

please use kebab case for all html element ids

<div class="accordion" id="accordionPeerReviews">
${this._submission.peerReviews.map(pr => html`
<div class="accordion-item">
<h2 class="accordion-header" id="peerHeading-${pr.assessorUserId}">
Copy link
Contributor

Choose a reason for hiding this comment

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

kebab case please

<div>
<span class="fw-bold me-2">${this._i18n.grade}</span>
<span>${pr.scoreDisplay}</span>
<div class="accordion" id="accordionPeerReviews">
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
<div class="accordion" id="accordionPeerReviews">
<div class="accordion" id="peer-reviews">

<div class="accordion" id="accordionPeerReviews">
${this._submission.peerReviews.map(pr => html`
<div class="accordion-item">
<h2 class="accordion-header" id="peerHeading-${pr.assessorUserId}">
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
<h2 class="accordion-header" id="peerHeading-${pr.assessorUserId}">
<h2 class="accordion-header" id="peer-heading-${pr.assessorUserId}">

${pr.assessorDisplayName}
</button>
</h2>
<div id="peerCollapse-${pr.assessorUserId}" class="accordion-collapse collapse" aria-labelledby="peerHeading-${pr.assessorUserId}" data-bs-parent="#accordionPeerReviews">
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
<div id="peerCollapse-${pr.assessorUserId}" class="accordion-collapse collapse" aria-labelledby="peerHeading-${pr.assessorUserId}" data-bs-parent="#accordionPeerReviews">
<div id="peer-collapse-${pr.assessorUserId}" class="accordion-collapse collapse" aria-labelledby="peer-heading-${pr.assessorUserId}" data-bs-parent="#peer-reviews">

${this._submission.peerReviews.map(pr => html`
<div class="accordion-item">
<h2 class="accordion-header" id="peerHeading-${pr.assessorUserId}">
<button class="accordion-button" type="button" data-bs-toggle="collapse" data-bs-target="#peerCollapse-${pr.assessorUserId}" aria-expanded="true" aria-controls="peerCollapse-${pr.assessorUserId}">
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
<button class="accordion-button" type="button" data-bs-toggle="collapse" data-bs-target="#peerCollapse-${pr.assessorUserId}" aria-expanded="true" aria-controls="peerCollapse-${pr.assessorUserId}">
<button class="accordion-button" type="button" data-bs-toggle="collapse" data-bs-target="#peer-collapse-${pr.assessorUserId}" aria-expanded="true" aria-controls="peer-collapse-${pr.assessorUserId}">

tool-id="${this.toolId}"
entity-id="${this.entityId}"
instructor="true"
is-peer-or-self="true"
Copy link
Contributor

Choose a reason for hiding this comment

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

This is a boolean attribute, so you dont need the string value

evaluated-item-owner-id="${this._submission.groupId || this._submission.firstSubmitterId}">
</sakai-rubric-student>
<hr class="itemSeparator">
` : ""}
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
` : ""}
` : nothing}

</div>
<div class="mt-2 mb-2 fw-bold">${this._i18n.reviewer_comments}</div>
<div>${unsafeHTML(pr.comment)}</div>
${pr.attachmentUrlList && pr.attachmentUrlList.length > 0 ? html`
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
${pr.attachmentUrlList && pr.attachmentUrlList.length > 0 ? html`
${pr.attachmentUrlList?.length > 0 ? html`

@st-manu
Copy link
Contributor Author

st-manu commented Feb 4, 2025

thank you for the review @adrianfish

tool-id="${this.toolId}"
entity-id="${this.entityId}"
instructor="true"
is-peer-or-self="true"
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
is-peer-or-self="true"
is-peer-or-self

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I wanted to make sure it was still working before making the change since the rest of the rubrics use the string, but I can't test it right now

Copy link
Contributor

@adrianfish adrianfish Feb 6, 2025

Choose a reason for hiding this comment

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

Boolean attributes can not have a string value. is-peer-or-self="false" would still be positive

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

understood! change made, thanks @adrianfish

Copy link
Contributor

@adrianfish adrianfish left a comment

Choose a reason for hiding this comment

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

Thanks!

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.

2 participants