Skip to content

Commit 2046959

Browse files
committed
workflows
1 parent 28891b2 commit 2046959

2 files changed

Lines changed: 7 additions & 6 deletions

File tree

src/main/java/de/tum/cit/aet/ai/service/ContributionFairnessService.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,13 +79,13 @@ public FairnessReportWithUsageDTO analyzeFairnessWithUsage(TeamRepositoryDTO rep
7979
/**
8080
* Analyses a repository with optional template author exclusion.
8181
*
82-
* @param repositoryDTO the repository to analyse
83-
* @param templateAuthorEmail email of the template author to exclude (lowercase), or {@code null}
84-
* @param exerciseId the exercise ID for per-exercise CQI weight resolution
82+
* @param repositoryDTO the repository to analyse
83+
* @param templateAuthorEmails emails of the template authors to exclude (lowercase), or {@code null}
84+
* @param exerciseId the exercise ID for per-exercise CQI weight resolution
8585
* @return fairness report plus token usage
8686
*/
8787
public FairnessReportWithUsageDTO analyzeFairnessWithUsage(TeamRepositoryDTO repositoryDTO,
88-
String templateAuthorEmail, Long exerciseId) {
88+
Set<String> templateAuthorEmails, Long exerciseId) {
8989
String repoPath = repositoryDTO.localPath();
9090
String teamName = repositoryDTO.participation().team().name();
9191
String shortName = repositoryDTO.participation().team().shortName();

src/main/webapp/src/components/CqiWeightsPanel.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ type WeightAction =
3131
| { type: 'RESET'; state: WeightState };
3232

3333
function weightReducer(state: WeightState, action: WeightAction): WeightState {
34-
const clamp = (v: number) => Number.isNaN(v) ? v : Math.max(0, Math.min(100, v));
34+
const clamp = (v: number) => (Number.isNaN(v) ? v : Math.max(0, Math.min(100, v)));
3535
switch (action.type) {
3636
case 'SET_EFFORT':
3737
return Object.assign({}, state, { effort: clamp(action.value) });
@@ -75,7 +75,8 @@ export default function CqiWeightsPanel({ exerciseId, disabled }: CqiWeightsPane
7575

7676
const val = (n: number) => (Number.isNaN(n) ? 0 : n);
7777
const total = val(state.effort) + val(state.loc) + val(state.temporal) + val(state.ownership);
78-
const allFilled = !Number.isNaN(state.effort) && !Number.isNaN(state.loc) && !Number.isNaN(state.temporal) && !Number.isNaN(state.ownership);
78+
const allFilled =
79+
!Number.isNaN(state.effort) && !Number.isNaN(state.loc) && !Number.isNaN(state.temporal) && !Number.isNaN(state.ownership);
7980
const isValid = allFilled && total === 100;
8081

8182
const saveMutation = useMutation({

0 commit comments

Comments
 (0)