-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #763 from mathematicalthinking/feat/submission-men…
…tor-thread-2 Feat/submission mentor thread 2
- Loading branch information
Showing
21 changed files
with
763 additions
and
1,226 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
{{! /** | ||
* # | ||
* @description | ||
Response mentor thread is a subcomponent of the response-container.hbs. | ||
Purpose is to display the student submission and the mentor's response to the submission. | ||
It's corresponding sass file is response-thread.scss | ||
* @author Yousof Wakili | ||
* @since 3.6.2 | ||
*/ }} | ||
|
||
<div class='response-thread-container'> | ||
<div class='response-submission-container thread-child'> | ||
<ResponseSubmissionView | ||
@response={{@response}} | ||
@submission={{@submission}} | ||
@workspace={{@workspace}} | ||
@wsResponses={{@cleanWorkspaceResponses}} | ||
@studentSubmissions={{@submissions}} | ||
@onSubChange={{@onSubChange}} | ||
@sendRevisionNotices={{@sendRevisionNotices}} | ||
@isParentWorkspace={{@isParentWorkspace}} | ||
/> | ||
</div> | ||
<div | ||
class={{if | ||
this.show | ||
'mentor-thread-container' | ||
'mentor-thread-container closed' | ||
}} | ||
> | ||
<div class='mentor-header-thread'> | ||
{{#if this.showButton}} | ||
<button {{on 'click' this.toggleShowResponses}} class='primary-button'> | ||
{{this.showResponsesText}} | ||
</button> | ||
{{/if}} | ||
</div> | ||
{{#if this.showResponses}} | ||
<ResponseMentorReply | ||
@isCreating={{@isCreating}} | ||
@response={{@response}} | ||
@submission={{@submission}} | ||
@workspace={{@workspace}} | ||
@mentorReplies={{@mentorReplies}} | ||
@responseToApprove={{@responseToApprove}} | ||
@displayResponse={{@displayResponse}} | ||
@canDirectSend={{@canDirectSend}} | ||
@canApprove={{@canApprove}} | ||
@isOwnMentorReply={{@isOwnMentorReply}} | ||
@onSaveSuccess={{@onSaveSuccess}} | ||
@onMentorReplySwitch={{@onMentorReplySwitch}} | ||
@toResponses={{@toResponses}} | ||
@submissionResponses={{@submissionResponses}} | ||
@canSend={{@canSend}} | ||
@isMentorRecipient={{@isMentorRecipient}} | ||
@isOwnSubmission={{@isOwnSubmission}} | ||
@toNewResponse={{@toNewResponse}} | ||
@priorMentorRevision={{@priorMentorRevision}} | ||
@iconFillOptions={{@iconFillOptions}} | ||
@toSubmission={{@toSubmission}} | ||
@handleResponseThread={{@handleResponseThread}} | ||
@isParentWorkspace={{@isParentWorkspace}} | ||
/> | ||
{{/if}} | ||
</div> | ||
|
||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import Component from '@glimmer/component'; | ||
import { action } from '@ember/object'; | ||
import { tracked } from '@glimmer/tracking'; | ||
|
||
export default class ResponseMentorThreadComponent extends Component { | ||
@tracked show = false; | ||
|
||
get showResponsesText() { | ||
return this.showResponses ? 'Hide responses' : 'Show responses'; | ||
} | ||
|
||
get showResponses() { | ||
return this.show || this.args.isCreating; | ||
} | ||
|
||
get showButton() { | ||
return !this.args.isCreating; | ||
} | ||
|
||
@action | ||
toggleShowResponses() { | ||
this.show = !this.show; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.