1 PACKAGE igs_as_derive_grade AUTHID CURRENT_USER AS
2 /* $Header: IGSAS59S.pls 115.1 2004/01/29 12:26:32 kdande noship $ */
3 --
4 -- Procedure to validate the Assessment Item and Unit Section Grading Schema's
5 -- mark range and return an error message in case mark range has null values
6 -- or gaps
7 --
8 PROCEDURE validate_ai_us_grd_mark_range (
9 p_person_id IN NUMBER,
10 p_course_cd IN VARCHAR2,
11 p_uoo_id IN NUMBER,
12 p_unit_cd IN VARCHAR2,
13 p_usec_grading_schema IN VARCHAR2,
14 p_usec_grading_schema_version IN NUMBER,
15 p_validate_ai_grd_schema IN VARCHAR2 DEFAULT 'Y',
16 p_message_name OUT NOCOPY VARCHAR2
17 );
18 --
19 -- Procedure to derive the Student Unit Attempt Outcome Mark and Grade from
20 -- Student Unit Attempt Assessment Item Outcome
21 --
22 PROCEDURE derive_suao_mark_grade_suaio (
23 p_person_id IN NUMBER,
24 p_course_cd IN VARCHAR2,
25 p_uoo_id IN NUMBER,
26 p_grading_period_cd IN VARCHAR2,
27 p_reset_mark_grade IN VARCHAR2 DEFAULT 'N',
28 p_mark OUT NOCOPY NUMBER,
29 p_grade OUT NOCOPY VARCHAR2,
30 p_message_name OUT NOCOPY VARCHAR2
31 );
32 --
33 -- Function to derive the Student Unit Attempt Outcome Mark from Student Unit
34 -- Attempt Assessment Item Outcome
35 --
36 -- This function is a overloaded so that it can be called from SQL and PL/SQL
37 -- or Java separately so that the error message can be shown to the user in
38 -- case of PL/SQL or Java
39 --
40 FUNCTION derive_suao_mark_from_suaio (
41 p_person_id IN NUMBER,
42 p_course_cd IN VARCHAR2,
43 p_uoo_id IN NUMBER,
44 p_grading_period_cd IN VARCHAR2,
45 p_reset_mark_grade IN VARCHAR2 DEFAULT 'N',
46 p_message_name OUT NOCOPY VARCHAR2
47 ) RETURN NUMBER;
48 --
49 -- Function to derive the Student Unit Attempt Outcome Mark from Student Unit
50 -- Attempt Assessment Item Outcome
51 --
52 FUNCTION derive_suao_mark_from_suaio (
53 p_person_id IN NUMBER,
54 p_course_cd IN VARCHAR2,
55 p_uoo_id IN NUMBER,
56 p_grading_period_cd IN VARCHAR2,
57 p_reset_mark_grade IN VARCHAR2 DEFAULT 'N'
58 ) RETURN NUMBER;
59 --
60 -- Function to check 'Derive Unit Mark from Assessment Item Mark' and if the
61 -- Unit Section is not Submitted then derive the Student Unit Attempt Outcome
62 -- Mark from Student Unit Attempt Assessment Item Outcome Marks if the Outcome
63 -- is neither Finalized nor Manually Overridden. If the Mark and Grade are not
64 -- to be derived then the passed on mark and grade will be returned back.
65 --
66 FUNCTION derive_suao_mark_from_suaio (
67 p_person_id IN NUMBER,
68 p_course_cd IN VARCHAR2,
69 p_uoo_id IN NUMBER,
70 p_grading_period_cd IN VARCHAR2,
71 p_mark IN NUMBER,
72 p_grade IN VARCHAR2,
73 p_reset_mark_grade IN VARCHAR2 DEFAULT 'N'
74 ) RETURN NUMBER;
75 --
76 -- Function to derive the Student Unit Attempt Outcome Grade from Student Unit
77 -- Attempt Assessment Item Outcome
78 --
79 -- This function is a overloaded so that it can be called from SQL and PL/SQL
80 -- or Java separately so that the error message can be shown to the user in
81 -- case of PL/SQL or Java
82 --
83 FUNCTION derive_suao_grade_from_suaio (
84 p_person_id IN NUMBER,
85 p_course_cd IN VARCHAR2,
86 p_uoo_id IN NUMBER,
87 p_grading_period_cd IN VARCHAR2,
88 p_reset_mark_grade IN VARCHAR2 DEFAULT 'N',
89 p_message_name OUT NOCOPY VARCHAR2
90 ) RETURN VARCHAR2;
91 --
92 -- Function to derive the Student Unit Attempt Outcome Grade from Student Unit
93 -- Attempt Assessment Item Outcome
94 --
95 FUNCTION derive_suao_grade_from_suaio (
96 p_person_id IN NUMBER,
97 p_course_cd IN VARCHAR2,
98 p_uoo_id IN NUMBER,
99 p_grading_period_cd IN VARCHAR2,
100 p_reset_mark_grade IN VARCHAR2 DEFAULT 'N'
101 ) RETURN VARCHAR2;
102 --
103 -- Function to check 'Derive Unit Mark from Assessment Item Mark' and if the
104 -- Unit Section is not Submitted then derive the Student Unit Attempt Outcome
105 -- Grade from Student Unit Attempt Assessment Item Outcome Marks if the Outcome
106 -- is neither Finalized nor Manually Overridden. If the Mark and Grade are not
107 -- to be derived then the passed on mark and grade will be returned back.
108 --
109 FUNCTION derive_suao_grade_from_suaio (
110 p_person_id IN NUMBER,
111 p_course_cd IN VARCHAR2,
112 p_uoo_id IN NUMBER,
113 p_grading_period_cd IN VARCHAR2,
114 p_mark IN NUMBER,
115 p_grade IN VARCHAR2,
116 p_reset_mark_grade IN VARCHAR2 DEFAULT 'N'
117 ) RETURN VARCHAR2;
118 --
119 -- Function to derive Student's Assessment Status
120 --
121 -- 1st time the student enrolls in unit; Assessment Status = 'First Attempt'
122 -- 2nd time the student enrolls in unit section; Assessment Status =
123 -- 'Second Attempt', so and so forth
124 --
125 FUNCTION get_assessment_status (
126 p_person_id IN NUMBER,
127 p_course_cd IN VARCHAR2,
128 p_uoo_id IN NUMBER,
129 p_unit_cd IN VARCHAR2
130 ) RETURN VARCHAR2;
131 --
132 -- Function that derives the Grading Period for a given Teaching Calendar
133 --
134 FUNCTION get_grading_period_code (
135 p_teach_cal_type IN VARCHAR2,
136 p_teach_ci_sequence_number IN NUMBER
137 ) RETURN VARCHAR2;
138 END igs_as_derive_grade;