forked from doubtfire-lms/doubtfire-web
-
Notifications
You must be signed in to change notification settings - Fork 82
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
104 additions
and
2 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
10 changes: 10 additions & 0 deletions
10
src/app/tasks/task-comments-viewer/numbas-comment/numbas-comment.component.html
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,10 @@ | ||
<div fxLayout="row" fxLayoutAlign="space-evenly center"> | ||
<div fxLayout="column" fxLayoutAlign="space-around center"> | ||
<div> | ||
<hr class="hr-text" data-content="Numbas Summary" /> | ||
<div class="markdown-to-html" [innerHTML]="comment.text"></div> | ||
<button mat-button (click)="reviewNumbasTest()">Review test</button> | ||
<hr class="hr-fade" /> | ||
</div> | ||
</div> | ||
</div> |
51 changes: 51 additions & 0 deletions
51
src/app/tasks/task-comments-viewer/numbas-comment/numbas-comment.component.scss
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,51 @@ | ||
div { | ||
width: 100%; | ||
} | ||
|
||
p { | ||
color: #2c2c2c; | ||
text-align: center; | ||
} | ||
|
||
hr { | ||
width: 100%; | ||
} | ||
|
||
.hr-fade { | ||
background: linear-gradient(to right, transparent, #9696969d, transparent); | ||
width: 100%; | ||
margin-top: 1px; | ||
} | ||
|
||
.hr-text { | ||
margin: 0; | ||
line-height: 1em; | ||
position: relative; | ||
outline: 0; | ||
border: 0; | ||
color: black; | ||
text-align: center; | ||
height: 1.5em; | ||
opacity: 0.8; | ||
&:before { | ||
content: ""; | ||
background: linear-gradient(to right, transparent, #9696969d, transparent); | ||
position: absolute; | ||
left: 0; | ||
top: 50%; | ||
width: 100%; | ||
height: 1px; | ||
} | ||
&:after { | ||
content: attr(data-content); | ||
position: relative; | ||
display: inline-block; | ||
color: black; | ||
|
||
padding: 0 0.5em; | ||
line-height: 1.5em; | ||
|
||
color: #9696969d; | ||
background-color: #fff; | ||
} | ||
} |
21 changes: 21 additions & 0 deletions
21
src/app/tasks/task-comments-viewer/numbas-comment/numbas-comment.component.ts
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,21 @@ | ||
import { Component, OnInit, Input } from '@angular/core'; | ||
import { Task, TaskComment } from 'src/app/api/models/doubtfire-model'; | ||
import { NumbasModal } from 'src/app/common/numbas-component/numbas-modal.component'; | ||
|
||
@Component({ | ||
selector: 'numbas-comment', | ||
templateUrl: './numbas-comment.component.html', | ||
styleUrls: ['./numbas-comment.component.scss'], | ||
}) | ||
export class NumbasCommentComponent implements OnInit { | ||
@Input() task: Task; | ||
@Input() comment: TaskComment; | ||
|
||
constructor(private modalService: NumbasModal) {} | ||
|
||
ngOnInit() {} | ||
|
||
reviewNumbasTest() { | ||
this.modalService.show(this.task, 'review'); | ||
} | ||
} |
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