Skip to content

Commit e9c257e

Browse files
committed
Fixes
1 parent c8a2c9d commit e9c257e

File tree

5 files changed

+34
-24
lines changed

5 files changed

+34
-24
lines changed

src/Apps/StatCan.OrchardCore.Candev/Indexes/Migrations.cs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public int Create()
1616
CreateCandevUsersIndex();
1717
CreateHackathonAvgScoresIndex();
1818

19-
return 2;
19+
return 3;
2020
}
2121

2222
private void CreateCandevItemsIndex()
@@ -92,7 +92,7 @@ private void CreateCandevUsersIndex()
9292
private void CreateHackathonAvgScoresIndex()
9393
{
9494
SchemaBuilder.CreateReduceIndexTable(typeof(HackathonAvgScoresIndex), table => table
95-
.Column<string>("ScoreIndexId", c => c.WithLength(26))
95+
.Column<string>("ScoreIndexId", c => c.WithLength(255))
9696
.Column<double>("Score")
9797
.Column<double>("Count"),
9898
null
@@ -107,5 +107,12 @@ public int UpdateFrom1()
107107

108108
return 2;
109109
}
110+
111+
public int UpdateFrom2()
112+
{
113+
SchemaBuilder.AlterTable(nameof(HackathonAvgScoresIndex), table => table.AlterColumn("ScoreIndexId", c => c.WithLength(255)));
114+
115+
return 3;
116+
}
110117
}
111118
}

src/Apps/StatCan.OrchardCore.Candev/Views/Widget-JudgingListWidget.liquid

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
<i class="fas fa-signature fa-3x text-muted pt-5 pl-5">{{ "There are no teams." | t }}</i>
1818
{% else %}
1919
{% for team in teams %}
20-
{% if team.ContentItem.Content.Team.InTheRunning.Value %}
2120
{% assign score = Queries.GetScoreEntry | query: teamContentItemId: team.ContentItemId, owner: userId %}
2221
{% if team.ContentItem.Content.Team.Challenge.ContentItemIds.first == user.Properties.Judge.Judge.Challenge.ContentItemIds.first
2322
and score.size < 1 %}
@@ -31,12 +30,11 @@
3130
and score.size == 1 %}
3231
<v-container class="pt-5 pl-5">
3332
<v-row align="center">
34-
<v-subheader >{{ "Score: " | t }} {{ score.ContentItem.Content.Score.Score.Value }}</v-subheader>
33+
<v-subheader >{{ "Score: " | t }} {{ score.first.ContentItem.Content.Score.Score.Value }}</v-subheader>
3534
<v-subheader >{{ "Team" | t }} {{ team.DisplayText }}</v-subheader>
3635
</v-row>
3736
</v-container>
3837
{% endif %}
39-
{% endif %}
4038
{% endfor %}
4139
{% endif %}
4240
</div>
@@ -50,21 +48,15 @@
5048
{% assign score = Queries.GetScoreEntry | query: teamContentItemId: team.ContentItemId, owner: userId %}
5149
<v-container class="pt-5 pl-5">
5250
<v-row align="center">
53-
{% if team.ContentItem.Content.Team.Challenge.ContentItemIds.first == user.Properties.Judge.Judge.Challenge.ContentItemIds.first
54-
and team.ContentItem.Content.Team.InTheRunning.Value == true
55-
and score.size < 2 %}
56-
<v-btn class="m-5" outlined text href="{{ '~/ScoringPage' | href }}?teamId={{team.ContentItemId}}">Score</v-btn>
57-
{% elsif team.ContentItem.Content.Team.Challenge.ContentItemIds.first != user.Properties.Judge.Judge.Challenge.ContentItemIds.first
58-
and team.ContentItem.Content.Team.InTheRunning.Value == true
51+
{% if team.ContentItem.Content.Team.Challenge.ContentItemIds.first != user.Properties.Judge.Judge.Challenge.ContentItemIds.first
5952
and score.size < 1 %}
6053
<v-btn class="m-5" outlined text href="{{ '~/ScoringPage' | href }}?teamId={{team.ContentItemId}}">Score</v-btn>
61-
{% endif %}
62-
{% for result in score %}
63-
{% if result.ContentItem.Content.Score.Round.Value == "2" %}
64-
<v-subheader >{{ "Score: " | t }} {{ result.ContentItem.Content.Score.Score.Value }}</v-subheader>
65-
{% endif %}
66-
{% endfor %}
6754
<v-subheader >{{ "Team" | t }} {{ team.DisplayText }}</v-subheader>
55+
{% elsif team.ContentItem.Content.Team.Challenge.ContentItemIds.first != user.Properties.Judge.Judge.Challenge.ContentItemIds.first
56+
and score.size == 1 %}
57+
<v-subheader >{{ "Score: " | t }} {{ score.first.ContentItem.Content.Score.Score.Value }}</v-subheader>
58+
<v-subheader >{{ "Team" | t }} {{ team.DisplayText }}</v-subheader>
59+
{% endif %}
6860
</v-row>
6961
</v-container>
7062
{% endif %}

src/Apps/StatCan.OrchardCore.Candev/Views/Widget-JudgingResults.liquid

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
<v-card-text>
2525
<h3>{{ "Statement" | t }}</h3>
2626
<div>{{ challenge.ContentItem.Content.Challenge.Statement.Text | raw }}</div>
27-
<h3>{{ "Background Information & Potential Datasets" | t }}</h3>
27+
<br>
2828
<div>{{ challenge.ContentItem.Content.MarkdownBodyPart.Markdown | markdownify | raw }}</div>
2929
<h3>{{ "Organization" | t }}</h3>
3030
{% if Culture.Name == "fr" %}

src/Apps/StatCan.OrchardCore.Candev/Views/Widget-TeamDashboardWidget.liquid

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,19 @@
5959
<h3>{{ "Statement" | t }}</h3>
6060
<v-flex class="pt-2"><span class="subtitle-2">{{ challengeSelected.ContentItem.Content.Challenge.Statement.Text | shortcode }}</span></v-flex>
6161
{% if Site.Properties.HackathonCustomSettings.TeamCustomSettings.PartialChallenge.Value == false %}
62-
<h3>{{ "Background Information & Potential Datasets" | t }}</h3>
62+
<br>
6363
<v-flex class="pt-2"><span class="subtitle-2">{{ challengeSelected.ContentItem.Content.MarkdownBodyPart.Markdown | markdownify | raw }}</span></v-flex>
6464
{% endif %}
6565
<h3>{{ "Organization" | t }}</h3>
66-
<v-flex class="pt-2"><span class="subtitle-2">{{ challengeSelected.ContentItem.Content.Challenge.OrganizationNameEn.Text | shortcode }}</span></v-flex>
67-
<h3>{{ "Mentors" | t }}</h3>
66+
{% if Culture.Name == "fr" %}
67+
<v-tab>{{ challenge.ContentItem.Content.Challenge.OrganizationAcronymFr.Text }}</v-tab>
68+
{% else %}
69+
<v-tab>{{ challenge.ContentItem.Content.Challenge.OrganizationAcronymEn.Text }}</v-tab>
70+
{% endif %}
71+
<h3>{{ "Technical mentor" | t }}</h3>
6872
<v-flex class="pt-2"><span class="subtitle-2">{{ challengeSelected.ContentItem.Content.Challenge.TechnicalMentorName.Text | shortcode }}</span></v-flex>
73+
<h3>{{ "Case specialist" | t }}</h3>
74+
<v-flex class="pt-2"><span class="subtitle-2">{{ challengeSelected.ContentItem.Content.Challenge.CaseSpecialistName.Text | shortcode }}</span></v-flex>
6975
</v-card-text>
7076
</v-card>
7177
</v-col>

src/StatCan.OrchardCore.Cms.Web/Localization/fr/StatCan.OrchardCore.Candev.po

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ msgstr "L'équipe n'a pas pu être trouvée"
6565
#. _notifier.Success(H["Successfully left team"]);
6666
msgctxt "StatCan.OrchardCore.Candev.Controllers.CandevController"
6767
msgid "Successfully left team"
68-
msgstr "A quitté l'équipe avec succès"
68+
msgstr "À quitté l'équipe avec succès"
6969

7070
#: StatCan.OrchardCore.Candev\Controllers\CandevController.cs:151
7171
#. _notifier.Success(H["Member successfully removed from the team"]);
@@ -472,8 +472,13 @@ msgstr "Organisation"
472472

473473
#: StatCan.OrchardCore.Candev\Views\Widget-TeamDashboardWidget.liquid:0
474474
msgctxt "StatCan.OrchardCore.Candev.Views.Widget-TeamDashboardWidget"
475-
msgid "Mentors"
476-
msgstr "Mentors"
475+
msgid "Technical mentor"
476+
msgstr "Mentor technique"
477+
478+
#: StatCan.OrchardCore.Candev\Views\Widget-TeamDashboardWidget.liquid:0
479+
msgctxt "StatCan.OrchardCore.Candev.Views.Widget-TeamDashboardWidget"
480+
msgid "Case specialist"
481+
msgstr "Spécialiste de cas"
477482

478483
#: StatCan.OrchardCore.Candev\Views\Widget-TeamDashboardWidget.liquid:0
479484
msgctxt "StatCan.OrchardCore.Candev.Views.Widget-TeamDashboardWidget"

0 commit comments

Comments
 (0)