Easier Course Navigation
Charles Kelly's Moodle Things

Why Do This

  • For long courses, it's a good idea to get students to only display one week's lesson. This encourages them to do so.
  • It makes it easier for both the teacher and the student.

Screenshots (size = 80%, png8, 8 colors)

Image with "select choice" closed

Image with "select choice" open

About the Code

  • You can use both or only one of these.
  • Copy the code, then paste it into the top of the course as a "label."
  • You'll need to manually change the course ID for each course that you paste this into.
    • Change the 59 to your course ID
    • You can do this with a "find and replace all" command in your text editor.
  • The code will be slightly different for a course in "topic" format.
    • The easiest way to get the code is to ...
      • Display just one week's lesson. (Click the "box" icon in the right side part of the lesson's box.)
      • List the source HTML and copy the appropriate code. It's near the bottom.

The Code for Clickable Links

<center><a href="view.php?id=59&week=1">1</a>,
<a href="view.php?id=59&week=2">2</a>,
<a href="view.php?id=59&week=3">3</a>,
<a href="view.php?id=59&week=4">-</a>,
<a href="view.php?id=59&week=5">-</a>,
<a href="view.php?id=59&week=6">4</a>,
<a href="view.php?id=59&week=7">5</a>,
<a href="view.php?id=59&week=8">6</a>,
<a href="view.php?id=59&week=9">7</a>,
<a href="view.php?id=59&week=10">8</a>,
<a href="view.php?id=59&week=11">9</a>,
<a href="view.php?id=59&week=12">10</a>,
<a href="view.php?id=59&week=13">11</a>,
<a href="view.php?id=59&week=14">12</a>,
<a href="view.php?id=59&week=15">13</a>,
<a href="view.php?id=59&week=16">14</a>,
<a href="view.php?id=59&week=17">15</a>,
<a href="view.php?id=59&week=0">[ Show All ]</a></center>

The Code of the "Select Option" Menu

<script type="text/javascript">
function gu(form){
var ur=form.s.selectedIndex;
top.location.href=form.s.options[ur].value;
}
</script>

<center><form><select name="s" onChange="gu(this.form)" size=1>
<option value="#"> ...</option>
<option value="view.php?id=59&week=0">٤Ƥνɽ</option>
<option value="view.php?id=59&amp;week=1"> 1 | Lesson 1 04/9 - 04/15</option>
<option value="view.php?id=59&amp;week=2"> 2 | Lesson 2 04/16 - 04/22</option>
<option value="view.php?id=59&amp;week=3"> 3 | Lesson 3 04/23 - 04/29</option>
<option value="view.php?id=59&amp;week=4"> 4 | Golden Week 04/30 - 05/6</option>
<option value="view.php?id=59&amp;week=5"> 5 | Golden Week 05/7 - 05/13</option>
<option value="view.php?id=59&amp;week=6"> 6 | Lesson 4 05/14 - 05/20</option>
<option value="view.php?id=59&amp;week=7"> 7 | Lesson 5 05/21 - 05/27</option>
<option value="view.php?id=59&amp;week=8"> 8 | Lesson 6  05/28 - 06/3 </option>
<option value="view.php?id=59&amp;week=9"> 9 | Lesson 7  06/4 - 06/10 ** Test **</option>
<option value="view.php?id=59&amp;week=10"> 10 | Lesson 8 06/11 - 06/17</option>
<option value="view.php?id=59&amp;week=11"> 11 | Lesson 9 06/18 - 06/24</option>
<option value="view.php?id=59&amp;week=12"> 12 | Lesson 10 06/25 - 07/1</option>
<option value="view.php?id=59&amp;week=13"> 13 | Lesson 11 07/2 - 07/8</option>
<option value="view.php?id=59&amp;week=14"> 14 | Lesson 12 07/9 - 07/15</option>
<option value="view.php?id=59&amp;week=15"> 15 | Lesson 13 07/16 - 07/22</option>
<option value="view.php?id=59&amp;week=16"> 16 | Lesson 14 07/23 - 07/29</option>
<option value="view.php?id=59&amp;week=17"> 17 | Lesson 15 07/30 ** Final Test **</option>
</select></form>
</center>

Note

  • I actually don't use the above method now, since I found this useful block that I hacked a bit for Moodle 1.7 & 1.8. I also made a few other changes.
    • It's the Course Menu block developed by Humbold University
    • http://cdc.humboldt.edu/moodle/course/view.php?id=3&topic=2%20alt=Blocks
    • This will also automatically hide the link if a section is hidden. My code above doesn't do that.
    • My changes:
      • Reused default Moodle theme icons, instead of using icons just for this block.
        • It's more intuitive if the same icons are used.
        • I liked their icons, so I might put them into a theme.
      • Disabled the "Administration" link for students and moved appropriate items to the main menu.
        • Profile
        • Grades
        • Participants (now no need to have the "people" block.
      • Redid the "Administration" section for teachers.

Image

This screen shot was done in "teacher" mode, so the "Administration" link is showing.

Things I Discovered After I Did My Hack

I just put the links here so I can read them when I have time.

Page last modified on April 02, 2007, at 09:12 AM
Copyright © 2006-2008 by Charles Kelly
Login