Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Extended the search for lectures too. Switched to the core

  • Loading branch information...
commit 73fb5ec558a181a7fa722837c7a23251ac207e11 1 parent b2b95a2
@stas stas authored
View
4 assignments/assignments.class.php
@@ -64,7 +64,7 @@ function register_post_types() {
'description' => __( 'BuddyPress ScholarPress Courseware Assignments', 'bpsp' ),
'public' => BPSP_DEBUG,
'publicly_queryable' => false,
- 'exclude_from_search' => false,
+ 'exclude_from_search' => true,
'show_ui' => BPSP_DEBUG,
'capability_type' => 'assignment',
'hierarchical' => false,
@@ -675,4 +675,4 @@ function load_editor() {
wp_enqueue_style( 'datetimepicker' );
}
}
-?>
+?>
View
4 bibliography/bibliography.class.php
@@ -60,7 +60,7 @@ function register_post_types() {
'description' => __( 'BuddyPress ScholarPress Courseware Bibliography', 'bpsp' ),
'public' => BPSP_DEBUG,
'publicly_queryable' => false,
- 'exclude_from_search' => false,
+ 'exclude_from_search' => true,
'show_ui' => BPSP_DEBUG,
'capability_type' => 'bib',
'hierarchical' => false,
@@ -827,4 +827,4 @@ function add_www( $entry, $post_id = null ) {
return false;
}
}
-?>
+?>
View
2  courses/courses.class.php
@@ -49,7 +49,7 @@ function register_post_types() {
'description' => __( 'BuddyPress ScholarPress Courseware Courses', 'bpsp' ),
'public' => BPSP_DEBUG,
'publicly_queryable' => false,
- 'exclude_from_search' => false,
+ 'exclude_from_search' => true,
'show_ui' => BPSP_DEBUG,
'capability_type' => 'course',
'hierarchical' => false,
View
2  gradebook/gradebook.class.php
@@ -48,7 +48,7 @@ function register_post_types() {
'description' => __( 'BuddyPress ScholarPress Courseware Gradebook', 'bpsp' ),
'public' => BPSP_DEBUG,
'publicly_queryable' => false,
- 'exclude_from_search' => false,
+ 'exclude_from_search' => true,
'show_ui' => BPSP_DEBUG,
'capability_type' => 'gradebook',
'hierarchical' => false,
View
22 groups/groups.class.php
@@ -210,18 +210,18 @@ function extend_search( $groups, $params ) {
$all_groups = groups_get_groups( array( 'type' => 'alphabetical' ) );
foreach( $all_groups['groups'] as $group ) {
// Search posts from current $group
- $results = BPSP_WordPress::get_posts(
+ $results = get_posts(
array(
- 'group_id' => $group->id
- ),
- array(
- 'assignment',
- 'course',
- 'schedule',
- ),
- $params['search_terms']
+ 'group_id' => $group->id,
+ 'post_type' => array(
+ 'assignment',
+ 'course',
+ 'schedule',
+ 'lecture'
+ ),
+ 's' => $params['search_terms']
+ )
);
-
// Merge posts to $groups if new found
if( !empty( $results ) ) {
if( !in_array( $group, $groups['groups'] ) ) {
@@ -326,4 +326,4 @@ function bpsp_media_library_tab( $action_url ) {
return $action_url;
}
}
-?>
+?>
View
2  lectures/lectures.class.php
@@ -50,7 +50,7 @@ function register_post_types() {
'description' => __( 'BuddyPress ScholarPress Courseware Lectures', 'bpsp' ),
'public' => BPSP_DEBUG,
'publicly_queryable' => false,
- 'exclude_from_search' => false,
+ 'exclude_from_search' => true,
'show_ui' => BPSP_DEBUG,
'capability_type' => 'lecture',
'hierarchical' => true,
View
2  responses/responses.class.php
@@ -61,7 +61,7 @@ function register_post_types() {
'description' => __( 'BuddyPress ScholarPress Courseware Responses', 'bpsp' ),
'public' => BPSP_DEBUG,
'publicly_queryable' => false,
- 'exclude_from_search' => false,
+ 'exclude_from_search' => true,
'show_ui' => BPSP_DEBUG,
'capability_type' => 'response',
'hierarchical' => false,
View
4 schedules/schedules.class.php
@@ -52,7 +52,7 @@ function register_post_types() {
'description' => __( 'BuddyPress ScholarPress Courseware Schedules', 'bpsp' ),
'public' => BPSP_DEBUG,
'publicly_queryable' => false,
- 'exclude_from_search' => false,
+ 'exclude_from_search' => true,
'show_ui' => BPSP_DEBUG,
'capability_type' => 'schedule',
'hierarchical' => false,
@@ -717,4 +717,4 @@ function toICS() {
die( $cal->returnCalendar() );
}
}
-?>
+?>
Please sign in to comment.
Something went wrong with that request. Please try again.