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&week=1">½µ 1 | Lesson 1 04/9 - 04/15</option>
<option value="view.php?id=59&week=2">½µ 2 | Lesson 2 04/16 - 04/22</option>
<option value="view.php?id=59&week=3">½µ 3 | Lesson 3 04/23 - 04/29</option>
<option value="view.php?id=59&week=4">½µ 4 | Golden Week 04/30 - 05/6</option>
<option value="view.php?id=59&week=5">½µ 5 | Golden Week 05/7 - 05/13</option>
<option value="view.php?id=59&week=6">½µ 6 | Lesson 4 05/14 - 05/20</option>
<option value="view.php?id=59&week=7">½µ 7 | Lesson 5 05/21 - 05/27</option>
<option value="view.php?id=59&week=8">½µ 8 | Lesson 6 05/28 - 06/3 </option>
<option value="view.php?id=59&week=9">½µ 9 | Lesson 7 06/4 - 06/10 ** Test **</option>
<option value="view.php?id=59&week=10">½µ 10 | Lesson 8 06/11 - 06/17</option>
<option value="view.php?id=59&week=11">½µ 11 | Lesson 9 06/18 - 06/24</option>
<option value="view.php?id=59&week=12">½µ 12 | Lesson 10 06/25 - 07/1</option>
<option value="view.php?id=59&week=13">½µ 13 | Lesson 11 07/2 - 07/8</option>
<option value="view.php?id=59&week=14">½µ 14 | Lesson 12 07/9 - 07/15</option>
<option value="view.php?id=59&week=15">½µ 15 | Lesson 13 07/16 - 07/22</option>
<option value="view.php?id=59&week=16">½µ 16 | Lesson 14 07/23 - 07/29</option>
<option value="view.php?id=59&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.