You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I created a number of leaderboards, and assigned test cases to leaderboards. I was writing & testing incrementally, and when I tested a configuration where there was a leaderboard tag (in the "leaderboards" json object) with no assigned test cases (no test case "leaderboard_tags" includes that tag).
When I attempted to view the unused leaderboard, the page gave a frog robot error:
23:56:40 12/09/2024 - FATAL ERROR
app\exceptions\DatabaseException (Code: 0) thrown in /usr/local/submitty/site/app/libraries/database/AbstractDatabase.php (Line 166) by:
throw new DatabaseException($dbalException->getMessage(), $query, $parameters);
Message:
An exception occurred while executing a query: SQLSTATE[42601]: Syntax error: 7 ERROR: syntax error at or near ")"
LINE 25: AND testcase_id in ()
^
Stack Trace:
#0 /usr/local/submitty/site/app/libraries/database/DatabaseQueries.php(9216): app\libraries\database\AbstractDatabase->query()
#1 /usr/local/submitty/site/app/controllers/student/LeaderboardController.php(82): app\libraries\database\DatabaseQueries->getLeaderboard()
#2 unknown file(unknown line): app\controllers\student\LeaderboardController->getLeaderboardData()
#3 /usr/local/submitty/site/app/libraries/routers/WebRouter.php(268): call_user_func_array()
#4 /usr/local/submitty/site/app/libraries/routers/WebRouter.php(246): app\libraries\routers\WebRouter->run()
#5 /usr/local/submitty/site/public/index.php(149): app\libraries\routers\WebRouter::getWebResponse()
Extra Details:
query:
SELECT leaderboard.*,
gradeable_anon.anon_id,
user_group,
anonymous_leaderboard,
Concat(
COALESCE (NULLIF(user_preferred_givenname, ''), user_givenname),
' ',
COALESCE (NULLIF(user_preferred_familyname, ''), user_familyname)
) as name
FROM (
SELECT Round(Cast(Sum(elapsed_time) AS NUMERIC), 1) AS time,
Sum(max_rss_size) AS memory,
metrics.g_id AS gradeable_id,
metrics.user_id AS user_id,
metrics.team_id AS team_id,
Sum(points) AS points
FROM autograding_metrics AS metrics
INNER JOIN electronic_gradeable_version AS version
ON NULLIF(metrics.user_id, '') = NULLIF(version.user_id, '')
AND metrics.g_id = version.g_id
AND metrics.g_version = version.active_version
WHERE metrics.g_id = ?
AND passed = true
AND testcase_id in ()
-- When true, this statement is always true, and so the value in the hidden column is ignored
-- When false, hidden values are left out of the query
AND (
hidden = false
OR hidden = ?)
GROUP BY metrics.user_id,
metrics.team_id,
metrics.g_id
) AS leaderboard
LEFT JOIN users
ON leaderboard.user_id = users.user_id
LEFT JOIN gradeable_anon
ON leaderboard.user_id = gradeable_anon.user_id AND leaderboard.gradeable_id = gradeable_anon.g_id
LEFT JOIN electronic_gradeable_version
ON leaderboard.gradeable_id = electronic_gradeable_version.g_id
AND leaderboard.user_id = electronic_gradeable_version.user_id
ORDER BY
points DESC,
time,
memory
parameters:
REDACTED
true
URL: https://submitty.cs.rpi.edu//courses/f24/REDACTED/gradeable/REDACTED/leaderboard_data/all_solutions
The text was updated successfully, but these errors were encountered:
Describe the bug
I was preparing a gradeable with the leaderboard feature.
e.g.,
https://github.com/Submitty/Submitty/blob/main/more_autograding_examples/leaderboard/config/config.json
and on the developement machine:
http://localhost:1511/courses/f24/sample/gradeable/leaderboard
I created a number of leaderboards, and assigned test cases to leaderboards. I was writing & testing incrementally, and when I tested a configuration where there was a leaderboard tag (in the "leaderboards" json object) with no assigned test cases (no test case "leaderboard_tags" includes that tag).
When I attempted to view the unused leaderboard, the page gave a frog robot error:
The text was updated successfully, but these errors were encountered: