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

search bar #6

Closed
wants to merge 64 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
60b94c0
course discovery
qwqtw Nov 14, 2023
42d65a0
Update courses.html
qwqtw Nov 14, 2023
e44a35f
Revert "Update courses.html"
qwqtw Nov 14, 2023
a1232fa
Update courses.html
qwqtw Nov 14, 2023
4c0bf98
Update courses.html
qwqtw Nov 14, 2023
f784b9c
Update courses.html
qwqtw Nov 15, 2023
c6bff93
Update courses.html
qwqtw Nov 15, 2023
f123916
Update courses.html
qwqtw Nov 15, 2023
28a6fdd
Create filter_icon.png
qwqtw Nov 15, 2023
b2e8c80
Create magnifier.png
qwqtw Nov 15, 2023
0e65285
Update courses.html
qwqtw Nov 15, 2023
46fe564
Create filter_icon.png
qwqtw Nov 15, 2023
cb215fe
Create magnifier.png
qwqtw Nov 15, 2023
6673200
Update courses.html
qwqtw Nov 15, 2023
cbc0821
Merge branch 'qwqw3' of https://github.com/EduTrigger/edx-platform in…
qwqtw Nov 15, 2023
a469976
Update views.py
qwqtw Nov 15, 2023
68507d4
Update devstack.py
qwqtw Nov 15, 2023
7f68173
Update courses.html
qwqtw Nov 15, 2023
e390921
Revert "Update devstack.py"
qwqtw Nov 15, 2023
3cd5927
Revert "Revert "Update devstack.py""
qwqtw Nov 15, 2023
aa01fc0
Revert "Update courses.html"
qwqtw Nov 15, 2023
f93092b
Update courses.html
qwqtw Nov 15, 2023
c841106
Revert "Update courses.html"
qwqtw Nov 15, 2023
0a8fc3b
Update courses.html
qwqtw Nov 15, 2023
5a1e3ff
Update courses.html
qwqtw Nov 16, 2023
f42fdfc
Update courses.html
qwqtw Nov 16, 2023
000fd5f
Update courses.html
qwqtw Nov 16, 2023
22edf38
Update search_form.js
qwqtw Nov 16, 2023
4453a69
Revert "Update search_form.js"
qwqtw Nov 16, 2023
40f4f13
Update discovery_factory.js
qwqtw Nov 16, 2023
f866cc6
Update courses.html
qwqtw Nov 16, 2023
a0968e8
Revert "Update discovery_factory.js"
qwqtw Nov 16, 2023
fadd4c6
Revert "Update courses.html"
qwqtw Nov 16, 2023
f5f067e
Update discovery_factory.js
qwqtw Nov 18, 2023
4a0cae0
Update search_form.js
qwqtw Nov 18, 2023
f640ee3
Update search_form.js
qwqtw Nov 18, 2023
0f671dc
Update discovery_factory.js
qwqtw Nov 18, 2023
732de87
Update search_form.js
qwqtw Nov 18, 2023
3354c5a
Update courses.html
qwqtw Nov 18, 2023
9f8eef1
Create 0012_auto_20231118_2333.py
qwqtw Nov 19, 2023
c907e85
Update discovery_factory.js
qwqtw Nov 19, 2023
e0699cf
Update courses.html
qwqtw Nov 19, 2023
119d9f3
Update courses.html
qwqtw Nov 20, 2023
6cad67f
Update courses.html
qwqtw Nov 20, 2023
c82f876
Update devstack.py
qwqtw Nov 20, 2023
84f9d1b
Update courses.html
qwqtw Nov 20, 2023
f6c6530
Update courses.html
qwqtw Nov 21, 2023
bdacdd1
Update search_form.js
qwqtw Nov 21, 2023
c38cde4
Update courses.html
qwqtw Nov 21, 2023
4381502
Update discovery_factory.js
qwqtw Nov 21, 2023
9c744f2
Update search_form.js
qwqtw Nov 21, 2023
fd46d57
Update search_form.js
qwqtw Nov 21, 2023
c18ee72
Update courses.html
qwqtw Nov 21, 2023
e520085
Update courses.html
qwqtw Nov 21, 2023
934c608
Update filter_bar.js
qwqtw Nov 21, 2023
3c78623
Update courses.html
qwqtw Nov 21, 2023
67f62be
Update discovery_factory.js
qwqtw Nov 22, 2023
e3fef26
Revert "Update discovery_factory.js"
qwqtw Nov 22, 2023
fac2ac8
Update filter_bar.js
qwqtw Nov 22, 2023
4251fc9
Update search_form.js
qwqtw Nov 22, 2023
b446515
Revert "Update search_form.js"
qwqtw Nov 22, 2023
04c407c
Update courses.html
qwqtw Nov 22, 2023
d16697d
Update courses.html
qwqtw Nov 22, 2023
04c5005
Update courses.html
qwqtw Nov 22, 2023
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
@@ -0,0 +1,35 @@
# Generated by Django 3.2.20 on 2023-11-18 23:33

from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

dependencies = [
('sites', '0002_alter_domain_unique'),
('third_party_auth', '0011_applemigrationuseridinfo'),
]

operations = [
migrations.AlterField(
model_name='ltiproviderconfig',
name='site',
field=models.ForeignKey(default=2, help_text='The Site that this provider configuration belongs to.', on_delete=django.db.models.deletion.CASCADE, related_name='ltiproviderconfigs', to='sites.site'),
),
migrations.AlterField(
model_name='oauth2providerconfig',
name='site',
field=models.ForeignKey(default=2, help_text='The Site that this provider configuration belongs to.', on_delete=django.db.models.deletion.CASCADE, related_name='oauth2providerconfigs', to='sites.site'),
),
migrations.AlterField(
model_name='samlconfiguration',
name='site',
field=models.ForeignKey(default=2, help_text='The Site that this SAML configuration belongs to.', on_delete=django.db.models.deletion.CASCADE, related_name='samlconfigurations', to='sites.site'),
),
migrations.AlterField(
model_name='samlproviderconfig',
name='site',
field=models.ForeignKey(default=2, help_text='The Site that this provider configuration belongs to.', on_delete=django.db.models.deletion.CASCADE, related_name='samlproviderconfigs', to='sites.site'),
),
]
13 changes: 6 additions & 7 deletions lms/djangoapps/courseware/views/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,14 +276,13 @@ def courses(request):
"""
courses_list = []
course_discovery_meanings = getattr(settings, 'COURSE_DISCOVERY_MEANINGS', {})
if not settings.FEATURES.get('ENABLE_COURSE_DISCOVERY'):
courses_list = get_courses(request.user)
courses_list = get_courses(request.user)

if configuration_helpers.get_value("ENABLE_COURSE_SORTING_BY_START_DATE",
settings.FEATURES["ENABLE_COURSE_SORTING_BY_START_DATE"]):
courses_list = sort_by_start_date(courses_list)
else:
courses_list = sort_by_announcement(courses_list)
if configuration_helpers.get_value("ENABLE_COURSE_SORTING_BY_START_DATE",
settings.FEATURES["ENABLE_COURSE_SORTING_BY_START_DATE"]):
courses_list = sort_by_start_date(courses_list)
else:
courses_list = sort_by_announcement(courses_list)

# Add marketable programs to the context.
programs_list = get_programs_with_type(request.site, include_hidden=False)
Expand Down
7 changes: 6 additions & 1 deletion lms/envs/devstack.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,12 +198,17 @@ def should_show_debug_toolbar(request): # lint-amnesty, pylint: disable=missing
'language': LANGUAGE_MAP,
}

FEATURES['ENABLE_COURSE_DISCOVERY'] = False
FEATURES['ENABLE_COURSE_DISCOVERY'] = True
# Setting for overriding default filtering facets for Course discovery
# COURSE_DISCOVERY_FILTERS = ["org", "language", "modes"]
FEATURES['COURSES_ARE_BROWSEABLE'] = True
HOMEPAGE_COURSE_MAX = 9

FEATURES['ENABLE_FILTER'] = False
# Toggle for the "filter" feature of the search bar
FEATURES['ENABLE_SORTBY'] = False
# Toggle for the "sort by" feature of the search bar

# Software secure fake page feature flag
FEATURES['ENABLE_SOFTWARE_SECURE_FAKE'] = True

Expand Down
Binary file added lms/static/images/filter_icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added lms/static/images/magnifier.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion lms/static/js/discovery/discovery_factory.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@

dispatcher.listenTo(search, 'search', function(query, total) {
if (total > 0) {
form.showFoundMessage(total);
form.showFoundMessage(total, query);
if (query) {
filters.add(
{type: 'search_query', query: query, name: quote(query)},
Expand Down
3 changes: 3 additions & 0 deletions lms/static/js/discovery/views/search_form.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@

submitForm: function(event) {
event.preventDefault();
var query = this.$searchField.val();
$('#search-query-display').text('Search Query: ' + query);
this.doSearch();
},

Expand All @@ -42,6 +44,7 @@
this.$loadingIndicator.addClass('hidden');
},


showFoundMessage: function(count) {
var msg = ngettext(
'Viewing %s course',
Expand Down
Loading
Loading