Hi Vijay,
You will need to enroll them on the same course page for either the elective or on a common page for all electives:
- You could create a course page for each elective and enrol them, or have them enrol themselves. On this page then you'll add your attendance activity.
- Or you could have a common course page where students are put in to elective groups - either by you or by themselves (through the Group Choice plugin). Then in your attendance activity, you could filter by groups.
Catherine