@if (loading()) {
} @else if (course()) {
@if (isOwnCourse()) { }
COMMUNAUTÉ

{{ course()!.title }}

{{ course()!.description }}

{{ course()!.creatorName }} · {{ course()!.topicCount }} sujet{{ course()!.topicCount !== 1 ? 's' : '' }}
@if (isEnrolled()) {
Progression {{ progressPercent() }}%
@if (progress()) {

{{ progress()!.completedTopics }}/{{ progress()!.totalTopics }} sujets · {{ progress()!.completedResources }}/{{ progress()!.totalResources }} ressources

}
} @if (!isEnrolled() && !isOwnCourse()) { } @if (isEnrolled() && progressPercent() > 0) { }

Contenu du cours

@if (course()!.topics.length === 0) {

Ce cours ne contient pas encore de sujets.

} @else { @for (topic of course()!.topics; track topic.id) {
@if (isTopicDone(topic.id)) { } @else { {{ topic.position }} }

{{ topic.title }}

@if (topic.description) {

{{ topic.description }}

} {{ topic.resources.length }} ressource{{ topic.resources.length !== 1 ? 's' : '' }}
@if (isEnrolled() && !isTopicDone(topic.id)) { }
@if (isTopicExpanded(topic.id) && topic.resources.length > 0) {
@for (resource of topic.resources; track resource.id) {
@if (isResourceDone(resource.id)) { } @else { }

{{ resource.title }}

{{ resource.type === 'Url' ? 'Lien' : resource.type === 'Video' ? 'Vidéo' : resource.type === 'Text' ? 'Texte' : 'Fichier' }} @if (resource.type !== 'Text') { · Ouvrir → }
@if (resource.type === 'Text') { }
@if (resource.type === 'Text' && isResourceExpanded(resource.id)) {
{{ resource.content }} @if (isEnrolled() && !isResourceDone(resource.id)) { }
} }
}
} }
}