Feature #11049
closedCourses tab should sort chronologically by term
0%
Description
Secondary sort would be title.
Related issues
Updated by Boone Gorges almost 6 years ago
- Related to Bug #11043: All Group Admins displaying as "instructors" on Courses Tab added
Updated by Boone Gorges almost 6 years ago
- Status changed from New to Staged for Production Release
Fixed in https://github.com/cuny-academic-commons/cac/commit/982e1ac49455d55f24716691857b833259b5eedf https://github.com/cuny-academic-commons/cac-courses/commit/727a2a47523f0a0e7d37f8af04f670ff945554fc
After deployment, I need to run the following script:
<?php global $wpdb; $course_query = new WP_Query( [ 'post_type' => 'cac_course', 'fields' => 'ids', 'posts_per_page' => -1, ] ); $course_ids = $course_query->posts; foreach ( $course_ids as $course_id ) { $course_terms = get_post_meta( $course_id, 'course-terms', true ); CAC\Courses\App::sync_course_term_to_sortable_meta( 0, $course_id, 'course-terms', $course_terms ); }
This may also require a cache flush to take effect.
Updated by Boone Gorges almost 6 years ago
- Status changed from Staged for Production Release to Resolved
This is done.
Updated by Matt Gold over 5 years ago
Hi Boone -- I just looked at the courses tab, and it appears to me that it is sorting alphabetically (and it's not clear whether it is alphabetically by term). Can you please take a look at see whether the fix you added here has stuck? Thank you.
Updated by Boone Gorges over 5 years ago
Seems like it's working properly to me. There are 155 courses with 'Fall 2019' listed as their Academic Term, which is reflected in the fact that the alphabeticization starts again on page 8 (20*8 = 160) https://commons.gc.cuny.edu/courses/page/8/
Updated by Matt Gold over 5 years ago
Oh, WOW -- I just didn't think there would be that many new courses! Awesome. and thanks.