Show archived courses in a separate list in Studio

86 views
Skip to first unread message

ji...@opencraft.com

unread,
Jun 26, 2017, 8:40:35 AM6/26/17
to General Open edX discussion, chri...@edx.org, she...@edx.org, oc...@edx.org
Hello!

We're working on a contribution to split the courses displayed in Studio into two parts: the main list of "active" courses, and the "archived" courses, below.
  • An "archived" course has_ended(), same as with the learner dashboard.
  • The "archived" course list would be collapsed on page load, and lazy loaded on demand, via AJAX.
  • This feature would sit behind a Waffle switch.
Christina and Shelby - I've CC'd you directly because of your recent work on the Studio course/library list page, but everyone's advice is welcome.

Does this approach sound reasonable?  Any concerns or changes?

Thank you!
--
Jill

Christina Roberts

unread,
Jun 26, 2017, 9:06:51 AM6/26/17
to ji...@opencraft.com, General Open edX discussion, Shelby Stack, oc...@edx.org
This sounds good to me, though I would also suggest that you look into what can be done with the libraries. Right now they are all also loaded whenever the page renders. It would be awesome if they didn't load until one clicks on the "libraries" tab.

-Christina

Jill Vogel

unread,
Jun 26, 2017, 9:42:37 AM6/26/17
to Christina Roberts, General Open edX discussion, Shelby Stack, os...@edx.org
This sounds good to me, though I would also suggest that you look into what can be done with the libraries. Right now they are all also loaded whenever the page renders. It would be awesome if they didn't load until one clicks on the "libraries" tab.

 That expands the scope of the change beyond what we'd planned, since our client doesn't use the libraries. But it will provide a good example of how to asynchronously load content on the Studio home page.  

Is that ok?

--
Jill

Jill Vogel

unread,
Jun 26, 2017, 10:15:59 AM6/26/17
to Shelby Stack, Andy Armstrong, Christina Roberts, General Open edX discussion, os...@edx.org
Hi Shelby :)

Excited that you guys are working on this! I'm not sure if this adds much scope, but ultimately, it would be great if the Studio page listing mimicked Insights - where you can search and filter based on availability & pacing, etc.  

That's a great idea!

Andy - does it make sense to use the Course Search feature in Studio?  Does the Course Search interface support filtering courses on Availability status like we do in Insights with the Analytics API?  Can you see any issues with this approach?

Shelby - If we can use the existing Course Search, and limit this change to just adding keyword search and the "Availability" filter, then the scope isn't too stretched.  The form could fit in the right-hand column, above the "New to Studio" intro text.  Would that be ok with you?

Cheers,
--

Jill Vogel

unread,
Jun 26, 2017, 1:29:00 PM6/26/17
to Andy Armstrong, Shelby Stack, Christina Roberts, Open Source Community Managers, General Open edX discussion
Thanks Andy, sorry to rush you!  But thank you for your quick response, it's very helpful.

My initial reaction is that I don't think it will help. There is searching across courses using course metadata that is implemented on our marketing site, and then there is searching through course content which is available within a course. The former is implemented in the edx-mktg repo so probably can't be reused, and the latter is in edx-platform but I don't think does what you are looking for.

What I like about using edx-search (instead of, say, course-discovery) is I can use it without adding any dependencies to Studio.  And since Studio triggers reindexing, and there's already flags to enable/disable it.  

I agree that the free text search isn't as useful, since it queries the whole course content.  But it also queries the title, which is what we need.

Also, since edx-search uses an ElasticSearch index, it's far more flexible than the Courses API -- I'd struggle to implement the Availability filter there using data transformers, since it's dependent on start/end dates, so the availability status changes as time ticks along.  With edx-search, I can just specify a custom SEARCH_FILTER_GENERATOR subclass, and implement the availability query there.

In short, I can't think of a better or more flexible solution..  but am totally open to suggestions.

Cheers,
--
Jill

ji...@opencraft.com

unread,
Jun 27, 2017, 2:00:27 AM6/27/17
to General Open edX discussion
In my excitement to use proper search filtering, I think I'm getting off track of the original issue..  Sorry about that!

There's a few fundamental things that need to remain true with the implementation:
  1. The main Course list on the Studio home page needs to be in sync with the contentstore.
    How do we keep from introducing cache syncing issues that would disrupt what Course Authors can see in the main list?

  2. Our client wants the Archived (i.e., past end date) courses to be excluded from this main list.
    Can this be achieved by excluding courses where has_ended() == True, like we currently do with in-progress courses?

  3. Archived courses should still be accessible from the Studio home page, so they can be re-run and referenced.
    What's the best way to represent this in the GUI?

  4. Loading the list of Archived courses on demand requires an asynchronous endpoint to be added to Studio.
    What's the best way to implement this asynchronous endpoint?
    Can I just add a /search url to Studio which reference edx-search's search.urls like the LMS does, and just use the existing  /search/course_discovery endpoint?  It looks like it could be expanded to filter by the Availability property that already exists in the course metadata.
    Does this mean I can do it without actually running the course-discovery service? 
Any advice you can offer is welcome!

--
Jill

Jill Vogel

unread,
Jun 29, 2017, 10:02:48 PM6/29/17
to General Open edX discussion
Hiya,

I found that because Studio fetches the course list from the modulestore, there was no good way to filter out archived courses, and so there wasn't any performance advantage to serving the archived courses asynchronously.

Sorry for getting everyone's hopes up about asynchronous course and library listings :(

TL;DR In all but the first use case listed below, all courses that the user has access to are fetched from the modulestore, and we can't efficiently query mongo with a date range.
The upshot is, I decided to just synchronously split the courses into two lists -- Courses, and Archived Courses -- and simply render them to the template.


Cheers,
 --
Jill

--
Jill

--
You received this message because you are subscribed to the Google Groups "General Open edX discussion" group.
To view this discussion on the web visit https://groups.google.com/d/msgid/edx-code/ee46d6cf-b4b7-4fd7-a159-2522c6991adf%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages