From: gustav_delius Date: Fri, 2 Jul 2004 09:32:17 +0000 (+0000) Subject: site front page can now have a topic section, see http://moodle.org/mod/forum/discuss... X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=5fc2f2fdcbad86ccbbcc1328fc95f2c08f61aaf3;p=moodle.git site front page can now have a topic section, see http://moodle.org/mod/forum/discuss.php?d=9444#45748 --- diff --git a/admin/site.html b/admin/site.html index 163ee0e208..b7a75ab2a1 100644 --- a/admin/site.html +++ b/admin/site.html @@ -66,32 +66,42 @@ -

: - - () +

: + numsections, ""); + ?> + + + +

: + + () - + -

: - - () +

: + + () - + -

: - - () +

: + + () - + -

: - - () +

: + + () - + diff --git a/course/lib.php b/course/lib.php index 90e2178594..9da98c7fe4 100644 --- a/course/lib.php +++ b/course/lib.php @@ -805,7 +805,7 @@ function print_section($course, $section, $mods, $modnamesused, $absolute=false, continue; } echo "id\">". + " href=\"$CFG->wwwroot/course/mod.php?moveto=$mod->id\">". "pixpath/movehere.gif\" ". " alt=\"$strmovehere\" border=\"0\">
\n"; } diff --git a/index.php b/index.php index 4268888035..e8f0a92642 100644 --- a/index.php +++ b/index.php @@ -153,6 +153,65 @@ } echo ''; + + +/// Print Section + if ($site->numsections > 0) { + echo ""; + + /// If currently moving a file then show the current clipboard + if (ismoving($site->id)) { + $stractivityclipboard = strip_tags(get_string("activityclipboard", "", addslashes($USER->activitycopyname))); + $strcancel= get_string("cancel"); + echo ""; + echo ""; + echo ""; + echo ""; + } + + $streditsummary = get_string("editsummary"); + $stradd = get_string("add"); + $stractivities = get_string("activities"); + + $sections = get_all_sections($site->id); + get_all_mods($site->id, $mods, $modnames, $modnamesplural, $modnamesused); + $section = 0; + $thissection = $sections[$section]; + + echo ''; + echo ""; + echo ""; + echo ""; + echo ""; + echo '
cellcontent\" class=\"topicoutlineclip\" width=\"100%\">"; + echo "

"; + echo "$stractivityclipboard  ($strcancel)"; + echo "

"; + echo "
cellheading\" class=\"topicsoutlineside\" valign=top width=20> cellcontent\" class=\"topicsoutlinecontent\" width=\"100%\">"; + + echo format_text($thissection->summary, FORMAT_HTML); + + if ($editing) { + echo "id\">pixpath/t/edit.gif\" ". + " height=11 width=11 border=0 alt=\"$streditsummary\">
"; + } + + echo '
'; + + print_section($site, $thissection, $mods, $modnamesused, true); + + if ($editing) { + echo "
"; + popup_form("$CFG->wwwroot/course/mod.php?id=$site->id&section=$section&add=", + $modnames, "section", "", "$stradd...", "mods", $stractivities); + echo "
"; + } + + echo "
cellheading\" class=\"topicsoutlineside\" valign=top align=center width=10>"; + echo " 
'; + } + switch ($CFG->frontpage) { /// Display the main part of the front page. case FRONTPAGENEWS: if (! $newsforum = forum_get_course_forum($site->id, "news")) { diff --git a/lang/en/moodle.php b/lang/en/moodle.php index ab1b6aefc6..1da2a73a84 100644 --- a/lang/en/moodle.php +++ b/lang/en/moodle.php @@ -835,6 +835,7 @@ $string['sitefiles'] = 'Site files'; $string['sitelogs'] = 'Site logs'; $string['sitenews'] = 'Site news'; $string['sites'] = 'Sites'; +$string['sitesection'] = 'Include a topic section'; $string['sitesettings'] = 'Site settings'; $string['size'] = 'Size'; $string['sizeb'] = 'bytes';