HSU's course menu block
Views:
http://cdc.humboldt.edu/moodle/course/view.php?id=3
hacks
./blocks/course_menu.php:
...
if (isteacher($this->course->id)) {
/*if (isediting($this->course->id)) {
print_xtree_item('tree','edit',get_string('turneditingoff'),"view.php?id=". $this->course->id . "&edit=off",'',"$CFG->pixpath/i/edit.gif", 'alt="alt"'); //add edit item
}
else {
print_xtree_item('tree','edit',get_string('turneditingon'),"view.php?id=" . $this->course->id . "&edit=on",'',"$CFG->pixpath/i/edit.gif"); //add edit item
}*/
}
...
//print the calendar link
//trouble ticket link
//print_xtree_item('tree','troubleticket',get_string('title', 'block_trouble_ticket'),"{$CFG->wwwroot}/blocks/trouble_ticket/form.php?id={$this->course->id}", '', "$CFG->wwwroot/blocks/trouble_ticket/icons/bug.gif");
...
/*if (isediting($this->course->id)) {
$text .='<tr class="webfx-tree-item"><td align="center"><img src="'.$CFG->pixpath.'/i/edit.gif" alt="'.get_string('turneditingoff').'" /></td>';
$text .='<td valign="top"><a href="view.php?id='.$this->course->id.'&edit=off">'.get_string('turneditingoff').'</a></td></tr>';
}
else {
$text .='<tr class="webfx-tree-item"><td align="center"><img src="'.$CFG->pixpath.'/i/edit.gif" alt="'.get_string('turneditingon').'" /></td>';
$text .='<td valign="top"><a href="view.php?id='.$this->course->id.'&edit=on">'.get_string('turneditingon').'</a></td></tr>';
}*/
...
./blocks/course_menu/controls/control.php:
$action = $_GET['action'];
optional_variable($action, 'mcp');
./blocks/course_menu/controls/mcp.html:
...
// Deleted Change Password row from the table
...
<tr>
<?php
print '<td align="center"><img src="'.$CFG->pixpath.'/i/stats.gif" alt="'.get_string('reports', 'block_course_menu').'" align="texttop" /></td>';
print '<td><a href="'.$CFG->wwwroot.'/course/report.php?id='.$course->id.'">'.get_string('reports', 'block_course_menu').'</a></td>';
?>
<td><?php print_string('logsdesc', 'block_course_menu');?></td>
</tr>
<tr>
<?php
print '<td align="center"><img src="'.$CFG->pixpath.'/i/questions.gif" alt="'.get_string('questions', 'block_course_menu').'" align="texttop" /></td>';
print '<td><a href="'.$CFG->wwwroot.'/course/questions.php?id='.$course->id.'">'.get_string('questions', 'block_course_menu').'</a></td>';
?>
<td><?php print_string('questionsdesc', 'block_course_menu');?></td>
</tr>
...
./blocks/course_menu/controls/oc.html:
...
<tr>
<?php
print '<td align="center"><img src="'.$CFG->pixpath.'/i/return.gif" alt="'.get_string('resetcourse', 'block_course_menu').'" align="texttop" /></td>';
print '<td><a href="'.$CFG->wwwroot.'/course/reset.php?id='.$course->id.'">'.get_string('resetcourse', 'block_course_menu').'</a></td>';
?>
<td><?php print_string('resetcoursedesc','block_course_menu');?></td>
</tr>
./lang/en_utf8/block_course_menu.php:
... $string['logsdesc'] = 'This link will show you the useage reports for your course. You can see which students have been active and what they have been doing in the logs. '; ... $string['resetcourse'] = 'Reset Course'; $string['resetcoursedesc'] = 'This page allows you to empty a course of user data, while retaining the activities and other settings. Please be warned that by choosing items below and submitting this page you will delete your chosen user data from this course forever!'; $string['questions'] = 'Questions'; $string['questionsdesc'] = 'Question pools';
