Forum archive 2000-2006

Lars Jensen - Layout of course listing page

Lars Jensen - Layout of course listing page

by Arnold Pizer -
Number of replies: 0
inactiveTopicLayout of course listing page topic started 1/21/2005; 12:11:57 PM
last post 1/30/2005; 2:19:26 PM
userLars Jensen - Layout of course listing page  blueArrow
1/21/2005; 12:11:57 PM (reads: 1100, responses: 2)
Hi,

Is there any way of controlling the course listing page (e.g the http://server/webwork2/ page? There is no need to have the Course administration course show on this page - it's only an invitation to students to poke around -and I'd like to remove that link. I'd also like to have the ability to "hide" courses from the listing. Is this possible? Or can one change the name of this course to have it "blend in"?

Thanks,

Lars.

<| Post or View Comments |>


userDavide P. Cervone - Re: Layout of course listing page  blueArrow
1/23/2005; 12:08:49 PM (reads: 1334, responses: 0)
I had the same concern over the admin course, and so one of the first things I did with WW2 was modify the home page.

It's not trivial, but it's not too hard (if you are comfortable writing perl code). The home page is generated by webwork2/lib/WeBWorK/ContentGenerator/Home.pm, and you can modify this file to put out whatever text you want for your home page. In particular, you can remove teh admin course, if nothing else.

For our site, I wanted only the current term's courses to be shown, and to have past courses listed on a separate page. (We also have "library" courses that are associated with the various problem libraries and have all the problems available as separate homework sets to make it easier for faculty to see if there is anything in them that they want. These library courses are listed on a third, hidden page, but that's another story).

We use a special naming convention that includes the year and term as part of the course identifier, so the Home.pm file looks through the courses and only shows the ones that match the current term. (The past course page listest all the older term courses.) Anything that doesn't match the current term is not shown, so you can have "hidden" courses simply by naming them so that they don't have the year and term information in them.

You can see our home page at http://omega.math.union.edu/ if you want to see what it looks like.

I actually didn't change Home.pm, but rather made a copy of it and modified that (since I didn't want to confuse CVS with a file that was so different from the official version; this makes it easier to update WW without worrying about having to fix Home.pm again). But in order to make the copy work as the home page, you need to edit the entry for the home page in webwork2/lib/WeBWorK/URLPath.pm which controls what code is tied to which URLs (this is very cool, and made it easy for me to both modify the home page and add my own extra pages, like the past course page and the library course page). Change the "display" field of the "root" entry in the %pathTypes hash definition. (Yes, Sam, I updated the information at the top of the file when I added the new pages :-)

This is not something I'd recommend for the casual user, but if you are comfortable programming in perl and dealing with the server error files, then it certainly can be done.

Good luck!

Davide

<| Post or View Comments |>


userJohn Jones - Re: Layout of course listing page  blueArrow
1/30/2005; 2:19:26 PM (reads: 1329, responses: 0)
Hi Lars,

Our approach is to not direct people to page http://server/webwork2. If someone stumbles on it, they would see the link to the admin course, but I think this is relatively uncommon. We direct everyone to http://webwork.asu.edu, and set links there by hand. Admittedly, this means some work by hand to reset it every term, but it resolves this problem and makes it easier for our students, since we have so many courses divided between 2 servers.

John

<| Post or View Comments |>