If the number of "items" (lectures, parts, widgets, colors) for an entry (each entry being a "row" in a database table) is known and fixed, there is no reason not to have one column for each of those "items". It can become very difficult to work with as each row can become quite large -- 48 lectures in your example -- but all of the "items" could be readily located by querying for the row (a student, in this case) that you wanted.
Typically you would have a different database layout in which the main entity you wanted was the "student" and for each "student" entity there would be a number of additional entities associated with that "student". These would be the "lectures" and each "lecture" entity would be associated with a "student" and a date. In that situation, you would query the database for a "student" then use a relational database operation called a "join" to locate the student's attendance from the "lectures" table by joining the "student" identifier associated with the "lecture" table record with the name of the "student".
The advantage of this method is that you could create additional entities -- homework assignments turned in, test or examination grades, etc. -- that could then also be located and "joined" to the student in the same fashion. As you add these different entities, instead of having to modify the original table (student name plus 48 lectures) you create new tables ("homework", "tests", "exams") and these tables then contain the student name as one field, and the date and grade as the other fields.
A disadvantage of this method is unneeded complexity. Do you really need an additional table just to hold what cannot change -- the number of weeks in the course is fixed by the calendar and the course schedule? You have to make that decision -- if the "student attendance" database must be applied to other course, with other schedules, you have no choice but to add that complexity. If this is simply a one-off task for a single course, the complexity buys you nothing down the road.
As Kyser said, study up on Relational Database theory.