@obe-loms/coms-parser 1.6.3 → 1.6.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/DataTable/models/CoaepDT.d.ts +17 -5
- package/DataTable/models/DataTable.d.ts +18 -19
- package/DataTable/models/PoaepDT.d.ts +0 -19
- package/bundle.js +30 -30
- package/package.json +1 -1
|
@@ -1,9 +1,21 @@
|
|
|
1
1
|
import { COAEP } from "../../types/coaep";
|
|
2
|
-
import { DataTable
|
|
2
|
+
import { DataTable } from "./DataTable";
|
|
3
3
|
import { ParserResult } from "../types/ParserResult";
|
|
4
4
|
import DataTableException from "../types/DataTableException";
|
|
5
|
-
export type
|
|
6
|
-
|
|
5
|
+
export type CoaepRow = [
|
|
6
|
+
string | null,
|
|
7
|
+
// CO No
|
|
8
|
+
string | null,
|
|
9
|
+
// CO Statement
|
|
10
|
+
string | null,
|
|
11
|
+
// ILO Statement
|
|
12
|
+
string | null,
|
|
13
|
+
[
|
|
14
|
+
number | null,
|
|
15
|
+
number | null
|
|
16
|
+
]
|
|
17
|
+
];
|
|
18
|
+
export declare class CoaepDT extends DataTable<COAEP, CoaepRow> {
|
|
7
19
|
faculty: string | null;
|
|
8
20
|
course: string | null;
|
|
9
21
|
sy: string | null;
|
|
@@ -14,9 +26,9 @@ export declare class CoaepDT extends DataTable<COAEP, CoaepDTCellType> {
|
|
|
14
26
|
*/
|
|
15
27
|
constructor();
|
|
16
28
|
validateFields(validMsgs: string[], tableErrors: DataTableException[]): Promise<void>;
|
|
17
|
-
fromCSVString(csvString: string): Promise<ParserResult<
|
|
29
|
+
fromCSVString(csvString: string): Promise<ParserResult<CoaepRow[]>>;
|
|
18
30
|
toJson(): Promise<ParserResult<{
|
|
19
|
-
jsonObj: COAEP
|
|
31
|
+
jsonObj: COAEP;
|
|
20
32
|
validMsgs: string[];
|
|
21
33
|
tableErrors: DataTableException[];
|
|
22
34
|
}>>;
|
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
import { ParserResult } from "../types/ParserResult";
|
|
2
2
|
import DataTableException from "../types/DataTableException";
|
|
3
3
|
import { DTValidator } from "./DTValidator";
|
|
4
|
-
export type
|
|
5
|
-
export type DataTableInfo<U> = {
|
|
4
|
+
export type DataTableInfo<RowType = any[]> = {
|
|
6
5
|
name: string;
|
|
7
|
-
table: U[][];
|
|
8
6
|
headers: string[];
|
|
7
|
+
table: RowType[];
|
|
9
8
|
};
|
|
10
|
-
export declare abstract class DataTable<
|
|
9
|
+
export declare abstract class DataTable<Obj, RowType> {
|
|
11
10
|
protected name: string;
|
|
12
|
-
protected table: U[][];
|
|
13
11
|
protected headers: string[];
|
|
14
|
-
protected
|
|
12
|
+
protected table: RowType[];
|
|
13
|
+
protected validators: DTValidator<this, Obj>[];
|
|
15
14
|
/**
|
|
16
15
|
* Creates a new DataTable, initializes default values.
|
|
17
16
|
* If no name is given, the name defaults to "DataTable".
|
|
18
17
|
*
|
|
19
|
-
* @template
|
|
20
|
-
* @template
|
|
18
|
+
* @template Obj - The type of the DataTable JSON output.
|
|
19
|
+
* @template RowType - The type of each row of the inner table.
|
|
21
20
|
*
|
|
22
21
|
* @param {string} _name - The name of the DataTable. Defaults to "DataTable".
|
|
22
|
+
* @param {string[]} _headers - The headers of the DataTable.
|
|
23
23
|
*/
|
|
24
|
-
constructor(_name
|
|
24
|
+
constructor(_name: string | undefined, _headers: string[]);
|
|
25
25
|
/**
|
|
26
26
|
* Returns the name of the DataTable.
|
|
27
27
|
* @returns string
|
|
@@ -36,7 +36,7 @@ export declare abstract class DataTable<T, U = DefaultCellType> {
|
|
|
36
36
|
* Gets the DataTable from the current object.
|
|
37
37
|
* @returns ParserResult<DataTableInfo>
|
|
38
38
|
*/
|
|
39
|
-
getTable(): ParserResult<DataTableInfo<
|
|
39
|
+
getTable(): ParserResult<DataTableInfo<RowType>>;
|
|
40
40
|
/**
|
|
41
41
|
* Sets the DataTable from a given table.
|
|
42
42
|
* Asserts first if the DataTable is initialized,
|
|
@@ -45,7 +45,7 @@ export declare abstract class DataTable<T, U = DefaultCellType> {
|
|
|
45
45
|
* @param table - Internal table of type (string | null)[][].
|
|
46
46
|
* @returns A Promise that resolves when the table has been set.
|
|
47
47
|
*/
|
|
48
|
-
setTable(table:
|
|
48
|
+
setTable(table: RowType[]): Promise<void>;
|
|
49
49
|
/**
|
|
50
50
|
* Populates the internal table from a given File or CSV string.
|
|
51
51
|
*
|
|
@@ -55,22 +55,21 @@ export declare abstract class DataTable<T, U = DefaultCellType> {
|
|
|
55
55
|
* @param {File | string} data - The File or CSV string to initialize the DataTable from.
|
|
56
56
|
* @returns A Promise that resolves to a ParserResult.
|
|
57
57
|
*/
|
|
58
|
-
initializeTable(data: File | string): Promise<ParserResult<
|
|
58
|
+
initializeTable(data: File | string): Promise<ParserResult<RowType[]>>;
|
|
59
59
|
/**
|
|
60
60
|
* Asserts that the DataTable has been initialized.
|
|
61
61
|
* If not, it throws a DataTableException.
|
|
62
62
|
*
|
|
63
|
-
* @returns A Promise that resolves with a string message.
|
|
64
63
|
* @throws {DataTableException} If the DataTable has not been initialized.
|
|
65
64
|
*/
|
|
66
|
-
assertInitialized(): Promise<
|
|
65
|
+
assertInitialized(): Promise<void>;
|
|
67
66
|
/**
|
|
68
67
|
* Parses a CSV string into a DataTable.
|
|
69
68
|
*
|
|
70
69
|
* @param csvString - The CSV string to parse.
|
|
71
70
|
* @returns A Promise that resolves to a ParserResult when the parsing is complete.
|
|
72
71
|
*/
|
|
73
|
-
abstract fromCSVString(csvString: string): Promise<ParserResult<
|
|
72
|
+
abstract fromCSVString(csvString: string): Promise<ParserResult<RowType[]>>;
|
|
74
73
|
/**
|
|
75
74
|
* Converts the DataTable to its JSON representation.
|
|
76
75
|
* The method will run all validators on the DataTable before conversion.
|
|
@@ -80,7 +79,7 @@ export declare abstract class DataTable<T, U = DefaultCellType> {
|
|
|
80
79
|
* @returns A Promise that resolves when the conversion is complete.
|
|
81
80
|
*/
|
|
82
81
|
abstract toJson(): Promise<ParserResult<{
|
|
83
|
-
jsonObj:
|
|
82
|
+
jsonObj: Obj;
|
|
84
83
|
validMsgs: string[];
|
|
85
84
|
tableErrors: DataTableException[];
|
|
86
85
|
}>>;
|
|
@@ -92,14 +91,14 @@ export declare abstract class DataTable<T, U = DefaultCellType> {
|
|
|
92
91
|
* @param sheetName - Optional sheetname to set the DataTable from. Defaults to 1st sheet.
|
|
93
92
|
* @returns A Promise that resolves to a ParserResult when the DataTable is set.
|
|
94
93
|
*/
|
|
95
|
-
fromXML(xls: File, sheetName?: string): Promise<ParserResult<
|
|
94
|
+
fromXML(xls: File, sheetName?: string): Promise<ParserResult<RowType[]>>;
|
|
96
95
|
/**
|
|
97
96
|
* Finds the row and column index of a given string in the DataTable.
|
|
98
97
|
*
|
|
99
98
|
* @param {string} str - The string to search for.
|
|
100
99
|
* @returns {Promise<{ row: number; column: number }>} - A promise resolving to the indices. Defaults to {row: -1, column: -1} if not found.
|
|
101
100
|
*/
|
|
102
|
-
findValue(
|
|
101
|
+
findValue(val: string | any): Promise<{
|
|
103
102
|
row: number;
|
|
104
103
|
column: number;
|
|
105
104
|
}>;
|
|
@@ -130,5 +129,5 @@ export declare abstract class DataTable<T, U = DefaultCellType> {
|
|
|
130
129
|
*
|
|
131
130
|
* @param validator - The validator to add to the DataTable.
|
|
132
131
|
*/
|
|
133
|
-
useValidator(validator: DTValidator<this,
|
|
132
|
+
useValidator(validator: DTValidator<this, Obj>): void;
|
|
134
133
|
}
|
|
@@ -1,20 +1 @@
|
|
|
1
|
-
import { POAEP } from "../../types/poaep";
|
|
2
|
-
import DataTableException from "../types/DataTableException";
|
|
3
|
-
import ParserResult from "../types/ParserResult";
|
|
4
|
-
import { DataTable, DataTableInfo } from "./DataTable";
|
|
5
|
-
type CellType = null | string | (string | number | null)[];
|
|
6
|
-
export declare class PoaepDT extends DataTable<POAEP, CellType> {
|
|
7
|
-
/**
|
|
8
|
-
* Initializes the DataTable for POAEP
|
|
9
|
-
* Also sets up custom validators for the DataTable
|
|
10
|
-
*/
|
|
11
|
-
constructor();
|
|
12
|
-
fromCSVString(csvString: string): Promise<ParserResult<DataTableInfo<CellType>>>;
|
|
13
|
-
toJson(): Promise<ParserResult<{
|
|
14
|
-
jsonObj: POAEP | null;
|
|
15
|
-
validMsgs: string[];
|
|
16
|
-
tableErrors: DataTableException[];
|
|
17
|
-
}>>;
|
|
18
|
-
validateFields(validMsgs: string[], tableErrors: DataTableException[]): Promise<void>;
|
|
19
|
-
}
|
|
20
1
|
export {};
|
package/bundle.js
CHANGED
|
@@ -1,60 +1,60 @@
|
|
|
1
|
-
import
|
|
2
|
-
import * as
|
|
1
|
+
import _0xbd7909 from 'papaparse';
|
|
2
|
+
import * as _0x7ad0a from 'xlsx';
|
|
3
3
|
|
|
4
|
-
function parseCurriculum(
|
|
4
|
+
function parseCurriculum(_0x5bb076){let _0x2bf119='',_0x1a1319='',_0x219af1=0x0,_0x449012=null;const _0x569874=[];return _0xbd7909['parse'](_0x5bb076,{'skipEmptyLines':!![],'complete':_0x1a4363=>{_0x1a4363['data']['forEach'](_0xd8a943=>{const _0x377673=_0xd8a943['map'](_0x3ef414=>(_0x3ef414??'')['toString']()['trim']()),_0x291044=_0x377673[0x0]??'';if(_0x291044['includes']('Rev#')){const _0x1a0ffa=_0x291044['match'](/([A-Z0-9]+)\s*-\s*.*:\s*(.*?)\s+Rev#\s*(\d+)/i);_0x1a0ffa&&(_0x2bf119=_0x1a0ffa[0x1]?.['trim']()??'',_0x1a1319=_0x1a0ffa[0x2]?.['trim']()??'',_0x219af1=parseInt(_0x1a0ffa[0x3]??'0',0xa));return;}if(/FIRST YEAR/i['test'](_0x291044)){_0x449012=0x1;return;}if(/SECOND YEAR/i['test'](_0x291044)){_0x449012=0x2;return;}if(/THIRD YEAR/i['test'](_0x291044)){_0x449012=0x3;return;}if(/FOURTH YEAR/i['test'](_0x291044)){_0x449012=0x4;return;}if(/FIFTH YEAR/i['test'](_0x291044)){_0x449012=0x5;return;}if(/First Semester/i['test'](_0x291044)||/Second Semester/i['test'](_0x291044)||/Summer/i['test'](_0x291044))return;const _0xf56bc0=[{'sem':0x1,'offset':0x0},{'sem':0x2,'offset':0x6},{'sem':0x3,'offset':0xc}];_0xf56bc0['forEach'](({sem:_0x412309,offset:_0x53a058})=>{const _0x40eeb3=_0x377673[_0x53a058]??'',_0x4d6e61=_0x377673[_0x53a058+0x1]??'',_0x52e712=_0x377673[_0x53a058+0x2]??'',_0x44afe8=_0x377673[_0x53a058+0x3]??'',_0x17b795=_0x377673[_0x53a058+0x4]??'';_0x40eeb3&&_0x449012&&_0x569874['push']({'curr_id':_0x2bf119,'program_name':_0x1a1319,'revision_no':_0x219af1,'year_level':_0x449012,'sem':_0x412309,'course_id':_0x40eeb3,'course_desc':_0x4d6e61,'total_units':_0x52e712,'lec_unit':_0x44afe8,'lab_unit':_0x17b795});});});}}),_0x569874;}
|
|
5
5
|
|
|
6
|
-
function convertToCSVFile(
|
|
6
|
+
function convertToCSVFile(_0x1a9b61,_0x481525){return new Promise((_0x3b916a,_0x2f202f)=>{const _0x1bb32c=new FileReader();_0x1bb32c['onload']=_0x5f0993=>{const _0x41c2f4=_0x5f0993['target']?.['result'];if(!_0x41c2f4){_0x2f202f(new Error('Failed\x20to\x20read\x20file'));return;}try{const _0x2dc606=_0x7ad0a['read'](_0x41c2f4,{'type':'array'});!_0x481525&&(_0x481525=_0x2dc606['SheetNames'][0x0]);if(!_0x481525){_0x2f202f(new Error('No\x20sheets\x20found\x20in\x20workbook'));return;}const _0xae7cce=_0x2dc606['Sheets'][_0x481525];if(!_0xae7cce){_0x2f202f(new Error('No\x20sheets\x20found\x20in\x20worksheet'));return;}const _0x40a965=_0x7ad0a['utils']['sheet_to_csv'](_0xae7cce,{'strip':!![]}),_0x4882a2=_0x1a9b61['name']['replace'](/\.[^/.]+$/,'.csv'),_0x52e764=new File([_0x40a965],_0x4882a2,{'type':'text/csv','lastModified':Date['now']()});_0x3b916a(_0x52e764);}catch(_0x1c55ce){_0x2f202f(_0x1c55ce);}},_0x1bb32c['onerror']=()=>{_0x2f202f(new Error('File\x20reading\x20failed'));},_0x1bb32c['readAsArrayBuffer'](_0x1a9b61);});}
|
|
7
7
|
|
|
8
|
-
async function uploadCurriculum(
|
|
8
|
+
async function uploadCurriculum(_0x1b2eb7,_0x3cd5e4){try{const _0x5e8bfe=await convertToCSVFile(_0x3cd5e4),_0x41e9c6=await _0x5e8bfe['text'](),_0x18d10e=parseCurriculum(_0x41e9c6),_0x12c982=_0xbd7909['unparse'](_0x18d10e),_0x13d454=new File([_0x12c982],_0x5e8bfe['name'],{'type':'text/csv'}),_0x15fd3f=new FormData();_0x15fd3f['append']('csvFile',_0x13d454);const _0x520747=await fetch(_0x1b2eb7+'/curr-courses/upload',{'method':'POST','body':_0x15fd3f});if(!_0x520747['ok']){const _0x556f95=await _0x520747['json']();throw _0x556f95;}return _0x520747['json']();}catch(_0xd7466){throw _0xd7466;}}
|
|
9
9
|
|
|
10
|
-
function parseCourseOffering(
|
|
10
|
+
function parseCourseOffering(_0x32b9fb){let _0x29a328='',_0x23e394='';const _0x11ddcd=[],_0x476ddb=_0xbd7909['parse'](_0x32b9fb,{'header':![],'skipEmptyLines':!![],'delimiter':','}),_0x58213f=_0x476ddb['data'];for(let _0x46921e=0x0;_0x46921e<Math['min'](0x5,_0x58213f['length']);_0x46921e++){const _0x39c15a=_0x58213f[_0x46921e];if(_0x39c15a&&_0x39c15a['length']>0x0){const _0x51543a=_0x39c15a[0x0]?.['toString']()||'',_0x2c9407=_0x51543a['match'](/(First|Second)\s+Sem\s+S\/Y\s+(\d{4}-\d{4})/i);if(_0x2c9407){_0x29a328=_0x2c9407[0x1]?.['toLowerCase']()==='first'?'1':'2';if(_0x2c9407[0x2]){const _0x5b2f9c=_0x2c9407[0x2]['match'](/(\d{2})(\d{2})-(\d{2})(\d{2})/);_0x5b2f9c&&_0x5b2f9c[0x2]&&_0x5b2f9c[0x4]&&(_0x23e394=_0x5b2f9c[0x2]+_0x5b2f9c[0x4]);}}}}let _0x1e47e3=-1;for(let _0x3f4318=0x0;_0x3f4318<_0x58213f['length'];_0x3f4318++){const _0x2bb614=_0x58213f[_0x3f4318];if(_0x2bb614&&_0x2bb614['some'](_0x2ada73=>_0x2ada73?.['toString']()['toUpperCase']()['includes']('CODE'))){_0x1e47e3=_0x3f4318;break;}}if(_0x1e47e3===-1)throw new Error('Could\x20not\x20find\x20header\x20row\x20in\x20CSV\x20data');let _0x2965e3={'code':'','description':'','unit':0x0};for(let _0xee7e5e=_0x1e47e3+0x1;_0xee7e5e<_0x58213f['length'];_0xee7e5e++){const _0x1fc2fc=_0x58213f[_0xee7e5e];if(!_0x1fc2fc||_0x1fc2fc['length']<0x8)continue;const _0x4735b7=_0x1fc2fc[0x1]?.['toString']()['trim']()||'',_0x11cc48=_0x1fc2fc[0x4]?.['toString']()['trim']()||'',_0x5008c6=_0x1fc2fc[0x5]?.['toString']()['trim']()||'',_0x173f38=_0x1fc2fc[0x6]?.['toString']()['trim']()||'',_0x19d6d4=_0x1fc2fc[0x7]?.['toString']()['trim']()||'',_0x20d295=_0x1fc2fc[0x3]?.['toString']()['trim']()||'';let _0x4efeb7=_0x1fc2fc[0x0]?.['toString']()['trim']()||'',_0x134b64=_0x1fc2fc[0x2]?.['toString']()['trim']()||'';if(!_0x4735b7)continue;if(!_0x4efeb7)_0x4efeb7=_0x2965e3['code'];if(!_0x134b64)_0x134b64=_0x2965e3['description'];let _0x5b65f2=_0x2965e3['unit'];if(_0x20d295){const _0x458e83=_0x20d295['match'](/(\d+)/);_0x458e83&&_0x458e83[0x1]&&(_0x5b65f2=parseInt(_0x458e83[0x1],0xa));}const _0x29f74a={'sem':_0x29a328,'school_year':_0x23e394,'code':_0x4efeb7,'course_no':_0x4735b7,'course_desc':_0x134b64,'unit':_0x5b65f2,'time':_0x11cc48,'days':_0x5008c6,'faculty':_0x173f38,'room':_0x19d6d4};_0x2965e3['code']=_0x4efeb7,_0x2965e3['description']=_0x134b64,_0x2965e3['unit']=_0x5b65f2,_0x11ddcd['push'](_0x29f74a);}return _0x11ddcd;}
|
|
11
11
|
|
|
12
|
-
async function uploadCourseOffering(
|
|
12
|
+
async function uploadCourseOffering(_0x28b8ca,_0x48fb2a){try{const _0x5a6229=await convertToCSVFile(_0x48fb2a),_0x2e1270=await _0x5a6229['text'](),_0x1cbf23=parseCourseOffering(_0x2e1270),_0x19a8b2=_0xbd7909['unparse'](_0x1cbf23),_0x187b8a=new File([_0x19a8b2],_0x5a6229['name'],{'type':'text/csv'}),_0x3ddd21=new FormData();_0x3ddd21['append']('csvFile',_0x187b8a);const _0x484f29=await fetch(_0x28b8ca+'/course-offerings/upload',{'method':'POST','body':_0x3ddd21});if(!_0x484f29['ok']){const _0x1b4ff8=await _0x484f29['json']();throw _0x1b4ff8;}return _0x484f29['json']();}catch(_0x3113a8){throw _0x3113a8;}}
|
|
13
13
|
|
|
14
|
-
function performaceTarget(
|
|
14
|
+
function performaceTarget(_0x52b4ca){if(!_0x52b4ca)return {'performance_target':null,'passing_score':null};const _0x10ff67=_0x52b4ca['match'](/\d+/g);return {'performance_target':_0x10ff67?.[0x0]?parseInt(_0x10ff67[0x0],0xa):null,'passing_score':_0x10ff67?.[0x1]?parseInt(_0x10ff67[0x1],0xa):null};}
|
|
15
15
|
|
|
16
|
-
const HEADERS$1={'co':['course\x20outcome','co\x20statement','outcome\x20statement'],'ilo':['intended\x20learning','ilo','learning\x20outcome'],'assessTool':['assessment\x20tool','assessment\x20method','tool'],'perfTarget':['performance\x20target','target','passing']};function getCoaepHeader(
|
|
16
|
+
const HEADERS$1={'co':['course\x20outcome','co\x20statement','outcome\x20statement'],'ilo':['intended\x20learning','ilo','learning\x20outcome'],'assessTool':['assessment\x20tool','assessment\x20method','tool'],'perfTarget':['performance\x20target','target','passing']};function getCoaepHeader(_0x1384d4){let _0x383513={'headerRowIndex':-1,'coIdx':-1,'iloIdx':-1,'assessToolIdx':-1,'perfTargetIdx':-1};for(let _0x138f76=0x0;_0x138f76<Math['min'](_0x1384d4['length'],0x14);_0x138f76++){const _0x3145a7=(_0x1384d4[_0x138f76]??[])['map'](_0x5bf199=>_0x5bf199['toLowerCase']()['trim']()),_0x25839c=_0x3145a7['findIndex'](_0x47d9c0=>HEADERS$1['co']['some'](_0x13677f=>_0x47d9c0['includes'](_0x13677f))),_0x596ad4=_0x3145a7['findIndex'](_0xd3b538=>HEADERS$1['ilo']['some'](_0x370018=>_0xd3b538['includes'](_0x370018))),_0x1bb4d5=_0x3145a7['findIndex'](_0x48bdce=>HEADERS$1['assessTool']['some'](_0x11d665=>_0x48bdce['includes'](_0x11d665))),_0x5f5228=_0x3145a7['findIndex'](_0x3608be=>HEADERS$1['perfTarget']['some'](_0xc25d10=>_0x3608be['includes'](_0xc25d10))),_0x4a07a7=[_0x25839c,_0x596ad4,_0x1bb4d5,_0x5f5228]['filter'](_0x27fe86=>_0x27fe86!==-1)['length'];if(_0x4a07a7>=0x3){_0x383513={'headerRowIndex':_0x138f76,'coIdx':_0x25839c,'iloIdx':_0x596ad4,'assessToolIdx':_0x1bb4d5,'perfTargetIdx':_0x5f5228};break;}}return _0x383513;}
|
|
17
17
|
|
|
18
|
-
function extractFromObjective(
|
|
18
|
+
function extractFromObjective(_0x2c2f60){const _0x50f3fd={'cognitive_level':null,'taxonomy_level':null,'verb':null},_0xb7496f=/(?:\(([IED])\))?\s*(\w+)\s*:\s*(.*)/i,_0x26aee1=_0x2c2f60['match'](_0xb7496f);if(_0x26aee1){if(_0x26aee1[0x1])_0x50f3fd['cognitive_level']=_0x26aee1[0x1];if(_0x26aee1[0x2])_0x50f3fd['taxonomy_level']=_0x26aee1[0x2]['toLowerCase']();const _0x22f243=_0x26aee1[0x3]?.['trim']();if(_0x22f243){const _0x48adbf=/(?:shall|will)\s+(\w+)/i,_0x453d76=_0x22f243['match'](_0x48adbf);_0x453d76?_0x50f3fd['verb']=_0x453d76[0x1]['toLowerCase']():_0x50f3fd['verb']=_0x22f243['split'](/\s+/)[0x0]['toLowerCase']();}}return _0x50f3fd;}
|
|
19
19
|
|
|
20
|
-
function parseCOAEP(
|
|
20
|
+
function parseCOAEP(_0x1251e9){const _0x4eae84=_0xbd7909['parse'](_0x1251e9,{'skipEmptyLines':![]})['data'],_0x46e31d={'COAEP':{'faculty':null,'course':null,'sy':null,'semester':null,'co':[]}},{headerRowIndex:_0x9aba51,coIdx:_0x30f67b,iloIdx:_0xf716f7,assessToolIdx:_0x20f2e5,perfTargetIdx:_0x2ea5bf}=getCoaepHeader(_0x4eae84);if(_0x9aba51===-1)return {'error':'Could\x20not\x20auto-detect\x20header\x20row.','message':'Please\x20ensure\x20the\x20CSV\x20file\x20is\x20in\x20the\x20correct\x20COAEP\x20format.'};_0x4eae84['forEach'](_0x1f74af=>{const _0x5f15ea=_0x1f74af['indexOf']('Name\x20of\x20Faculty:'),_0x53fc56=_0x1f74af['indexOf']('School\x20Year'),_0x324517=_0x1f74af['indexOf']('Course:'),_0x2bb152=_0x1f74af['indexOf']('Semester');_0x5f15ea!==-1&&(_0x46e31d['COAEP']['faculty']=_0x1f74af[_0x5f15ea+0x1]?.['trim']()||_0x46e31d['COAEP']['faculty']);_0x53fc56!==-1&&(_0x46e31d['COAEP']['sy']=_0x1f74af[_0x53fc56+0x1]?.['trim']()||_0x46e31d['COAEP']['sy']);_0x324517!==-1&&(_0x46e31d['COAEP']['course']=_0x1f74af[_0x324517+0x1]?.['trim']()||_0x46e31d['COAEP']['course']);if(_0x2bb152!==-1){const _0x118417=_0x1f74af[_0x2bb152+0x1]?.['trim']()||'',_0x586582=_0x118417['match'](/\d+/)?.[0x0];_0x46e31d['COAEP']['semester']=_0x586582?parseInt(_0x586582,0xa):_0x46e31d['COAEP']['semester'];}});let _0x1a7494=null;return _0x4eae84['forEach']((_0x20ceaf,_0x35fe70)=>{if(_0x35fe70<=_0x9aba51)return;let _0x15aea2=_0x20ceaf[_0x30f67b-0x1]?.['trim']()||'',_0x2beb87=_0x20ceaf[_0x30f67b]?.['trim']()||'';/^\d+$/['test'](_0x20ceaf[_0x30f67b]?.['trim']()||'')&&(_0x15aea2=_0x20ceaf[_0x30f67b]?.['trim']()||'',_0x2beb87=_0x20ceaf[_0x30f67b+0x1]?.['trim']()||'');const _0x387405=_0x20ceaf[_0xf716f7]?.['trim']()||'',_0x34efff=_0x20ceaf[_0x20f2e5]?.['replace'](/^ILO\d+[:.]?\s*/,'')['trim']()||'',_0x39f014=_0x20ceaf[_0x2ea5bf]?.['replace'](/\s+/g,'\x20')['trim']()||'';if(_0x15aea2&&/^\d+$/['test'](_0x15aea2)){_0x1a7494&&_0x46e31d['COAEP']['co']['push'](_0x1a7494);const _0x5c8460=_0x2beb87,{verb:_0x4003f8,cognitive_level:_0x220d7a,taxonomy_level:_0x278285}=extractFromObjective(_0x5c8460);if(!_0x4003f8)return {'error':'Could\x20not\x20find\x20verb.','message':'Please\x20ensure\x20the\x20Course\x20Outcome\x20#'+_0x15aea2+'\x20is\x20in\x20the\x20correct\x20format.'};_0x1a7494={'statement':_0x5c8460,'ilo':[],'verb':_0x4003f8,'cognitive_level':_0x220d7a,'taxonomy_level':_0x278285};}if(_0x1a7494&&_0x387405&&_0x39f014){const _0x1f17cb=_0x387405['replace'](/^ILO\d+[:.]?\s*/,'');if(_0x1f17cb['match'](/^(Revision|Prepared|Date|Approved|Effectivity|Page)/i)||_0x1f17cb['length']<0xa)return;let _0x2d4060=_0x34efff;if(!_0x2d4060&&_0x1f17cb['includes'](':')){const _0x5d511a=_0x1f17cb['match'](/^ILO\d+:\s*(.+?)(?:\s*\(|$)/);_0x5d511a&&(_0x2d4060=_0x5d511a[0x1]?.['trim']()||'');}const {performance_target:_0x2b55fa,passing_score:_0x46dfa2}=performaceTarget(_0x39f014),{verb:_0x2462bf,cognitive_level:_0x5ba081,taxonomy_level:_0x5a90c9}=extractFromObjective(_0x1f17cb);_0x1a7494['ilo']['push']({'statement':_0x1f17cb,'assessment_tool':_0x2d4060,'performance_target':_0x2b55fa,'passing_score':_0x46dfa2,'verb':_0x2462bf,'cognitive_level':_0x5ba081,'taxonomy_level':_0x5a90c9});}}),_0x1a7494&&_0x46e31d['COAEP']['co']['push'](_0x1a7494),_0x46e31d;}
|
|
21
21
|
|
|
22
|
-
async function uploadCOAEP(
|
|
22
|
+
async function uploadCOAEP(_0x884502,_0x2b0ff1,_0x28f829){try{const _0x220078=await convertToCSVFile(_0x2b0ff1),_0x4c118a=await _0x220078['text'](),_0x2bb0e0=parseCOAEP(_0x4c118a);console['log'](_0x2bb0e0);const _0x3e28ff=await fetch(_0x884502+'/coaeps/upload?course_id='+_0x28f829,{'method':'POST','headers':{'Content-Type':'application/json'},'body':JSON['stringify'](_0x2bb0e0)});if(!_0x3e28ff['ok']){const _0x4c1e3c=await _0x3e28ff['json']();throw _0x4c1e3c;}return _0x3e28ff['json']();}catch(_0x1883b1){throw _0x1883b1;}}
|
|
23
23
|
|
|
24
|
-
async function uploadEnrolledStudent(
|
|
24
|
+
async function uploadEnrolledStudent(_0x1b1974,_0x2c3026){try{const _0x13b025=await convertToCSVFile(_0x2c3026),_0x1b616f=new FormData();_0x1b616f['append']('csvFile',_0x13b025);const _0x95c65c=await fetch(_0x1b1974+'/enrolled-students/upload',{'method':'POST','body':_0x1b616f});if(!_0x95c65c['ok']){const _0x54f648=await _0x95c65c['json']();throw _0x54f648;}return _0x95c65c['json']();}catch(_0xf6f75f){throw _0xf6f75f;}}
|
|
25
25
|
|
|
26
|
-
function parseClassList(
|
|
26
|
+
function parseClassList(_0x261de0){const _0x505df9=_0xbd7909['parse'](_0x261de0,{'skipEmptyLines':!![]})['data'];let _0x36714e='',_0x32598c='',_0x171ba6='';const _0x44a26f=[];return _0x505df9['forEach'](_0x4a972a=>{const _0x2bb5f2=_0x4a972a['map'](_0x31865c=>(_0x31865c??'')['toString']()['trim']()),_0x4c321d=_0x2bb5f2[0x0]??'';if(_0x4c321d['startsWith']('Course\x20No:')){const _0x4b7d9d=_0x4c321d['replace']('Course\x20No:','')['trim'](),_0x37d6b5=_0x4b7d9d['split'](/\s+/);_0x171ba6=_0x37d6b5[0x0]??'';const [_0x2e69db,_0x29eb4a]=(_0x37d6b5[0x1]??'')['split']('-');_0x32598c=_0x2e69db??'';const _0x4ccc64=(_0x29eb4a??'')['match'](/[a-z]$/);_0x36714e=_0x4ccc64?_0x4ccc64[0x0]:'';}if(/^\d+$/['test'](_0x4c321d)){const _0x6ae181=_0x2bb5f2[0x2]??'';_0x44a26f['push']({'subj_code':_0x171ba6,'student_no':_0x6ae181,'course_id':_0x32598c,'section':_0x36714e});}}),{'enrolledCourses':_0x44a26f};}
|
|
27
27
|
|
|
28
|
-
async function uploadClassList(
|
|
28
|
+
async function uploadClassList(_0x4ffff6,_0x2b2d60,_0x34a706,_0x17568b){try{const _0x1fcfdb=await convertToCSVFile(_0x2b2d60),_0x1f999c=await _0x1fcfdb['text'](),_0x205226=parseClassList(_0x1f999c),_0x28de3c='subj_code='+_0x34a706+'&period_id='+_0x17568b,_0x4deea3=await fetch(_0x4ffff6+'/enrolled-courses/upload?'+_0x28de3c,{'method':'POST','headers':{'Content-Type':'application/json'},'body':JSON['stringify'](_0x205226)});if(!_0x4deea3['ok']){const _0x49efae=await _0x4deea3['json']();throw _0x49efae;}return _0x4deea3['json']();}catch(_0x5da138){throw _0x5da138;}}
|
|
29
29
|
|
|
30
|
-
function parseAssessmentCsv(
|
|
30
|
+
function parseAssessmentCsv(_0x291d62){const {data:_0x55a86a}=_0xbd7909['parse'](_0x291d62,{'skipEmptyLines':!![]}),_0x19f6d5=_0x55a86a['filter'](_0x10c5a1=>_0x10c5a1['length']>0x0),_0x23f2c1=_0x19f6d5['find'](_0x31a573=>_0x31a573['some'](_0x3b5107=>_0x3b5107?.['includes']('Faculty'))),_0x48c409=_0x23f2c1?_0x23f2c1['findIndex'](_0x7b4438=>_0x7b4438?.['includes']('Faculty')):-1,_0x190ec5=_0x48c409!==-1&&_0x23f2c1?_0x23f2c1[_0x48c409+0x2]?.['replace'](/"/g,'')['trim']()??'':'',_0x618663=_0x19f6d5['find'](_0x18debd=>_0x18debd['some'](_0x2ff360=>_0x2ff360?.['includes']('Semester'))),_0xe8fee7=_0x618663?_0x618663['findIndex'](_0x30d73b=>_0x30d73b?.['includes']('Semester')):-1,_0x5b37fc=_0xe8fee7!==-1&&_0x618663?_0x618663[_0xe8fee7+0x2]?.['trim']()??'':'',_0x3da25a=_0x5b37fc['includes']('1st')?0x1:_0x5b37fc['includes']('2nd')?0x2:0x0,_0x1992d0=_0x19f6d5['find'](_0x33e3b0=>_0x33e3b0['some'](_0x3665eb=>_0x3665eb?.['includes']('Course\x20&\x20Sec'))),_0x249d48=_0x1992d0?_0x1992d0['findIndex'](_0x475bbb=>_0x475bbb?.['includes']('Course\x20&\x20Sec')):-1,_0x3eff66=_0x249d48!==-1&&_0x1992d0?_0x1992d0[_0x249d48+0x2]?.['trim']()??'':'';let _0x5e00f6='',_0x294d04='';if(_0x3eff66){const _0x3b9044=_0x3eff66['match'](/^([A-Za-z0-9]+)-?([A-Za-z]+)?/);_0x3b9044&&(_0x5e00f6=_0x3b9044[0x1]??'',_0x3b9044[0x2]&&(_0x294d04=_0x3b9044[0x2]['replace'](/^OC/i,'')));}const _0x58181c=_0x19f6d5['find'](_0x59eefa=>_0x59eefa['some'](_0x4e4140=>_0x4e4140?.['includes']('School\x20Year'))),_0x588fa1=_0x58181c?_0x58181c['findIndex'](_0x52035c=>_0x52035c?.['includes']('School\x20Year')):-1,_0x3c5873=_0x588fa1!==-1&&_0x58181c?_0x58181c[_0x588fa1+0x2]?.['trim']()??'':'';let _0x2cc232=0x0;if(_0x3c5873){const _0x39c785=_0x3c5873['match'](/(\d{4})-(\d{4})/);if(_0x39c785){const _0x937ffb=(_0x39c785[0x1]??'')['slice'](0x2),_0x5ba9af=(_0x39c785[0x2]??'')['slice'](0x2);_0x2cc232=parseInt(_0x937ffb+_0x5ba9af,0xa);}}const _0x3af905={'faculty':_0x190ec5,'course':_0x5e00f6,'section':_0x294d04,'semester':_0x3da25a,'sy':_0x2cc232},_0x57b7cb=_0x19f6d5['findIndex'](_0x2d0256=>_0x2d0256['some'](_0x1c6ca9=>_0x1c6ca9?.['trim']()==='CO\x20#'));if(_0x57b7cb===-1)throw new Error('CO\x20header\x20row\x20not\x20found\x20in\x20CSV');const _0x3ea504=_0x19f6d5[_0x57b7cb+0x1];if(!_0x3ea504)throw new Error('ILO\x20header\x20row\x20not\x20found\x20in\x20CSV');const _0x3dbc15={};let _0x1e0530=0x1,_0x3da6b4=0x1;for(let _0xa984a=0x3;_0xa984a<_0x3ea504['length'];_0xa984a++){const _0x7af23a=_0x3ea504[_0xa984a];if(!_0x7af23a)continue;const _0x16b1a2='co'+_0x1e0530;if(!_0x3dbc15[_0x16b1a2])_0x3dbc15[_0x16b1a2]=[];_0x3dbc15[_0x16b1a2]['push']('ilo'+_0x3da6b4),_0x3da6b4++,_0x3da6b4>0x3&&(_0x1e0530++,_0x3da6b4=0x1);}const _0x4fbf73=_0x19f6d5['findIndex'](_0x320df6=>_0x320df6['includes']('Name\x20of\x20Students'));if(_0x4fbf73===-1)throw new Error('Student\x20header\x20row\x20not\x20found\x20in\x20CSV');const _0x3c8aa9=_0x19f6d5[_0x4fbf73];if(!_0x3c8aa9)throw new Error('Student\x20header\x20row\x20is\x20missing');const _0x47b137=_0x3c8aa9['findIndex'](_0x242123=>_0x242123?.['includes']('Name\x20of\x20Students'));if(_0x47b137===-1)throw new Error('Name\x20of\x20Students\x20column\x20not\x20found\x20in\x20CSV');const _0x58c9b7=_0x47b137+0x2,_0x482ffc=[];for(let _0x5ae956=_0x4fbf73+0x1;_0x5ae956<_0x19f6d5['length'];_0x5ae956++){const _0x2dbfcb=_0x19f6d5[_0x5ae956];if(!_0x2dbfcb)continue;if(_0x2dbfcb['some'](_0x55bdd8=>_0x55bdd8?.['toUpperCase']()['includes']('TOTAL\x20STUDENTS')||_0x55bdd8?.['toUpperCase']()['includes']('ACHIEVED\x20THE\x20MINIMUM')||_0x55bdd8?.['toUpperCase']()['includes']('INACTIVE')||_0x55bdd8?.['toUpperCase']()['includes']('AVERAGE')))continue;if(!_0x2dbfcb[_0x47b137])continue;const _0x5c890e=_0x2dbfcb[_0x47b137]['replace'](/"/g,'')['trim'](),_0x1bd7d8=_0x2dbfcb['slice'](_0x58c9b7)['map'](_0x177a5b=>_0x177a5b===null?null:!isNaN(Number(_0x177a5b))?parseFloat(_0x177a5b):0x0);let _0xddd956=0x0;const _0x14bd1c={};Object['entries'](_0x3dbc15)['forEach'](([_0x18baac,_0x1e2d10])=>{const _0x27bd05={};_0x1e2d10['forEach'](_0x324710=>{_0x27bd05[_0x324710]=_0x1bd7d8[_0xddd956]??0x0,_0xddd956++;}),_0x14bd1c[_0x18baac]={'transmuted_score':_0x27bd05};}),_0x482ffc['push']({'student_name':_0x5c890e,'coaep':_0x14bd1c});}const _0x424006=_0x19f6d5['find'](_0x2dfe54=>_0x2dfe54['some'](_0x2c18b0=>_0x2c18b0?.['includes']('ACHIEVED\x20THE\x20MINIMUM'))),_0x2e246a=_0x19f6d5['find'](_0x44c5a4=>_0x44c5a4['some'](_0x4bd641=>_0x4bd641?.['includes']('AVERAGE'))),_0x3d0944=_0x424006?_0x424006['slice'](_0x58c9b7)['map'](_0xc773a2=>_0xc773a2&&!isNaN(Number(_0xc773a2))?parseInt(_0xc773a2):0x0):[],_0x21174d=_0x2e246a?_0x2e246a['slice'](_0x58c9b7)['map'](_0x340522=>_0x340522&&_0x340522!=='#DIV/0!'&&!isNaN(Number(_0x340522))?parseInt(_0x340522):0x0):[],_0x22f620={};let _0x5975a1=0x0;return Object['entries'](_0x3dbc15)['forEach'](([_0x53998a,_0x3e64ec])=>{if(!_0x22f620[_0x53998a])_0x22f620[_0x53998a]={};_0x3e64ec['forEach'](_0x3d859e=>{_0x22f620[_0x53998a][_0x3d859e]={'achievedMinimum':_0x3d0944[_0x5975a1]??0x0,'average':_0x21174d[_0x5975a1]??0x0},_0x5975a1++;});}),{'assessmentData':{'classAssignment':_0x3af905,'student':_0x482ffc,'total':_0x22f620}};}
|
|
31
31
|
|
|
32
|
-
async function uploadAssessmentData(
|
|
32
|
+
async function uploadAssessmentData(_0x2884fd,_0xdb51b){try{const _0x23d319=await convertToCSVFile(_0xdb51b),_0x4cbefd=await _0x23d319['text'](),_0x268265=parseAssessmentCsv(_0x4cbefd),_0x4d1cfe=await fetch(_0x2884fd+'/assessment-data/upload',{'method':'POST','headers':{'Content-Type':'application/json'},'body':JSON['stringify'](_0x268265)});if(!_0x4d1cfe['ok']){const _0x166cf7=await _0x4d1cfe['json']();throw _0x166cf7;}return _0x4d1cfe['json']();}catch(_0x3b43fc){throw _0x3b43fc;}}
|
|
33
33
|
|
|
34
|
-
async function uploadDeptFaculty(
|
|
34
|
+
async function uploadDeptFaculty(_0x644b38,_0x499b34){try{const _0x4af772=await convertToCSVFile(_0x499b34),_0x147f0=new FormData();_0x147f0['append']('csvFile',_0x4af772);const _0x2498a5=await fetch(_0x644b38+'/dept-faculties/upload',{'method':'POST','body':_0x147f0});if(!_0x2498a5['ok']){const _0x16f588=await _0x2498a5['json']();throw _0x16f588;}return _0x2498a5['json']();}catch(_0x1f3461){throw _0x1f3461;}}
|
|
35
35
|
|
|
36
|
-
const HEADERS={'po':['program\x20outcome','po\x20statement','outcome\x20statement'],'tl':['taxonomy','level'],'pi':['performance\x20indicator'],'fc':['formative'],'sc':['summative'],'at':['assessment\x20tool','assessment\x20method','tool'],'pt':['performance\x20target','target','passing']};function getPoaepHeader(
|
|
36
|
+
const HEADERS={'po':['program\x20outcome','po\x20statement','outcome\x20statement'],'tl':['taxonomy','level'],'pi':['performance\x20indicator'],'fc':['formative'],'sc':['summative'],'at':['assessment\x20tool','assessment\x20method','tool'],'pt':['performance\x20target','target','passing']};function getPoaepHeader(_0x4cfa5d){let _0x4b3f2d={'headerIdx':-1,'poIdx':-1,'tlIdx':-1,'piIdx':-1,'fcIdx':-1,'scIdx':-1,'atIdx':-1,'ptIdx':-1};for(let _0x1d78a6=0x0;_0x1d78a6<Math['min'](_0x4cfa5d['length'],0x14);_0x1d78a6++){const _0x2ec345=(_0x4cfa5d[_0x1d78a6]??[])['map'](_0x242be5=>_0x242be5['toLowerCase']()['trim']()),_0x507900=_0x2ec345['findIndex'](_0x25a5b2=>HEADERS['po']['some'](_0x125400=>_0x25a5b2['toLowerCase']()['includes'](_0x125400))),_0x1e85c2=_0x2ec345['findIndex'](_0x533df7=>HEADERS['tl']['some'](_0xa5d856=>_0x533df7['toLowerCase']()['includes'](_0xa5d856))),_0x303b11=_0x2ec345['findIndex'](_0x9e8f85=>HEADERS['pi']['some'](_0x3864ef=>_0x9e8f85['toLowerCase']()['includes'](_0x3864ef))),_0x26d97c=_0x2ec345['findIndex'](_0x472fdb=>HEADERS['fc']['some'](_0x18e0af=>_0x472fdb['toLowerCase']()['includes'](_0x18e0af))),_0x3ee77e=_0x2ec345['findIndex'](_0x4e39f2=>HEADERS['sc']['some'](_0x52e6fb=>_0x4e39f2['toLowerCase']()['includes'](_0x52e6fb))),_0x3f7af5=_0x2ec345['findIndex'](_0x52c5b2=>HEADERS['at']['some'](_0x4451f6=>_0x52c5b2['toLowerCase']()['includes'](_0x4451f6))),_0x1ae3cd=_0x2ec345['findIndex'](_0x879d0a=>HEADERS['pt']['some'](_0x57c5d9=>_0x879d0a['toLowerCase']()['includes'](_0x57c5d9))),_0x275a91=[_0x507900,_0x1e85c2,_0x303b11,_0x26d97c,_0x3ee77e,_0x3f7af5,_0x1ae3cd]['filter'](_0x5bdbd7=>_0x5bdbd7!==-1)['length'];if(_0x275a91>=0x3){_0x4b3f2d={'headerIdx':_0x1d78a6,'poIdx':_0x507900,'tlIdx':_0x1e85c2,'piIdx':_0x303b11,'fcIdx':_0x26d97c,'scIdx':_0x3ee77e,'atIdx':_0x3f7af5,'ptIdx':_0x1ae3cd};break;}}if(_0x4b3f2d['headerIdx']===-1)throw new Error('No\x20valid\x20headers\x20found\x20in\x20POAEP\x20file.');return _0x4b3f2d;}
|
|
37
37
|
|
|
38
|
-
const parseFormativeCourses=
|
|
38
|
+
const parseFormativeCourses=_0x2d98ab=>{let _0x22d228=_0x2d98ab['split'](',')['reduce']((_0x5d4d46,_0x2bfe8d)=>{const _0xe47f39=_0x2bfe8d['trim']();if(_0xe47f39)_0x5d4d46['push'](_0xe47f39);return _0x5d4d46;},[]);return _0x22d228;};
|
|
39
39
|
|
|
40
|
-
const parsePOAEP=
|
|
40
|
+
const parsePOAEP=_0x8103ff=>{try{const _0x18457e=_0xbd7909['parse'](_0x8103ff,{'skipEmptyLines':![]})['data'],{headerIdx:_0x55026e,poIdx:_0xee9bce,tlIdx:_0x91929,piIdx:_0x5278f7,fcIdx:_0x3bf22a,scIdx:_0x5bed41,atIdx:_0x5d3bb5,ptIdx:_0x1df8b7}=getPoaepHeader(_0x18457e),_0x434a6b=[];let _0x1a29fe={'po_desc':'','seq_no':0x0,'PerfIndicators':[]},_0x1b2ca0='',_0x4b650b='',_0x462c2f='';for(let _0x64808d=_0x55026e+0x1;_0x64808d<_0x18457e['length'];_0x64808d++){const _0x464e84=_0x18457e[_0x64808d];if(!_0x464e84)break;const _0x113537=_0x464e84[_0xee9bce]?.['trim']()||'';_0x113537!==''&&(_0x1a29fe={'po_desc':_0x113537,'seq_no':_0x1a29fe['seq_no']+0x1,'PerfIndicators':[]},_0x434a6b['push'](_0x1a29fe),_0x1b2ca0='',_0x4b650b='',_0x462c2f='');if(_0x1a29fe['po_desc']==='')throw new Error('Invalid\x20Program\x20Outcome\x20at\x20row\x20'+_0x64808d+'.');const _0x727f3a=_0x464e84[_0x5278f7]?.['trim']()||'';if(_0x727f3a==='')break;const _0x122bf6=_0x464e84[_0x3bf22a]?.['trim']()||'';if(_0x122bf6==='')throw new Error('Empty\x20Formative\x20Courses\x20at\x20row\x20'+_0x64808d+'.');const _0x2de24a=_0x464e84[_0x5bed41]?.['trim']()||_0x1b2ca0;if(_0x2de24a==='')throw new Error('Empty\x20Summative\x20Course\x20at\x20row\x20'+_0x64808d+'.');_0x1b2ca0=_0x2de24a;const _0x47f108=_0x464e84[_0x5d3bb5]?.['trim']()||_0x4b650b;if(_0x47f108==='')throw new Error('Empty\x20Assessment\x20Tool\x20at\x20row\x20'+_0x64808d+'.');_0x4b650b=_0x47f108;const _0x3c751b=_0x464e84[_0x1df8b7]?.['trim']()||_0x462c2f;if(_0x3c751b==='')throw new Error('Empty\x20Performance\x20Target\x20at\x20row\x20'+_0x64808d+'.');_0x462c2f=_0x3c751b;const _0x8310d6=parseFormativeCourses(_0x122bf6);if(_0x8310d6['length']===0x0)throw new Error('Invalid\x20Formative\x20Courses\x20format\x20at\x20row\x20'+_0x64808d+'.');const _0x5aba01=performaceTarget(_0x3c751b);if(!_0x5aba01['performance_target']||!_0x5aba01['passing_score'])throw new Error('Invalid\x20Performance\x20Targets\x20format\x20at\x20row\x20'+_0x64808d+'.');const _0x543416={'pi_desc':_0x727f3a,'FormativeCourses':_0x8310d6['map'](_0x3cf0fc=>({'course_id':_0x3cf0fc,'cognitive_level':0x0})),'SummativeCourse':{'course_id':_0x2de24a},'AssessmentTool':{'at_desc':_0x47f108},'PerformanceTargets':{'target_percent':_0x5aba01['performance_target'],'min_score':_0x5aba01['passing_score']}};_0x1a29fe['PerfIndicators']['push'](_0x543416);}return {'success':!![],'message':'Successfully\x20parsed\x20POAEP\x20file.','data':{'POAEP':_0x434a6b}};}catch(_0x32df21){return {'success':![],'error':_0x32df21 instanceof Error?_0x32df21['message']:_0x32df21,'message':'Please\x20ensure\x20the\x20file\x20follows\x20the\x20POAEP\x20template.'};}};
|
|
41
41
|
|
|
42
|
-
async function uploadPOAEP(
|
|
42
|
+
async function uploadPOAEP(_0x598edf,_0x22dc4e,_0x43a9f6,_0x52e5b3,_0x197e09){try{const _0x477fca=await convertToCSVFile(_0x22dc4e),_0x16fe5f=await _0x477fca['text'](),_0x77708e=parsePOAEP(_0x16fe5f),_0x399a13=await fetch(_0x598edf+'/program-outcomes/poaep/upload?curr_id='+_0x52e5b3+'&period_id='+_0x197e09,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x43a9f6},'credentials':'include','body':JSON['stringify'](_0x77708e)});if(!_0x399a13['ok']){const _0x52c033=await _0x399a13['json']();throw _0x52c033;}return _0x399a13['json']();}catch(_0x2449a6){throw _0x2449a6;}}
|
|
43
43
|
|
|
44
|
-
class DataTable{['name'];['
|
|
44
|
+
class DataTable{['name'];['headers'];['table'];['validators']=[];constructor(_0x16da07='DataTable',_0x23c274){this['name']=_0x16da07,this['headers']=_0x23c274,this['table']=[],this['validators']=[];}['getName'](){return this['name'];}['getHeaders'](){return this['headers'];}['getTable'](){if(this['table']['length']===0x0)return {'success':![],'message':'Datatable\x20is\x20unset.'};return {'success':!![],'message':'Successfully\x20fetched\x20datatable.','data':{'name':this['name'],'headers':this['headers'],'table':this['table']}};}async['setTable'](_0x7a8972){await this['assertInitialized']();}async['initializeTable'](_0x34697f){try{let _0x4b69ef;if(_0x34697f instanceof File)_0x4b69ef=await this['fromXML'](_0x34697f);else _0x4b69ef=await this['fromCSVString'](_0x34697f);if(!_0x4b69ef['success']||!_0x4b69ef['data'])return _0x4b69ef;if(_0x4b69ef['data']['length']===0x0)throw new Error('Cannot\x20set\x20an\x20empty\x20table.');return this['table']=_0x4b69ef['data'],{'success':!![],'message':'Successfully\x20set\x20table.'};}catch(_0x33926d){return {'success':![],'message':'Error\x20setting\x20table.','error':_0x33926d};}}async['assertInitialized'](){if(this['table']['length']===0x0)Promise['reject']({'error':this['name']+'\x20is\x20unset.','from':this['name']['toUpperCase']()+'_ASSERT_INIT'});}async['fromXML'](_0x537345,_0x5f284a){const _0x19d164=await convertToCSVFile(_0x537345,_0x5f284a),_0x2817e0=await _0x19d164['text']();return this['fromCSVString'](_0x2817e0);}async['findValue'](_0x547260){let [_0x5816a1,_0x233a46]=[-1,-1];if(!_0x547260)return {'row':_0x5816a1,'column':_0x233a46};for(let _0x464868=0x0;_0x464868<this['table']['length'];_0x464868++){const _0x319cde=this['table'][_0x464868];for(let _0x235b00=0x0;_0x235b00<_0x319cde['length'];_0x235b00++){if(typeof _0x547260==='string'){if(_0x319cde[_0x235b00]===_0x547260)return {'row':_0x464868,'column':_0x235b00};}else {if(_0x319cde[_0x235b00]){if(_0x319cde[_0x235b00]===_0x547260)return {'row':_0x464868,'column':_0x235b00};}}}}return {'row':_0x5816a1,'column':_0x233a46};}async['validate'](){const _0x54d533=[],_0x46b54b=[];try{await this['assertInitialized']()['then'](()=>{_0x54d533['push']('Table\x20is\x20initialized.');})['catch'](_0xdd9a7e=>_0x46b54b['push'](_0xdd9a7e));if(_0x46b54b['length']>0x0)throw 'Cannot\x20validate\x20uninitialized\x20table.';await this['validateFields'](_0x54d533,_0x46b54b);const {success:_0x16a39c,message:_0x11ced0,error:_0x299863,data:_0xd1d452}=await this['toJson']();if(!_0xd1d452)throw 'Cannot\x20access\x20Json\x20Object\x20data.';_0x54d533['push'](..._0xd1d452['validMsgs']),_0x46b54b['push'](..._0xd1d452['tableErrors']);const {jsonObj:_0x41ebe6}=_0xd1d452;for(const _0x2d4fc6 of this['validators']){await _0x2d4fc6['validate'](_0x54d533,_0x46b54b,this,_0x41ebe6);}let _0x5ae36b=this['name']+'\x20ran\x20its\x20validations.';if(_0x54d533['length']>0x0)_0x5ae36b+='\x20'+_0x54d533['length']+'\x20validations\x20were\x20successful.';if(_0x46b54b['length']>0x0)_0x5ae36b+='\x20'+_0x46b54b['length']+'\x20validations\x20failed.';return {'success':!![],'message':_0x5ae36b,'data':{'validMsgs':_0x54d533,'tableErrors':_0x46b54b}};}catch(_0x2ca3ed){return _0x46b54b['push']({'error':this['name']+'\x20failed\x20to\x20run\x20all\x20its\x20validations.','from':this['name']['toUpperCase']()+'_VALIDATE','cause':_0x2ca3ed}),{'success':![],'message':this['name']+'\x20failed\x20to\x20run\x20all\x20its\x20validations.','data':{'validMsgs':_0x54d533,'tableErrors':_0x46b54b}};}}['useValidator'](_0x5110d6){this['validators']['push'](_0x5110d6);}}
|
|
45
45
|
|
|
46
|
-
class DTValidator{['name'];constructor(
|
|
46
|
+
class DTValidator{['name'];constructor(_0x1b5672){this['name']=_0x1b5672;}['getName'](){return this['name'];}['report'](_0x600f55,_0x35d463,_0x2a1658){if(_0x600f55['length']>0x0)_0x2a1658['push'](..._0x600f55);else _0x35d463['push'](this['name']+'\x20successfully\x20validated.');}}
|
|
47
47
|
|
|
48
|
-
class LastILOTaxo extends DTValidator{constructor(){super('LAST_ILO_TAXO');}async['validate'](
|
|
48
|
+
class LastILOTaxo extends DTValidator{constructor(){super('LAST_ILO_TAXO');}async['validate'](_0x271952,_0x3013f4,_0xa8ced6,_0x1a0139){const _0x2834d2=[];if(!_0x1a0139){_0x3013f4['push']({'error':'Unable\x20to\x20access\x20COAEP\x20object.','from':this['name']});return;}for(let _0x4a4cca=0x0;_0x4a4cca<_0x1a0139['co']['length'];_0x4a4cca++){const _0x16e362=_0x1a0139['co'][_0x4a4cca];if(!_0x16e362){const {row:_0x311d04,column:_0x47a426}=await _0xa8ced6['findValue'](_0x4a4cca+0x1+'');_0x2834d2['push']({'error':'No\x20CO\x20Statement\x20for\x20CO\x20'+(_0x4a4cca+0x1)+'.','row':_0x311d04,'column':_0x47a426+0x1,'from':this['name']});continue;}if(!_0x16e362?.['ilo']){const {row:_0x19a94b,column:_0x570c36}=await _0xa8ced6['findValue'](_0x16e362['statement']);_0x2834d2['push']({'error':'No\x20ILOs\x20for\x20CO\x20'+(_0x4a4cca+0x1)+'.','row':_0x19a94b,'column':_0x570c36,'from':this['name']});continue;}const _0x1f86d6=_0x16e362['ilo']['length']-0x1,_0x173dbc=_0x16e362['ilo'][_0x1f86d6];if(!_0x173dbc['taxonomy_level']){const {row:_0x2cd01c,column:_0x2dbaa2}=await _0xa8ced6['findValue'](_0x173dbc['statement']);_0x2834d2['push']({'error':'Last\x20ILO\x20for\x20CO\x20'+(_0x4a4cca+0x1)+'\x20has\x20no\x20Taxonomy\x20Level.','row':_0x2cd01c,'column':_0x2dbaa2,'from':this['name']});continue;}if(_0x173dbc['taxonomy_level']!==_0x16e362['taxonomy_level']){const {row:_0x73e929,column:_0x32c960}=await _0xa8ced6['findValue'](_0x173dbc['statement']);_0x2834d2['push']({'error':'Last\x20ILO\x20for\x20CO\x20'+(_0x4a4cca+0x1)+'\x20does\x20not\x20match\x20the\x20CO\x27s\x20Taxonomy\x20Level.\x20('+_0x173dbc['taxonomy_level']+'\x20!==\x20'+_0x16e362['taxonomy_level']+')','row':_0x73e929,'column':_0x32c960,'from':this['name']});}}this['report'](_0x2834d2,_0x271952,_0x3013f4);}}
|
|
49
49
|
|
|
50
|
-
const whitelist=['applying','analyzing','evaluating','creating'];class MinCOtaxo extends DTValidator{constructor(){super('MIN_CO_TAXO');}async['validate'](
|
|
50
|
+
const whitelist=['applying','analyzing','evaluating','creating'];class MinCOtaxo extends DTValidator{constructor(){super('MIN_CO_TAXO');}async['validate'](_0x463ba7,_0x2e2912,_0x31c854,_0x5c7e3c){const _0x1bceef=[];if(!_0x5c7e3c){_0x2e2912['push']({'error':'Unable\x20to\x20access\x20COAEP\x20object.','from':this['name']});return;}for(let _0x108e5c=0x0;_0x108e5c<_0x5c7e3c['co']['length'];_0x108e5c++){const _0x191bd7=_0x5c7e3c['co'][_0x108e5c];if(!_0x191bd7['taxonomy_level']){_0x1bceef['push']({'error':'No\x20taxonomy\x20level\x20for\x20CO\x20'+(_0x108e5c+0x1),'from':this['name']});continue;}if(!whitelist['includes'](_0x191bd7['taxonomy_level'])){const {row:_0x3e52a5,column:_0x48d26a}=await _0x31c854['findValue'](_0x191bd7['statement']);let _0x23a897={'error':'Cannot\x20have\x20CO\x20Taxonomy\x20Level\x20of\x20lower\x20than\x20Applying:\x20'+_0x191bd7['taxonomy_level']['toUpperCase'](),'from':this['name']};(_0x3e52a5!==-1||_0x48d26a!==-1)&&(_0x23a897['row']=_0x3e52a5,_0x23a897['column']=_0x48d26a),_0x1bceef['push'](_0x23a897);}}this['report'](_0x1bceef,_0x463ba7,_0x2e2912);return;}}
|
|
51
51
|
|
|
52
|
-
const taxoOrder={'remembering':0x1,'understanding':0x2,'applying':0x3,'analyzing':0x4,'evaluating':0x5,'creating':0x6};class ILOTaxoOrder extends DTValidator{constructor(){super('ILO_TAXO_ORDER');}async['validate'](
|
|
52
|
+
const taxoOrder={'remembering':0x1,'understanding':0x2,'applying':0x3,'analyzing':0x4,'evaluating':0x5,'creating':0x6};class ILOTaxoOrder extends DTValidator{constructor(){super('ILO_TAXO_ORDER');}async['validate'](_0x33f9e1,_0x3ea3cf,_0xea50b6,_0x26c2e1){const _0x3326d3=[];if(!_0x26c2e1){_0x3ea3cf['push']({'error':'Unable\x20to\x20access\x20COAEP\x20object.','from':this['name']});return;}for(let _0x68b936=0x0;_0x68b936<_0x26c2e1['co']['length'];_0x68b936++){const _0x42117c=_0x26c2e1['co'][_0x68b936];if(!_0x42117c){const {row:_0x3a56b3,column:_0x48e8e0}=await _0xea50b6['findValue'](_0x68b936+0x1+'');_0x3326d3['push']({'error':'No\x20CO\x20Statement\x20for\x20CO\x20'+(_0x68b936+0x1)+'.','row':_0x3a56b3,'column':_0x48e8e0+0x1,'from':this['name']});continue;}if(!_0x42117c?.['ilo']){const {row:_0x3e56c1,column:_0x79f598}=await _0xea50b6['findValue'](_0x42117c['statement']);_0x3326d3['push']({'error':'No\x20ILOs\x20for\x20CO\x20'+(_0x68b936+0x1)+'.','row':_0x3e56c1,'column':_0x79f598,'from':this['name']});continue;}const _0xe5d065=await _0xea50b6['findValue'](_0x42117c['ilo'][0x0]['statement']),_0x3166d9=_0x42117c['ilo']['map'](_0x3f81d2=>taxoOrder[_0x3f81d2['taxonomy_level']]);let _0x10ec04=_0x3166d9[0x0];for(let _0x5e9b5f=0x1;_0x5e9b5f<_0x3166d9['length'];_0x5e9b5f++){if(_0x3166d9[_0x5e9b5f]<_0x10ec04){_0x3326d3['push']({'error':'Under\x20CO\x20'+(_0x68b936+0x1)+',\x20ILO\x20'+(_0x5e9b5f+0x1)+'\x20should\x20not\x20have\x20a\x20taxonomy\x20level\x20lower\x20than\x20ILO\x20'+_0x5e9b5f+'\x27s.','row':_0xe5d065['row'],'column':_0xe5d065['column']+_0x5e9b5f,'from':this['name']});continue;}_0x10ec04=_0x3166d9[_0x5e9b5f];}}this['report'](_0x3326d3,_0x33f9e1,_0x3ea3cf);}}
|
|
53
53
|
|
|
54
|
-
const minPerfTarget=0x32,minPassScore=0x32;class MinPerfTarget extends DTValidator{constructor(){super('MIN_PERF_TARGET');}async['validate'](
|
|
54
|
+
const minPerfTarget=0x32,minPassScore=0x32;class MinPerfTarget extends DTValidator{constructor(){super('MIN_PERF_TARGET');}async['validate'](_0x529569,_0x4df37f,_0x24fa9a,_0x113293){const {success:_0xd876c3,data:_0x2cbf22}=_0x24fa9a['getTable'](),_0x3b5f1a=[];if(!_0xd876c3){_0x3b5f1a['push']({'error':'Failed\x20to\x20access\x20table\x20data.','from':this['name']});return;}const {table:_0x3899d2}=_0x2cbf22;for(let _0xee9ebe=0x0;_0xee9ebe<_0x3899d2['length'];_0xee9ebe++){const _0x59d04e=_0x3899d2[_0xee9ebe],[_0x2890ff,_0x433552]=_0x59d04e[0x4];if(!_0x2890ff)_0x3b5f1a['push']({'error':'Performance\x20target\x20is\x20required.','row':_0xee9ebe,'column':0x4,'from':this['name']});else _0x2890ff<minPerfTarget&&_0x3b5f1a['push']({'error':'Performance\x20target\x20must\x20be\x20at\x20least\x20'+minPerfTarget+'.','row':_0xee9ebe,'column':0x4,'from':this['name']});if(!_0x433552)_0x3b5f1a['push']({'error':'Pass\x20score\x20is\x20required.','row':_0xee9ebe,'column':0x6,'from':this['name']});else _0x433552<minPassScore&&_0x3b5f1a['push']({'error':'Pass\x20score\x20must\x20be\x20at\x20least\x20'+minPassScore+'.','row':_0xee9ebe,'column':0x6,'from':this['name']});}this['report'](_0x3b5f1a,_0x529569,_0x4df37f);}}
|
|
55
55
|
|
|
56
|
-
class CoaepDT extends DataTable{['faculty']=null;['course']=null;['sy']=null;['semester']=null;constructor(){super('CoaepDT'),this['useValidator'](new MinCOtaxo()),this['useValidator'](new LastILOTaxo()),this['useValidator'](new ILOTaxoOrder()),this['useValidator'](new MinPerfTarget());}async['validateFields'](
|
|
56
|
+
class CoaepDT extends DataTable{['faculty']=null;['course']=null;['sy']=null;['semester']=null;constructor(){super('CoaepDT',['No.','Course\x20Outcome\x20Statement','Intended\x20Learning\x20Outcome','Assessment\x20Tool','Performance\x20Target']),this['useValidator'](new MinCOtaxo()),this['useValidator'](new LastILOTaxo()),this['useValidator'](new ILOTaxoOrder()),this['useValidator'](new MinPerfTarget());}async['validateFields'](_0x5986dc,_0xea77d3){const _0x1d7a51=[];let _0x8f3c0c=null,_0x158f7f=null;for(let _0x2d165d=0x0;_0x2d165d<this['table']['length'];_0x2d165d++){const _0x1125de=[],_0x4dd25a=this['table'][_0x2d165d],_0x33e932=_0x4dd25a[0x0]||_0x8f3c0c,_0x25cf3a=_0x4dd25a[0x1]||_0x158f7f,_0x4d41dd=_0x4dd25a[0x2],_0x589970=_0x4dd25a[0x3],_0x101119=_0x4dd25a[0x4];if(!_0x33e932)_0x1125de['push'](0x0);if(!_0x25cf3a)_0x1125de['push'](0x1);if(!_0x4d41dd)_0x1125de['push'](0x2);if(!_0x589970)_0x1125de['push'](0x3);if(!_0x101119)_0x1125de['push'](0x4);if(_0x158f7f!==_0x25cf3a)this['validateObjectiveGrammar'](_0x25cf3a,_0x2d165d,0x1,_0xea77d3);_0x8f3c0c=_0x33e932,_0x158f7f=_0x25cf3a;for(const _0x1ca0fb of _0x1125de){_0x1d7a51['push']({'error':'Missing\x20field:\x20'+this['headers'][_0x1ca0fb],'row':_0x2d165d,'column':_0x1ca0fb});}if(_0x4d41dd)this['validateObjectiveGrammar'](_0x4d41dd,_0x2d165d,0x2,_0xea77d3);}if(_0x1d7a51['length']>0x0)_0xea77d3['push'](..._0x1d7a51);else _0x5986dc['push'](this['name']+'\x20successfully\x20validated\x20all\x20fields.');}async['fromCSVString'](_0x389a0f){try{const _0x52aa9e=[],_0x4f5a76=_0xbd7909['parse'](_0x389a0f,{'skipEmptyLines':![]})['data'],{headerRowIndex:_0x286385,coIdx:_0x763876,iloIdx:_0x2549b7,assessToolIdx:_0x391f54,perfTargetIdx:_0x5e5343}=getCoaepHeader(_0x4f5a76);if(_0x286385===-0x1)throw new Error('Could\x20not\x20auto-detect\x20header\x20row.\x20Please\x20ensure\x20the\x20CSV\x20file\x20is\x20in\x20the\x20correct\x20COAEP\x20format.');_0x4f5a76['forEach'](_0x31f3e5=>{const _0x418c72=_0x31f3e5['indexOf']('Name\x20of\x20Faculty:'),_0x2ae9e1=_0x31f3e5['indexOf']('School\x20Year'),_0xd48eed=_0x31f3e5['indexOf']('Course:'),_0x365274=_0x31f3e5['indexOf']('Semester');_0x418c72!==-0x1&&(this['faculty']=_0x31f3e5[_0x418c72+0x1]?.['trim']()||this['faculty']);_0x2ae9e1!==-0x1&&(this['sy']=_0x31f3e5[_0x2ae9e1+0x1]?.['trim']()||this['sy']);_0xd48eed!==-0x1&&(this['course']=_0x31f3e5[_0xd48eed+0x1]?.['trim']()||this['course']);if(_0x365274!==-0x1){const _0x18a22c=_0x31f3e5[_0x365274+0x1]?.['trim']()||'',_0x2fddec=_0x18a22c['match'](/\d+/)?.[0x0];this['semester']=_0x2fddec?parseInt(_0x2fddec,0xa):this['semester'];}});for(let _0x34a433=0x0;_0x34a433<=_0x4f5a76['length'];_0x34a433++){const _0x31da17=_0x4f5a76[_0x34a433];if(!_0x31da17)break;if(_0x34a433<=_0x286385)continue;let _0x1d26e7=_0x31da17[_0x763876-0x1]?.['trim']()||'',_0x2c94f9=_0x31da17[_0x763876]?.['trim']()||'';/^\d+$/['test'](_0x31da17[_0x763876]?.['trim']()||'')&&(_0x1d26e7=_0x31da17[_0x763876]?.['trim']()||'',_0x2c94f9=_0x31da17[_0x763876+0x1]?.['trim']()||'');const _0x172660=_0x31da17[_0x5e5343]?.['replace'](/\s+/g,'\x20')['trim']()||'',{performance_target:_0x23514c,passing_score:_0x2166db}=performaceTarget(_0x172660);if(_0x31da17[_0x2549b7])_0x52aa9e['push']([_0x1d26e7,_0x2c94f9,_0x31da17[_0x2549b7]?.['trim']()||'',_0x31da17[_0x391f54]?.['replace'](/^ILO\d+[:.]?\s*/,'')['trim']()||'',[_0x23514c,_0x2166db]]);else break;}return {'success':!![],'message':'Successfully\x20converted\x20COAEP\x20datatable.','data':_0x52aa9e};}catch(_0x35abf2){return {'success':![],'message':'Error\x20parsing\x20COAEP\x20table','error':_0x35abf2};}}async['toJson'](){const _0x2e55cd=[],_0x5efcf2=[],_0x57de83='COAEPDT_TO_JSON';try{await this['assertInitialized']();const _0x10b339={'faculty':this['faculty'],'course':this['course'],'sy':this['sy'],'semester':this['semester'],'co':[]};let _0x3b0b0b=null,_0x3576bb='',_0x468d7e=[null,null];this['table']['forEach']((_0x13ea68,_0xf4a1a9)=>{if(_0xf4a1a9===0x0&&!_0x13ea68[0x1])_0x5efcf2['push']({'error':'Cannot\x20have\x20empty\x20CO\x20Statement\x20in\x20first\x20row.','row':0x0,'column':0x1,'from':_0x57de83});_0x13ea68[0x1]&&(_0x3576bb='',_0x468d7e=[null,null]);const _0x167fdb=_0x13ea68[0x1],_0x491f33=_0x13ea68[0x2],_0x19579b=_0x13ea68[0x3]||_0x3576bb,_0x3d1cb8=_0x13ea68[0x4]||_0x468d7e;if(!_0x491f33)_0x5efcf2['push']({'error':'Cannot\x20have\x20empty\x20ILO.','row':0x1,'column':0x2,'from':_0x57de83});if(!_0x19579b)_0x5efcf2['push']({'error':'Cannot\x20have\x20empty\x20Assessment\x20Tool.','row':_0xf4a1a9,'column':0x3,'from':_0x57de83});if(!_0x3d1cb8)_0x5efcf2['push']({'error':'Cannot\x20have\x20empty\x20Performance\x20Target.','row':_0xf4a1a9,'column':0x4,'from':_0x57de83});if(_0x13ea68[0x1]){const {cognitive_level:_0x4dfc0,taxonomy_level:_0x3660ef,verb:_0x1012b8}=extractFromObjective(_0x167fdb),_0x33d65b={'statement':_0x167fdb,'ilo':[],'taxonomy_level':_0x3660ef,'cognitive_level':_0x4dfc0,'verb':_0x1012b8};_0x3b0b0b=_0x33d65b,_0x10b339['co']['push'](_0x33d65b);}const {cognitive_level:_0x23c8e2,taxonomy_level:_0x566487,verb:_0x4601b5}=extractFromObjective(_0x491f33),[_0x20bfd4,_0x20e29f]=_0x3d1cb8,_0x3b0e02={'statement':_0x491f33,'assessment_tool':_0x19579b,'performance_target':_0x20bfd4,'passing_score':_0x20e29f,'cognitive_level':_0x23c8e2,'taxonomy_level':_0x566487,'verb':_0x4601b5};_0x3b0b0b['ilo']['push'](_0x3b0e02);});if(_0x5efcf2['length'])return _0x5efcf2['push']({'error':'Converted\x20COAEP\x20datatable\x20to\x20JSON,\x20but\x20with\x20errors.','from':_0x57de83}),{'success':![],'message':'Converted\x20COAEP\x20datatable\x20to\x20JSON,\x20but\x20with\x20errors.','data':{'jsonObj':_0x10b339,'validMsgs':_0x2e55cd,'tableErrors':_0x5efcf2}};return _0x2e55cd['push']('Successfully\x20converted\x20COAEP\x20datatable\x20to\x20JSON.'),{'success':!![],'message':'Successfully\x20converted\x20COAEP\x20datatable\x20to\x20JSON','data':{'jsonObj':_0x10b339,'validMsgs':_0x2e55cd,'tableErrors':_0x5efcf2}};}catch(_0x51ecd0){return _0x5efcf2['push']({'error':'Error\x20converting\x20COAEP\x20datatable\x20to\x20JSON','from':_0x57de83}),{'success':![],'message':'Error\x20converting\x20COAEP\x20datatable\x20to\x20JSON','error':_0x51ecd0,'data':{'jsonObj':null,'tableErrors':_0x5efcf2}};}}['validateObjectiveGrammar'](_0x4d7cca,_0x2fd5c2,_0x19b0d1,_0x1c3828){const {cognitive_level:_0x2f2bc4,taxonomy_level:_0x2f46db,verb:_0x569453}=extractFromObjective(_0x4d7cca),_0xc6ec5e=[];if(!_0x2f2bc4)_0xc6ec5e['push']('cognitive_level');if(!_0x2f46db)_0xc6ec5e['push']('taxonomy_level');if(!_0x569453)_0xc6ec5e['push']('verb');if(!_0xc6ec5e['length'])return;_0x1c3828['push']({'error':'Cannot\x20find\x20fields:\x20'+_0xc6ec5e['join'](',\x20')+'.','row':_0x2fd5c2,'column':_0x19b0d1,'from':this['name']['toUpperCase']()+'_OBJ_GRAMMAR'});}}
|
|
57
57
|
|
|
58
|
-
class Client{['BASE_URL'];constructor(
|
|
58
|
+
class Client{['BASE_URL'];constructor(_0x4deaae){this['BASE_URL']=_0x4deaae;}['Parser'](){return {'curriculum':async _0x4815a5=>{const _0x5833a7=await uploadCurriculum(this['BASE_URL'],_0x4815a5);return _0x5833a7;},'courseOffering':async _0x4cf8d0=>{const _0x256345=await uploadCourseOffering(this['BASE_URL'],_0x4cf8d0);return _0x256345;},'coaep':async(_0x1f620b,_0x633e4a)=>{const _0x57d6e4=await uploadCOAEP(this['BASE_URL'],_0x1f620b,_0x633e4a);return _0x57d6e4;},'enrolledStudent':async _0x527a6c=>{const _0x251ee7=await uploadEnrolledStudent(this['BASE_URL'],_0x527a6c);return _0x251ee7;},'classlist':async(_0x43e1d5,_0x186895,_0x408198)=>{const _0x5a7fa2=await uploadClassList(this['BASE_URL'],_0x43e1d5,_0x186895,_0x408198);return _0x5a7fa2;},'assessmentData':async _0x4808b5=>{const _0x12f4a5=await uploadAssessmentData(this['BASE_URL'],_0x4808b5);return _0x12f4a5;},'deptFaculty':async _0x4fbd8c=>{const _0x573a6f=await uploadDeptFaculty(this['BASE_URL'],_0x4fbd8c);return _0x573a6f;},'poaep':async(_0x5e39d2,_0x3453d5,_0x702b80,_0x48384d)=>{const _0xe1167c=await uploadPOAEP(this['BASE_URL'],_0x5e39d2,_0x3453d5,_0x702b80,_0x48384d);return _0xe1167c;},'CoaepDT':CoaepDT};}}
|
|
59
59
|
|
|
60
60
|
export { Client as default };
|