Skip to content
Snippets Groups Projects
Commit b2fecf6f authored by Anton Bagliy's avatar Anton Bagliy
Browse files

ADD: exam type in dean's discipline list #595

parent d948fa59
Branches
No related merge requests found
DROP FUNCTION IF EXISTS public.disciplinecollection_get(psemesterid integer, pfacultyid integer, pgradenum integer, pdegree bachelor_master_specialist);
CREATE OR REPLACE FUNCTION public.disciplinecollection_get(psemesterid integer, pfacultyid integer, pgradenum integer DEFAULT NULL::integer, pdegree bachelor_master_specialist DEFAULT NULL::bachelor_master_specialist)
RETURNS TABLE("ID" integer, "SubjectName" character varying, "AuthorID" integer, "ExamType" exam_credit_grading_credit, "State" text, "IsInactive" boolean, "IsGlobalStub" boolean, "PlanExternalID" integer, "GlobalName" character varying)
LANGUAGE plpgsql
AS $function$
-- select public.discipline_getwithfullness(
-- :psemesterid, -- put the psemesterid parameter value instead of 'psemesterid' (int4)
-- :pfacultyid -- put the pfacultyid parameter value instead of 'pfacultyid' (int4)
-- );
BEGIN
return query
SELECT view_disciplines.DisciplineID AS ID,
view_disciplines.SubjectName As SubjectName,
view_disciplines.AuthorID As AuthorID,
view_disciplines.ExamType As ExamType,
CASE
WHEN (view_disciplines.MaxRate < 100 AND view_disciplines.IsLocked = 0) THEN 'no_map'
WHEN (view_disciplines.MaxRate = 100 AND view_disciplines.IsLocked = 0) THEN 'no_rates'
WHEN (view_disciplines.MaxRate = 100 AND view_disciplines.IsLocked = 1) THEN 'in_progress'
ELSE 'other'
END AS State,
disciplines.IsInactive as IsInactive,
disciplines.IsGlobalStub as IsGlobalStub,
view_disciplines.planexternalid,
view_disciplines.globalname as GlobalName
FROM view_disciplines
JOIN disciplines ON view_disciplines.disciplineid = disciplines.id
WHERE view_disciplines.SemesterID = pSemesterID AND
view_disciplines.FacultyID = pFacultyID AND
(view_disciplines.GradeNum = pgradenum or ((public.view_disciplines.GradeNum = pgradenum)is unknown)) AND
(view_disciplines.Degree = pdegree or ((public.view_disciplines.Degree = pdegree)is unknown));
END
$function$;
......@@ -50,6 +50,9 @@ $(() => {
sorter: "text"
},
4: {
sorter: "text"
},
5: {
sorter: "number"
}
},
......@@ -72,6 +75,7 @@ $(() => {
"DisciplineID",
"DisciplineName",
"DisciplineAuthor",
"ExamType",
"IsActive",
"PlanExternalID"
],
......
......@@ -27,13 +27,14 @@
<table id="disciplineTable" class="tablesorter" style="table-layout: fixed; width: 100%;">
<thead>
<tr>
<td style="width: 70px;"></td>
<td>Название</td>
<td style="width: 250px;">Автор</td>
<td style="width: 100px;"></td>
<td style="width: 400px;">Название </td>
<td style="width: 200px;">Автор</td>
<td style="width: 150px;">Тип контроля </td>
{% if InMainList %}
<td style="width: 100px;">вкл./выкл.</td>
<td style="width: 200px;">вкл./выкл.</td>
{% endif %}
<td style="width: 250px;">Рабочий план</td>
<td style="width: 150px;">Рабочий план</td>
</tr>
</thead>
<tbody>
......@@ -53,6 +54,9 @@
<a href="{{ URL.site("office/teachers/profile/") }}/{{ Teachers[discipline.ID].ID }}">{{ Text.abbreviateName(Teachers[discipline.ID]) }}</a>
</td>
{% if InMainList %}
<td style="white-space: normal;">
{{ discipline.ExamType | replace({'credit': "зачет", 'exam': "экзамен", 'grading_credit': "дифзачет"}) }}
</td>
<td>
{% if discipline.IsGlobalStub %}
<a class="discipline_stub_{{ discipline.ID }}"
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment