Skip to content

Commit

Permalink
fix: consistently apply datetime filter on problem engagement tab
Browse files Browse the repository at this point in the history
  • Loading branch information
SoryRawyer committed Oct 16, 2023
1 parent 1d36391 commit 83dd43e
Showing 1 changed file with 17 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,15 @@ WITH problem_responses AS (
0 AS num_hints_displayed,
0 AS num_answers_displayed
FROM int_problem_results
WHERE 1=1
{% raw %}
{% if from_dttm is not none %}
and emission_time > '{{ from_dttm }}'
{% endif %}
{% if to_dttm is not none %}
and emission_time < '{{ to_dttm }}'
{% endif %}
{% endraw %}
UNION ALL
SELECT
org,
Expand All @@ -96,6 +105,14 @@ WITH problem_responses AS (
caseWithExpression(help_type, 'answer', 1, 0) AS num_answers_displayed
FROM {{ DBT_PROFILE_TARGET_DATABASE }}.int_problem_hints
WHERE 1=1
{% raw %}
{% if from_dttm is not none %}
and emission_time > '{{ from_dttm }}'
{% endif %}
{% if to_dttm is not none %}
and emission_time < '{{ to_dttm }}'
{% endif %}
{% endraw %}
{% include 'openedx-assets/queries/common_filters.sql' %}
)

Expand Down

0 comments on commit 83dd43e

Please sign in to comment.