0% found this document useful (0 votes)
16 views3 pages

Moodle Algorithm 25-07-2024

Uploaded by

suseelakumar2558
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views3 pages

Moodle Algorithm 25-07-2024

Uploaded by

suseelakumar2558
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Algorithm for [dbo].

[SubjectwiseRollList_CourseEnrollment_Batchlist]

Procedure Initialization

o Start.

INSERT Operations:

o Insert data into CourseEnrollment table from


CourseRegistrationDetails, AddDropDetails,
AcademicRegisteredCourses, CourseRegistrationDetailsNew(Core),
CourseRegistrationDetailsNew (Elec) when batch is created for the
each Student against the course and period from the table
StudentBatchRollNoDetails

INSERT Data from CourseRegistrationDetails ,AddDropDetails,


AcademicRegisteredCourses, CourseRegistrationDetailsNew(Core),
CourseRegistrationDetailsNew (Elec) and mainly from StudentBatchRollNoDetails

Same column selections, joins, and where conditions, but source table change
AddDropDetails, AcademicRegisteredCourses,
CourseRegistrationDetailsNew(Core), CourseRegistrationDetailsNew (Elec)
instead of CourseRegistrationDetails.

o Select Columns:
 UserName: LOWER(C.RollNo)
 Password: ''
 FirstName: LOWER(C.RollNo)
 LastName: D.FirstName
 Email: CONCAT(LOWER(C.RollNo), '@smail.iitm.ac.in')
 Auth: 'ldap'
 Course: CASE
 When C.BatchNo is not null: Concatenate course
number, batch number, and period.
 Else: Concatenate course number and period.
 CourseId: A.CourseId
 Role: 'student'
 AddDrop: '1'
 Category: A.Period
 SubCategory: CONCAT(SUBSTRING(B.CourseNo, 1, 2), '-',
A.Period)
 Status: '1'
 UpdatedOn: DATEDIFF(s, '1970-01-01 00:00:00',
GETUTCDATE())
 MoodleStatus: '0'
 MoodleUpdate: ''
 LastUpdatedOn: GETDATE()
 Comments: ''

From Tables:

 CoursesInSlot (A)
 CourseMaster (B)
 StudentBatchRollNoDetails (C)
 StudentMaster (D)
 CourseRegistrationDetails (E) (AddDropDetails,
AcademicRegisteredCourses, CourseRegistrationDetailsNew)

Conditions:

 C.UpdatedOn >= CONVERT(VARCHAR(20), GETDATE()-1, 112)


 SUBSTRING(A.Period, 9, 4) >= YEAR(GETDATE())
 YEAR(C.UpdatedOn) = YEAR(GETDATE())

Drop Operations:

o Drop data from CourseEnrollment table based on various conditions.


o AddDrop: '0'
o Where Conditions:
 Record exists in CourseEnrollment with AddDrop = '1'
and course,username and period is same.

Summary

 Handle insertion of student course enrollment records from various tables


into the CourseEnrollment table.
 Handle drop of course enrollment records from the CourseEnrollment table
based on existing records with specific conditions.
When student registered through course registration

The student will be moved to Moodle once course registration approval is done
with course like AE9999: JUL-NOV 2024

After that the batch created for the each student for each course

Once batch created for the student they will move to Moodle with course like
AE9999_1:JUL-NOV 2024

we insert the student will batch and drop the student from Moodle where
batch is created against the student

You might also like