settings: add coefficient to hint and wchoices
This commit is contained in:
parent
2623d9dd61
commit
c5f8288f39
10 changed files with 43 additions and 13 deletions
|
|
@ -30,8 +30,8 @@ func exoptsQuery(whereExo string) string {
|
|||
|
||||
func teamptsQuery() string {
|
||||
return exoptsQuery("") + ` UNION ALL
|
||||
SELECT D.id_team, D.time, H.cost AS points, -1.0 AS coeff, "Hint" AS reason, H.id_exercice FROM team_hints D INNER JOIN exercice_hints H ON H.id_hint = D.id_hint HAVING points != 0 UNION ALL
|
||||
SELECT W.id_team, W.time, F.choices_cost AS points, -1.0 AS coeff, "Display choices" AS reason, F.id_exercice FROM team_wchoices W INNER JOIN exercice_flags F ON F.id_flag = W.id_flag HAVING points != 0`
|
||||
SELECT D.id_team, D.time, H.cost AS points, D.coefficient * -1 AS coeff, "Hint" AS reason, H.id_exercice FROM team_hints D INNER JOIN exercice_hints H ON H.id_hint = D.id_hint HAVING points != 0 UNION ALL
|
||||
SELECT W.id_team, W.time, F.choices_cost AS points, W.coefficient * -1 AS coeff, "Display choices" AS reason, F.id_exercice FROM team_wchoices W INNER JOIN exercice_flags F ON F.id_flag = W.id_flag HAVING points != 0`
|
||||
}
|
||||
|
||||
func rankQuery(whereTeam string) string {
|
||||
|
|
|
|||
Reference in a new issue