{"id":588,"date":"2011-02-01T10:49:48","date_gmt":"2011-02-01T10:49:48","guid":{"rendered":"http:\/\/blogs.sussex.ac.uk\/elearningteam\/?p=588"},"modified":"2011-02-02T15:51:26","modified_gmt":"2011-02-02T15:51:26","slug":"things-we-love-about-moodle2-pt3-%e2%80%93-section-name","status":"publish","type":"post","link":"https:\/\/blogs.sussex.ac.uk\/elearningteam\/2011\/02\/01\/things-we-love-about-moodle2-pt3-%e2%80%93-section-name\/","title":{"rendered":"Things we love about moodle2 pt3 \u2013 section name"},"content":{"rendered":"<p>Edit the summary of any section in moodle2 and you&#8217;ll see a new field &#8211; Section name.<\/p>\n<p>This is another step in bringing moodle into line with other content management systems, and we like it.<\/p>\n<p><a href=\"http:\/\/blogs.sussex.ac.uk\/elearningteam\/files\/2011\/02\/Picture-19.png\"><img loading=\"lazy\" class=\"alignnone size-full wp-image-589\" title=\"moodle2 section name\" src=\"http:\/\/blogs.sussex.ac.uk\/elearningteam\/files\/2011\/02\/Picture-19.png\" alt=\"\" width=\"594\" height=\"539\" srcset=\"https:\/\/blogs.sussex.ac.uk\/elearningteam\/files\/2011\/02\/Picture-19.png 594w, https:\/\/blogs.sussex.ac.uk\/elearningteam\/files\/2011\/02\/Picture-19-300x272.png 300w\" sizes=\"(max-width: 594px) 100vw, 594px\" \/><\/a><\/p>\n<p>The section name text box isn&#8217;t WYSIWYG &#8211; so it&#8217;s less confusing and will inherit any stylesheet &#8211; also its just the right size to\u00a0encourage\u00a0users to enter a short, descriptive and meaningful name as a navigation element.<\/p>\n<h2><span style=\"font-weight: normal\">So, why is this important?<\/span><\/h2>\n<p>At Sussex we\u00a0encourage\u00a0our content creators to build a rich user experience for their students. We\u00a0encourage\u00a0teachers to add contextual information (using labels) videos and images to each section. Each section,week or topic in moodle becomes more than just a list of links.<\/p>\n<p>Interviews with students and statistical data on site use, seems to support the theory that students find this enjoyable and engaging, and our tutors often take a pride in the experience they can create online for students.<\/p>\n<p>With tutors spending time creating supportive text, images and\u00a0contextualising<em> <\/em> the resources\/activities in a section it&#8217;s important students see this, and don&#8217;t just go straight to a resource\/activity without seeing the context.<\/p>\n<p>For our VLE in Sussex enabling navigation to resources\/activities\u00a0<strong>without<\/strong> any\u00a0contextual\u00a0information the tutor intended when\u00a0designing\u00a0the course could be considered\u00a0detrimental\u00a0to the learning\u00a0environment. Tutors and users rely on navigating to sections, rather than a list of uncontextualised\u00a0links.<\/p>\n<p>For our VLE it&#8217;s really important for us to create navigation\u00a0which allows a user to visit site sections, as the course designer intended. By\u00a0default\u00a0moodle (1.9 or 2) does not support this kind of navigation with links to sections (moodle2), or\u00a0meaningful\u00a0section titles for users (moodle 1.9 <a title=\"moodle section links block\" href=\"http:\/\/docs.moodle.org\/en\/Section_Links_block\" target=\"_blank\">section links block<\/a>).<\/p>\n<p>The new\u00a0field\u00a0&#8211; section name &#8211; could easily enable tutors to create meaningful navigation to sections in their site.<\/p>\n<h2><span style=\"font-weight: normal\">Mock section names for a site\/course &#8211; moodle1.9<\/span><\/h2>\n<p>Within our current install (moodle1.9) users are able to navigate to any section in a site (in Sussex each moodle course is called a site).We use the the <a href=\"http:\/\/docs.moodle.org\/en\/YUI_menu\" target=\"_blank\">YUI menu block<\/a> to generate a site menu. This is generally displayed in every site, as the first block on the left hand side.<\/p>\n<p>The block itself grabs the first 19 characters from the section summary, and uses that text (stripping any HTML) as the section names. Users can configure the amount of characters to use from the summary for longer titles, but unfortunately\u00a0that is a complex idea for a user to understand, and can lead to section names not being as useful as they might be.<\/p>\n<p><img loading=\"lazy\" class=\"alignnone size-full wp-image-592\" title=\"YUI site menu\" src=\"http:\/\/blogs.sussex.ac.uk\/elearningteam\/files\/2011\/02\/Picture-20.png\" alt=\"\" width=\"199\" height=\"375\" \/><\/p>\n<p>When used well &#8211; it&#8217;s a powerful and essential\u00a0usability\u00a0navigation\u00a0element, but (due to its complexity for the user) in the majority of\u00a0cases\u00a0its not deployed in an optimal way.<\/p>\n<h2><span style=\"font-weight: normal\">Getting the section names for a site\/course in moodle2<\/span><\/h2>\n<p>Moodle2&#8217;s addition of a Section name gets rid of the need for the complexity to the user of the YUI menu block. Instead users have a very clear, simple field which will be their section name, and we like this.<\/p>\n<p>We plunged straight into writing our first block in moodle2.0 by trying to create a site navigation menu &#8211; using the section names.<\/p>\n<p><code><br \/>\n$course_sections = $DB-&gt;get_records(\"course_sections\", array('course' =&gt; $COURSE-&gt;id));<br \/>\nforeach ($course_sections as $section) {<br \/>\n$section_name = $section-&gt;name;<br \/>\n$visible = $section-&gt;visible;<br \/>\nif(!$section_name) {<br \/>\n$section_name = \"section \".$section-&gt;section;<br \/>\n}<br \/>\n$section_link = $CFG-&gt;wwwroot\/course\/view.php?id=$COURSE-&gt;id&amp;$course_format=$section-&gt;section;<\/code><\/p>\n<p>You&#8217;ll notice the new $DB layer format for get_record, and the new array key =&gt; value query, but apart from that the code should be pretty familiar to most moodle developers, and if you need a hand the <a title=\"moodle2 db layer help\" href=\"http:\/\/docs.moodle.org\/en\/Development:DB_layer_2.0_migration_docs\" target=\"_blank\">DB layer 2.0 docs<\/a> are a good starting point.<\/p>\n<p>Here as a screenshot of our UX Nav block in action on a moodle2 site &#8211; with some Section names added, and others using the default name.<\/p>\n<p><img loading=\"lazy\" class=\"alignnone size-full wp-image-613\" title=\"moodle2 section names navigation\" src=\"http:\/\/blogs.sussex.ac.uk\/elearningteam\/files\/2011\/02\/Picture-21.png\" alt=\"\" width=\"223\" height=\"309\" \/><\/p>\n<p>There are currently no plans to release this as a moodle2 block, but hopefully the code above can help you make your own quite quickly if its something you think user experience on \u00a0your moodle2 install will be improved by.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Edit the summary of any section in moodle2 and you&#8217;ll see a new field &#8211; Section name. This is another step in bringing moodle into line with other content management systems, and we like it. The section name text box isn&#8217;t WYSIWYG &#8211; so it&#8217;s less confusing and will inherit any stylesheet &#8211; also its [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[67,73,71],"tags":[36,87,82,83,92],"_links":{"self":[{"href":"https:\/\/blogs.sussex.ac.uk\/elearningteam\/wp-json\/wp\/v2\/posts\/588"}],"collection":[{"href":"https:\/\/blogs.sussex.ac.uk\/elearningteam\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.sussex.ac.uk\/elearningteam\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.sussex.ac.uk\/elearningteam\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.sussex.ac.uk\/elearningteam\/wp-json\/wp\/v2\/comments?post=588"}],"version-history":[{"count":32,"href":"https:\/\/blogs.sussex.ac.uk\/elearningteam\/wp-json\/wp\/v2\/posts\/588\/revisions"}],"predecessor-version":[{"id":753,"href":"https:\/\/blogs.sussex.ac.uk\/elearningteam\/wp-json\/wp\/v2\/posts\/588\/revisions\/753"}],"wp:attachment":[{"href":"https:\/\/blogs.sussex.ac.uk\/elearningteam\/wp-json\/wp\/v2\/media?parent=588"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.sussex.ac.uk\/elearningteam\/wp-json\/wp\/v2\/categories?post=588"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.sussex.ac.uk\/elearningteam\/wp-json\/wp\/v2\/tags?post=588"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}