UFN_FACULTY_ISTEACHINGSTUDENT
Indicates whether the specified faculty teaches the specified student in a timeframe encompassing the given date.
Return
Return Type |
---|
bit |
Parameters
Parameter | Parameter Type | Mode | Description |
---|---|---|---|
@FACULTYID | uniqueidentifier | IN | |
@STUDENTID | uniqueidentifier | IN | |
@SPECIFIEDDATE | date | IN |
Definition
Copy
create function dbo.UFN_FACULTY_ISTEACHINGSTUDENT
(
@FACULTYID uniqueidentifier,
@STUDENTID uniqueidentifier,
@SPECIFIEDDATE date = null
)
returns bit as
/*
SpecifiedDate can be left as null to check if the Faculty taught the student ever.
Also used by functions in the Blackbaud.AppFx.Security.Catalog.FacultyStudentRecordSecurityService.
So we don't have the exact same sql copied in two places, this uses UFN_SECURITY_FACULTY_GRANTED_STUDENTS
with parameters so only the pertinent parts of that sql run.
*/
begin
--UFN_SECURITY_FACULTY_GRANTED_STUDENTS(FacultyID, Date, IncludeAdvisees, IncludeStudentsInClasses)
if exists (select 1
from dbo.UFN_SECURITY_FACULTY_GRANTED_STUDENTS(@FACULTYID, @SPECIFIEDDATE, 0, 1)
where ID = @STUDENTID)
return 1;
return 0;
end