Stud.IP  5.4
SemBrowse Class Reference

Public Member Functions

 __construct ($sem_browse_data_init=[])
 
 show_class ()
 
 get_sem_class ()
 
 get_sem_range ($item_id, $with_kids)
 
 get_sem_range_tree ($item_id, $with_kids)
 
 do_output ()
 
 print_level ($start_id=null)
 
 print_result ()
 
 create_result_xls ($headline='')
 
 get_result ()
 
 getQuickSearchForm ()
 

Static Public Member Functions

static getSearchOptionNavigation ($target, $option_name=null)
 
static transferSessionData ()
 
static getDefaultSemester ()
 
static setClassesSelector ($submit_url)
 
static setSemesterSelector ($submit_url)
 
static getStatusCourseAdmission ($seminar_id, $prelim)
 

Data Fields

 $sem_browse_data
 
 $persistent_fields
 
 $search_obj
 
 $sem_tree
 
 $range_tree
 
 $show_result
 
 $sem_number
 
 $group_by_fields = []
 
 $target_url
 
 $target_id
 
 $classes_show_module
 
 $classes_show_class
 

Constructor & Destructor Documentation

◆ __construct()

__construct (   $sem_browse_data_init = [])

Member Function Documentation

◆ create_result_xls()

create_result_xls (   $headline = '')

◆ do_output()

do_output ( )

◆ get_result()

get_result ( )

◆ get_sem_class()

get_sem_class ( )

◆ get_sem_range()

get_sem_range (   $item_id,
  $with_kids 
)

◆ get_sem_range_tree()

get_sem_range_tree (   $item_id,
  $with_kids 
)

◆ getDefaultSemester()

static getDefaultSemester ( )
static

Retrieves the default semester from session or calculate it considering the value from SEMESTER_TIME_SWITCH.

Returns
Semester The semester object of the default semester.

◆ getQuickSearchForm()

getQuickSearchForm ( )

Returns a Quick Search form to put inside a WidgetElement.

Parameters
string$levelThe Level of search , expected ('f', 'vv', 'ev')
Returns
string $search_form_content Contains a form element with a quick search input, predefined (hidden) inputs and search button

◆ getSearchOptionNavigation()

static getSearchOptionNavigation (   $target,
  $option_name = null 
)
static

Returns a new navigation object corresponding to the given target and name of the option. The target has two possibel values "sidebar" and "course" and indicates the place where the navigation is shown. The option name is the key of an entry in the array with the navigation options.

The navigation options are configured in the global configuration as an array. For further details see documentation of entry COURSE_SEARCH_NAVIGATION_OPTIONS in global configuration.

This is an example with all possible options:

{ // "courses", "semtree" and "rangetree" are the "old" search options. // The link text is fixed. "courses":{ "visible":true, // The target indicates where the link to this search option is // placed. Possible values are "sidebar" for a link in the sidebar // or "courses" to show a link (maybe with picture) below the // "course search". "target":"sidebar" }, "semtree":{ "visible":true, "target":"sidebar" }, "rangetree":{ "visible":false, "target":"sidebar" }, // New option to acivate the search for modules and the systematic // search in studycourses, field of study and degrees. "module":{ "visible":true, "target":"sidebar" }, // This option shows a direct link in the sidebar to an entry (level) // in the range tree. The link text is the name of the level. "fb3_hist":{ "visible":true, "target":"sidebar", "range_tree_id":"d1a07cf0c8057c664279214cc070b580" }, // The same for an entry in the sem tree. "grundstudium":{ "visible":true, "target":"sidebar", "sem_tree_id":"e1a07cf0c8057c664279214cc070b580" }, // This shows a link in the sidebar to the course search. The text is // availlable in two languages. "vvz":{ "visible":true, "target":"sidebar", "url":"dispatch.php/search/courses?level=f&option=vav", "title":{ "de_DE":"Veranstaltungsverzeichnis", "en_GB":"Course Catalogue" } }, // This option uses an url with search option and shows a link in the // sidebar to an entry in the range tree with all courses. "test":{ "visible":true, "target":"sidebar", "url":"dispatch.php/search/courses?start_item_id=d1a07cf0c8057c664279214cc070b580&cmd=show_sem_range_tree&item_id=d1a07cf0c8057c664279214cc070b580_withkids&level=ev", "title":{ "de_DE":"Historisches Institut", "en_GB":"Historical Institute" } }, // This option shows a link to the sem tree with picture below the // course search (target: courses). // This is the behaviour of Stud.IP < 4.2. "csemtree":{ "visible":true, "target":"courses", "url":"dispatch.php/search/courses?level=vv", "img":{ "filename":"directory-search.png", "attributes":{ "size":"260@100" } }, "title":{ "de_DE":"Suche im Vorlesungsverzeichnis", "en_GB":"Search course directory" } }, // This option shows a link to the range tree with picture below the // course search (target: courses). // This is the behaviour of Stud.IP < 4.2. "crangetree":{ "visible":true, "target":"courses", "url":"dispatch.php/search/courses?level=ev", "img":{ "filename":"institute-search.png", "attributes":{ "size":"260@100" } }, "title":{ "de_DE":"Suche in Einrichtungen", "en_GB":"Search institutes" } } }

Parameters
string$target
string$option_name
Returns
Navigation|null

◆ getStatusCourseAdmission()

static getStatusCourseAdmission (   $seminar_id,
  $prelim 
)
static

Returns the admission status for a course.

Parameters
string$seminar_idId of the course
bool$prelimState of preliminary setting
Returns
int

◆ print_level()

print_level (   $start_id = null)

◆ print_result()

print_result ( )

◆ setClassesSelector()

static setClassesSelector (   $submit_url)
static

Adds a widget to the sidebar to select a course class. The result set is filtered by this class.

Parameters
string$submit_urlThe submit url.

◆ setSemesterSelector()

static setSemesterSelector (   $submit_url)
static

Adds a widget to the sidebar to select a semester. The result set is filtered by this semester.

Parameters
string$submit_urlThe submit url.

◆ show_class()

show_class ( )

◆ transferSessionData()

static transferSessionData ( )
static

The class SemBrowse uses a vast number of variables stored in the session. This function sets the default values or transfers some of them to url parameters if a filter in the sidebar has been changed.

See also
SemBrowse::setClassesSelector()
SemBrowse::setSemesterSelector()

Field Documentation

◆ $classes_show_class

$classes_show_class

◆ $classes_show_module

$classes_show_module

◆ $group_by_fields

$group_by_fields = []

◆ $persistent_fields

$persistent_fields
Initial value:
= [
'level', 'cmd', 'start_item_id', 'show_class', 'group_by',
'search_result', 'default_sem', 'sem_status', 'show_entries', 'sset'
]

◆ $range_tree

$range_tree

◆ $search_obj

$search_obj

◆ $sem_browse_data

◆ $sem_number

◆ $sem_tree

$sem_tree

◆ $show_result

$show_result

◆ $target_id

◆ $target_url


The documentation for this class was generated from the following file: