diff --git a/queries/get_practice_problems b/queries/get_practice_problems index 346f23295..01e3feaf2 100644 --- a/queries/get_practice_problems +++ b/queries/get_practice_problems @@ -16,7 +16,7 @@ SELECT WHEN (p.problem_type_id = 1 AND p.proposed_difficulty_id = 3) THEN 'Hard'::nvarchar(50) END AS difficulty , rc.points -, CASE WHEN EXISTS ( +, NVL(CASE WHEN EXISTS ( SELECT 1 FROM component_state cs WHERE cs.status_id < 120 @@ -57,7 +57,7 @@ SELECT AND pcs.status_id != 150 AND pcs.coder_id = @userId@ ) THEN 'Viewed'::nvarchar(50) - END AS status + END, 'New') AS status , NVL(( SELECT points diff --git a/queries/get_practice_problems_count b/queries/get_practice_problems_count index 67f905441..b447e2ea7 100644 --- a/queries/get_practice_problems_count +++ b/queries/get_practice_problems_count @@ -13,7 +13,7 @@ SELECT WHEN (p.problem_type_id = 1 AND p.proposed_difficulty_id = 3) THEN 'Hard'::nvarchar(50) END AS difficulty , rc.points -, CASE WHEN EXISTS ( +, NVL(CASE WHEN EXISTS ( SELECT 1 FROM component_state cs WHERE cs.status_id < 120 @@ -54,7 +54,7 @@ SELECT AND pcs.status_id != 150 AND pcs.coder_id = @userId@ ) THEN 'Viewed'::nvarchar(50) - END AS status + END, 'New') AS status , NVL(( SELECT points