subsection starting point

subsection starting point

by Rudy Scott -
Number of replies: 25

Introduction

I've been lurking around these forums for the last couple weeks or so learning more about moodle and looking for a project I might be able to contribute to. One of the things I've noticed discussed from time to time was the idea of a subsection and I decided this would be very useful in my own course. 

Definition and rationale

By subsection, I mean a new activity module that did not provide any content itself, but rather served as a container object for other activity modules. This would allow arranging content into a hierarchical structure. I do have reservations: one feature I like in moodle is that everything is one page so there's no digging to find. But Ive found that my sections' length has quickly grown unwieldy. Additionally, I think the ability to arrange information in a hierarchy can be inherently useful in teaching by helping to convey a framework for mental organization. Ultimately, it gives more flexibility to the teacher.

Goals

1) Minimal modification to existing moodle code and data structures--make the subsection as self-contained as possible.
2) Leverage existing code to handle display and maintenance of modules.
3) Allow arbitrary creation of subsections and unlimited nesting.

Methodology

The technique used is basically Sean Keogh's trick for pseudo-subsections expanded into a full-blown module. See this discussion and this one. A table is created to store subsection information that includes a link to a newly added row in the course_sections table. These additional sections are "hidden" since they exceed the number of sections defined in the course--but can be viewed through the subsection module. Limitations

I see this activity as a short-term kludge to the problem of subsections. It is inelegant, but I think a more elegant solution may require tighter moodle core code integration. Major issues include:

1) The creation or maintenance of subsections returns you to the main screen rather than the subsection so editing is cumbersome.
2) Deleting a subsection may leave modules "orphaned" (should they just be deleted when the containing subsection is or should there be an interface for "adopting" em?)
3) Pull down navigation menu does not properly label subsections.
4) Some changes were required to course/lib.php.

Changes to course/lib.php

I wanted to keep the left hand column in my subsection view, but its designed to be on a page that exists in the course directory. Changes to lib.php mostly involved replacing relative directory paths with $CFG->wwwroot/course.

Future

In the immediate future, Id like to try to overcome some of the limitations listed above and am looking for suggestions as to how to best do this. In the longer term, working on this subsection project has gotten me thinking about underlying data organization questions. It seems that ideally sections and subsections would be the same beast. A subsection would just be a section with a parent. Sections could be added and deleted from courses just like other modules, instead of by adjusting a course propertysection numbers.

Database proposal: I wonder if it would make sense to create a separate table that correlated sections, modules, and courses in moodle? The current schema stores a modules section with the module record and the contained modules in the section record. But a section is not really an intrinsic characteristic of the module, is it? Wouldn't a separate relational table provide more flexibility in terms of module organization (many-to-many relationships would be possible allowing a module to be listed in multiple sections) and better database normalization (no redundant information spanning tables)?

Perhaps subsections could be implemented together with a complementary new course format? Right now it seems that the course formats are pretty tightly integrated with the core moodle code. The database change above would give course formats more flexibility in how to organize the course. This could help move towards a more modularized course format structure. One possibility, for example, might be that every course format has a function call executed when a new course of that type is created (analogous to a modules add_instance) function. This function call would then create the sections necessary for a particular courses organization. For example, the weekly format would create a section for each week in the course in this function.  End user behavior would be the same, but the underlying code structure would be more flexible.  Course formats could create their own supporting database structures, but would need to provide certain common data functions to properly interface with modulesperhaps through methods similar to how modules now work.  They could query user options through interfaces.  The real power of modules is that they are free to do whatever they want provided they implement certain well-defined functions, and provide certain well-defined data members. Wouldnt it be neat if course formats worked similarly?

Wrap-up

Im pretty new to moodling and I very much appreciate any and all feedback. This is truly an amazing project. Ive been using Moodle in a class I teach and Ive thoroughly enjoyed working with it. Better yet is the positive feedback Ive gotten from students. Thanks to Martin and the community for this terrific system,

--Rudy

Average of ratings: Useful (1)
In reply to Rudy Scott

Re: subsection starting point

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
Thanks, Rudy!

Can you post a screenshot or two?
In reply to Martin Dougiamas

Re: subsection starting point

by Rudy Scott -
Here's showing the main course in editing mode.  One subsection is visible, a second is being added. 
Attachment screen1.jpg
In reply to Martin Dougiamas

Re: subsection starting point

by Rudy Scott -

Here's the update screen for the subsection.

Attachment screen2.jpg
In reply to Martin Dougiamas

Re: subsection starting point

by Rudy Scott -
And my favorite--here's the subsection itself in editing mode with a few modules shown in it:
Attachment screen3.jpg
In reply to Rudy Scott

Re: subsection starting point

by Sean Keogh -
That's pretty damn nifty, Rudy.

I'll be having a play with it as soon as I get a chance.
In reply to Rudy Scott

Re: subsection starting point

by Ger Tielemans -

Moving to a (cascading?) subsection structure, brings Moodle closer to IMS Content Packaging, see: http://www.imsglobal.org/content/packaging/index.cfm

( Would be great if backup grows into an IMS/CP outline import-tool)


First we have to find out if this cascading-mechanism does not destroy the overview that the student gets now from a Moodle course...

In reply to Ger Tielemans

Re: subsection starting point

by Ger Tielemans -

I need more and more a button for a student to make a printout /exceldump of the course-outline.. (now also with subsections..)


Also the navigationbar becomes now more and more important to find your way back in the system. (So visiting a resource must show in the navigationbar the section where you clicked on the resource and NOT the resources area, like it does now)

In reply to Ger Tielemans

Re: subsection starting point

by Rudy Scott -

I believe Jenny Wyatt (sp?) was working on an IMS import tool--at least for use in blackboard courses.  I too am eager to see this as our institution currently has a number of courses in blackboard. 

I agree with you that the overview given by the current moodle format is a really nice feature.  One of the things my students have commented on being better in moodle than blackboard is not having to go looking in lots of different places for stuff to find what they want. 

The bread crumb trail in the navigation bar is a good idea too.  I'll try to work on that for the next release.

--Rudy

In reply to Rudy Scott

Re: subsection starting point

by Ger Tielemans -

Watch out, it is not a problem in your modul but in the central part of Moodle, it happens with ALL the resources..

(I was wondering: Would it help if we make a popup screen of it?) 

In reply to Ger Tielemans

Re: subsection starting point

by Ger Tielemans -
  • When I try to move a task from a main section to a subsection the box is visible in the subsection, but the move fails
  • A subsection in a subsection works also, but the navigationbar does not grow here also..
In reply to Ger Tielemans

Re: subsection starting point

by Rudy Scott -

Try the move again with the updated lib.php file.  I posted the wrong modifications bebfore. blush.  The move should work.  The breadcrumb trail is another matter.... mixed

--Rudy

In reply to Ger Tielemans

Re: subsection starting point

by Ger Tielemans -

It works now after setting the relativ paths in /course/lib.php 

(Side effect: A subsection does not show in view mode when it is empty)

In reply to Rudy Scott

Re: subsection starting point

by Mike Churchward -
Picture of Core developers Picture of Plugin developers Picture of Testers

Hi Rudy -

I did something similar with my set-up. I made some small changes so that every category has a home page, similar to the Moodle home page. A category has a central area that is really a news forum, and can display a configurable number of posts. It would be fairly easy to put links and information down to lower categories/courses.

I also reworked the nav system, so that every category has its own nav box with subcategories and courses contained in it.

I tried to stay away from changing the db structure, so I kludged a new type of course format, I called 'cattop', that I used in the course format field. My code just handles this type of format differently.

mike

In reply to Mike Churchward

Re: subsection starting point

by W Page -

Hi!

This is a really neat and needed addition to enhance the flexibility and custumability (?? word) of MOODLE.

Upon thinking about how I would like to set up a MOODLE site I always felt a need for the ability to break a topic or week into sub-segments versus Categories with Courses.  For example in a Living Environment Course there are several Themes or Topics which have sub-themes or topics

  • Introduction
    • Scientific Method
    • Measurement
      • Liquid
      • Solid
      • Ruler
      • Temperature
    • Laboratory Instruments
  • Chemistry of  Biology (BioChemistry)
    • Components of an Atom
    • Bonding
      • Covalent
      • Ionic
  • ETC........

This makes the flow of information and grading easier. 

  • Subsections along with Questionnaire, Shelf, Lesson, Calculated Columns Gradbook, Appointment Schedule, Calendar (Event) and Bookmark mods - in development
  • Adding images to the Course descriptions
  • Possible development of the ability to peronalized Resource Icons
  • The addition of Instant Messaging,
  • Etc, etc, etc...

WebCT, CourseWorks etc.. will not be able to touch all the MOODLE development noted above (as well as that not noted) for usability and flexibility.  MOODLE v2.0 is going to be a "smoker".  I only hope I can eventually produce a mod that will be useful.

All that money -- $730,000 per year -- could be used to teach students and not pay for software.
http://moodle.org/mod/forum/discuss.php?d=5362

WP1

In reply to Mike Churchward

Re: subsection starting point

by Rudy Scott -

Thanks for this info Mike.  It sounds to me like the modifications were similiar--although if I understand you correctly your changes focused on the category level above the course level--whereas the subsection is meant to be contained within the course. 

I've also tried to avoid any modifictions to the moodle db structure at this point--instead creating a piggyback table for the subsections.  But I do think a db change would be an overal more flexible and elegant design, besides making subsectioning easier.  I may be wrong on this though.

I like you idea of creating individual pages for course categories.  I wonder if that feature could be integrated into the main moodle?

--Rudy

In reply to Rudy Scott

Re: subsection starting point

by W Page -

Hi!

I installed the "subsection" mod.  The database installed with no problem.

However, when I turn editing on, I cannot see it in the "dropdown" Add window.  I do see an additional "moodlename" line.

What should I do to see the "subsection" mod so I can check it out??

I also made an "icon" for it for the site.  I have attached that here for anyone who may want to use it.  It needs to be renamed "icon.gif" and dropped into the "subsection" mod directory.

WP1

Attachment SubSection.gif
In reply to W Page

Re: subsection starting point

by Rudy Scott -

Greetings,

Thanks for making the icon.  The files in the lang/en directory inside subsection need to be moved into the lang/en for moodle.  I should probably change those paths in the zip file.

Note that the links in the left-hand column on the subsection page will not function correctly without making the modifications I discuss above to moodlelib.php manually (or overwriting yours with mine, which I don't recommend).

Thanks!

--Rudy

In reply to Rudy Scott

Re: subsection starting point

by W Page -
Hi!

The site I am on now is relatively new with just one development mod on it. I did not have to change "moodlelib.php" for that mod. So I just copied your "moodlelib.php" over the original one (actually I renamed the original one before copying your file). I also moved the language files as you indicated.

Everything was going well until I clicked on some of the Course admin links in the "SubSection" mod..
  • WORKED
    • Backup
    • Restore
    • Files
    • Help
    • Teacher
  • DID NOT WORK
    • Settings
    • Teachers
    • Students
    • Scales
    • Grades
    • Logs

Is this about how far the mod goes for now. When I clicked on the Course settings links I was getting "404 errors many times.

Smooth up until that point though. smile approve big grin

WP1
In reply to W Page

Re: subsection starting point

by Rudy Scott -

Oh good grief!  My apologies, I must've been working too late.  The file I modified is NOT moodlelib.php--it's course/lib.php blushNo wonder the links aren't working right.  Sorry for the confusion.  Please disregard the moodlelib.php file it doesn't need any changes.  Here's the file that needs changing--this should solve the broken links issue.

--Rudy

In reply to Rudy Scott

Re: subsection starting point

by W Page -

Hello!

I replaced the "course/lib.php" file and the links in the "subsection" mod admin are all working fine now.

NEGATIVE

  • When I get the "Edit Course Settings" page it has all the information for the parent course.  If  I change the course description it also changes on the main test category page on which the courses are listed.  I would think this page should be blank so new information about the SubSection could be configured and posted.
  • It is not possible to change the layout of the SubSection.  If you attempt to change the page layout the page behaves as if it is saving and then goes back to the parent page.

POSITIVE

  • The grades page reflects the presence of the subsections and a column for grades from the subsection.

I wonder if Alvaro's Course Image modification will work here.  Hummmmmm
Image in Course Display for each course
http://moodle.org/mod/forum/discuss.php?d=4793

WP1

In reply to W Page

Re: subsection starting point

by Rudy Scott -

>When I get the "Edit Course Settings" page it has all the information for the
>
parent course.  If  I change the course description it also changes on the main
>test category page on which the courses are listed.  I would think this page
>should be blank so new information about the SubSection could be configured
>and posted.

I'm not sure I understand correctly.  In my view the subsection is just a container object for modules, it is not a seperate entity from the course, but a member of it.  Do you envision it differently?  Thus the course settings apply to the whole course, which the subsection is merely a member of.  If you want to create a description for the subsection, you'd use the edit icon, just as you would for a regular section, or add a label object for additional text.  Course settings apply to the course that owns the subsection, not to the subsection itself.

>It is not possible to change the layout of the SubSection.  If you attempt to
>change the page layout the page behaves as if it is saving and then goes back
> to the parent page

What is page layout?  Where do you change this?

Thanks!

--Rudy

In reply to Rudy Scott

Re: subsection starting point

by W Page -
Hello!

I understand what you are saying. I looked at subsections as a way to give more depth to the presentation of a topic or issue. A description of what you are trying to achieve would be nice but not absolutely necessary. There is a place where this could be listed and that would be the page where the subsections are listed. I am just so happy to now have the option of adding another layer to a course. Much better than BB for sure.

As for the second point. Let us say you want to break down a topic into weeks. As far as the subsection mod is now that cannot be done. In other words lets say in my principal course page, I have made the layout for "topics". However, I want to break up topics (subsec) into weeks. Presently it cannot be done. What if I wanted the week to be broken down into topics (per day). Presently It cannot be done.

I realized this mod is in beta. Also, other folk may not want to have the ability to change layouts in the subsections which differ from the principal site's.

I just want you to know. I think this is just a super mod. From the response you can see it is one many Moodlers find a serious need for. I thank you again for working so hard on this.

WP1
In reply to W Page

Re: subsection starting point

by Rudy Scott -

Greetings,

Thanks for your message and feedback. 

1) Would providing the summary information on the subsections list page address the issue you are talking about?  I've also been considering making the subsections index page into more the type "course outline" that Ger has suggested.  Would this be helpful?  What do others think? 

2) I think I understand now--I've been referring to these as "course formats".  I'm not sure what the best long term solution to this is--I agree that better interfacing between the course format and section/subsection relationship would be a good step forward.  But I think the type of organization you describe (if I understand it correctly) can be accomlished with the existing subsection module (albeit somewhat manually).  For example in my sample course, I used a topic format with 1 section.  In that one section I created some subsections:

1) topic 1
2) topic 2
3) topic 3
4) topic 4

I placed descriptions within these subsections and then added more subsections in each of the topics:

1) week 1
2) week 2
3) week 3

Finally, I added my content within the week subsections.  Is this the type of structure you are talking about?  Or were you envisioning all the weeks being on the same page?

(I'm hoping to work on this mod more this weekend)

--Rudy

In reply to Rudy Scott

Re: subsection starting point

by Ger Tielemans -

For the moment I choose for a simple subsection: I killed the complete left column when subsection shows up, in your view.php.
Subsection is now more comparable with other resourses on the second level.

I try to use in latest1.2beta (CVS):

  • I inserted your files as a modul
  • (I wonder what the folder hierarchy does in the language area)
  • I only changed the relativ paths in the /course/lib.php like in your lib.php.
    (That is the only type of change you made? I see more diffs, but are these yours?)
  • If I choose a new subsection on third level, it nicely hangs under two
  • If we allow theachers to create third level and deeper, the breadcrumbs must be repaired first for these poor students (or somenonemust create an outline-view knipoog )

Thanks again for your nice modul idea glimlach