Skip to content

Commit

Permalink
Merge pull request #1183 from p2pu/master
Browse files Browse the repository at this point in the history
Release 2024-09-03
  • Loading branch information
dirkcuys authored Sep 3, 2024
2 parents 42fc731 + a992fef commit 72d1246
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 8 deletions.
4 changes: 2 additions & 2 deletions studygroups/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -330,8 +330,8 @@ def get_top_discourse_topics_and_users(limit=10):
def get_active_teams():
today = datetime.datetime.now()
two_weeks_ago = today - relativedelta(days=+14)
memberships = StudyGroup.objects.published().filter(Q(start_date__gte=today) | Q(start_date__lte=today, end_date__gte=today) | Q(end_date__gt=two_weeks_ago, end_date__lte=today)).values_list('facilitator__teammembership', flat=True)
active_teams = Team.objects.filter(teammembership__in=memberships).distinct()
team_ids = StudyGroup.objects.published().filter(Q(start_date__gte=today) | Q(start_date__lte=today, end_date__gte=today) | Q(end_date__gt=two_weeks_ago, end_date__lte=today)).values_list('team', flat=True)
active_teams = Team.objects.filter(id__in=team_ids).distinct()
return active_teams

def get_active_facilitators():
Expand Down
34 changes: 28 additions & 6 deletions templates/studygroups/staff_dash.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,34 @@ <h3>{% trans "Export" %}</h3>

<h3>{% trans "Links" %}</h3>
<ul>
<li><a href="{% url 'admin:studygroups_course_changelist' %}">{% trans "Courses" %}</a></li>
<li><a href="{% url 'admin:studygroups_studygroup_changelist' %}">{% trans "Learning circles" %}</a></li>
<li><a href="{% url 'studygroups_staff_dash_stats' %}">{% trans "Stats dash" %}</a></li>
<li><a href="https://docs.google.com/spreadsheets/u/1/d/1ESBtei75b-0PjQve_SlOldgd0XMkeJ5IzwmCc3LhPek/edit?pli=1#gid=1050744558">Learning Circle Export</a></li>
<li><a href="https://docs.google.com/spreadsheets/u/1/d/1KPKhNMVXYZw-uloHzLg9DfF_HiP2-tsIVJiEm_Oao0Y/edit?pli=1#gid=1268227564">community metrics</a></li>
<li><a href="https://docs.google.com/spreadsheets/d/1jnvrpQ9dTSQt0iVW_zWGgH8M6UkeopkbcMCPUVXfcw8/edit#gid=1196365954">Membership management</a></li>
<li>
<i class="fas fa-cogs" aria-hidden="true">&nbsp;</i>
<a href="{% url 'admin:studygroups_course_changelist' %}">{% trans "Courses" %}</a>
</li>
<li>
<i class="fas fa-cogs" aria-hidden="true">&nbsp;</i>
<a href="{% url 'admin:studygroups_studygroup_changelist' %}">{% trans "Learning circles" %}</a>
</li>
<li>
<i class="fas fa-chart-line" aria-hidden="true">&nbsp;</i>
<a href="{% url 'studygroups_staff_dash_stats' %}">{% trans "Stats dash" %}</a>
</li>
<li>
<i class="fas fa-list" aria-hidden="true">&nbsp;</i>
<a href="https://docs.google.com/spreadsheets/d/1ESBtei75b-0PjQve_SlOldgd0XMkeJ5IzwmCc3LhPek/edit?pli=1#gid=1050744558">Learning Circle Export</a>
</li>
<li>
<i class="fas fa-list" aria-hidden="true">&nbsp;</i>
<a href="https://docs.google.com/spreadsheets/d/1iXkmcdTzLo2ANJtEvxdpFecJZaLoE4KpGZwRdMn4p4k/edit?gid=1290412180#gid=1290412180">User Export</a>
</li>
<li>
<i class="fas fa-list" aria-hidden="true">&nbsp;</i>
<a href="https://docs.google.com/spreadsheets/d/1KPKhNMVXYZw-uloHzLg9DfF_HiP2-tsIVJiEm_Oao0Y/edit?pli=1#gid=1268227564">community metrics</a>
</li>
<li>
<i class="fas fa-list" aria-hidden="true">&nbsp;</i>
<a href="https://docs.google.com/spreadsheets/d/1jnvrpQ9dTSQt0iVW_zWGgH8M6UkeopkbcMCPUVXfcw8/edit#gid=1196365954">Membership management</a>
</li>

</ul>

Expand Down

0 comments on commit 72d1246

Please sign in to comment.