Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: consistently apply datetime filter on problem engagement tab (FC-0033) #473

Merged
merged 1 commit into from
Oct 16, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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