mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
Forums index page, add table headers for section/week MDL-7480
and fixed section_links block for weekscss format
This commit is contained in:
parent
607c1bc1c6
commit
2f8d5316a1
2 changed files with 8 additions and 2 deletions
|
@ -45,7 +45,7 @@ class block_section_links extends block_base {
|
||||||
$course = get_record('course', 'id', $this->instance->pageid);
|
$course = get_record('course', 'id', $this->instance->pageid);
|
||||||
$context = get_context_instance(CONTEXT_COURSE, $course->id);
|
$context = get_context_instance(CONTEXT_COURSE, $course->id);
|
||||||
|
|
||||||
if ($course->format == 'weeks') {
|
if ($course->format == 'weeks' or $course->format == 'weekscss') {
|
||||||
$highlight = ceil((time()-$course->startdate)/604800);
|
$highlight = ceil((time()-$course->startdate)/604800);
|
||||||
$linktext = get_string('jumptocurrentweek', 'block_section_links');
|
$linktext = get_string('jumptocurrentweek', 'block_section_links');
|
||||||
$sectionname = 'week';
|
$sectionname = 'week';
|
||||||
|
|
|
@ -41,6 +41,8 @@
|
||||||
$stryes = get_string('yes');
|
$stryes = get_string('yes');
|
||||||
$strno = get_string('no');
|
$strno = get_string('no');
|
||||||
$strrss = get_string("rss");
|
$strrss = get_string("rss");
|
||||||
|
$strweek = get_string('week');
|
||||||
|
$strsection = get_string('section');
|
||||||
|
|
||||||
$searchform = forum_search_form($course);
|
$searchform = forum_search_form($course);
|
||||||
|
|
||||||
|
@ -310,7 +312,11 @@
|
||||||
|
|
||||||
if ($course->id != SITEID) { // Only real courses have learning forums
|
if ($course->id != SITEID) { // Only real courses have learning forums
|
||||||
// Add extra field for section number, at the front
|
// Add extra field for section number, at the front
|
||||||
array_unshift($learningtable->head, "");
|
if ($course->format == 'weeks' or $course->format == 'weekscss') {
|
||||||
|
array_unshift($learningtable->head, $strweek);
|
||||||
|
} else {
|
||||||
|
array_unshift($learningtable->head, $strsection);
|
||||||
|
}
|
||||||
array_unshift($learningtable->align, "center");
|
array_unshift($learningtable->align, "center");
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue