Fixed the numbering of assignment candidates for projector and PDF
This commit is contained in:
parent
b48ca8c434
commit
7598fc5367
@ -131,6 +131,7 @@ export class AssignmentPdfService {
|
|||||||
margin: [0, 0, 0, 10]
|
margin: [0, 0, 0, 10]
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
const listType = assignment.number_poll_candidates ? 'ol' : 'ul';
|
||||||
|
|
||||||
return {
|
return {
|
||||||
columns: [
|
columns: [
|
||||||
@ -141,7 +142,7 @@ export class AssignmentPdfService {
|
|||||||
style: 'textItem'
|
style: 'textItem'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
ul: userList,
|
[listType]: userList,
|
||||||
style: 'textItem'
|
style: 'textItem'
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
@ -7,4 +7,5 @@ export interface AssignmentSlideData {
|
|||||||
user: string;
|
user: string;
|
||||||
elected: boolean;
|
elected: boolean;
|
||||||
}[];
|
}[];
|
||||||
|
number_poll_candidates: boolean;
|
||||||
}
|
}
|
||||||
|
@ -7,10 +7,18 @@
|
|||||||
<div *ngIf="data.data && data.data.description" [innerHTML]="data.data.description | trust: 'html'"></div>
|
<div *ngIf="data.data && data.data.description" [innerHTML]="data.data.description | trust: 'html'"></div>
|
||||||
|
|
||||||
<h3 translate>Candidates</h3>
|
<h3 translate>Candidates</h3>
|
||||||
<ul *ngIf="data.data.assignment_related_users && data.data.assignment_related_users.length">
|
<ng-container *ngIf="data.data.assignment_related_users && data.data.assignment_related_users.length">
|
||||||
<li *ngFor="let candidate of data.data.assignment_related_users">
|
<ol *ngIf="data.data.number_poll_candidates">
|
||||||
{{ candidate.user }}
|
<li *ngFor="let candidate of data.data.assignment_related_users">
|
||||||
<mat-icon *ngIf="candidate.elected">star</mat-icon>
|
{{ candidate.user }}
|
||||||
</li>
|
<mat-icon *ngIf="candidate.elected">star</mat-icon>
|
||||||
</ul>
|
</li>
|
||||||
|
</ol>
|
||||||
|
<ul *ngIf="!data.data.number_poll_candidates">
|
||||||
|
<li *ngFor="let candidate of data.data.assignment_related_users">
|
||||||
|
{{ candidate.user }}
|
||||||
|
<mat-icon *ngIf="candidate.elected">star</mat-icon>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</ng-container>
|
||||||
</div>
|
</div>
|
||||||
|
@ -34,6 +34,7 @@ async def assignment_slide(
|
|||||||
"open_posts": assignment["open_posts"],
|
"open_posts": assignment["open_posts"],
|
||||||
"description": assignment["description"],
|
"description": assignment["description"],
|
||||||
"assignment_related_users": assignment_related_users,
|
"assignment_related_users": assignment_related_users,
|
||||||
|
"number_poll_candidates": assignment["number_poll_candidates"],
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user