{"id":22,"date":"2009-08-15T09:01:53","date_gmt":"2009-08-15T08:01:53","guid":{"rendered":"http:\/\/blog.soton.ac.uk\/webteam\/?p=22"},"modified":"2009-08-17T16:46:14","modified_gmt":"2009-08-17T15:46:14","slug":"theres-always-one","status":"publish","type":"post","link":"https:\/\/blog.soton.ac.uk\/webteam\/2009\/08\/15\/theres-always-one\/","title":{"rendered":"There&#8217;s always one"},"content":{"rendered":"<p>All of our modules fit nicely into academic sessions&#8230; except 2, the MSc projects, which last into the first semester of the year AFTER they start.<\/p>\n<p>In several places I need to work with all &#8220;current&#8221; modules: The student homepage needs to show them all the modules they are currently on, up to now I&#8217;ve just had to search the current session. Also I need to show students their project examiners and vice versa, but by default my system was showing these as last years relationships rather than current, as we&#8217;re now in 0910 rather than 0809.<\/p>\n<p>My rather hacky solution is to maintain a list of modules for each session which should be shown in semester 1 of the next year. This is a cheap and dirty hack but got done in an hour.<\/p>\n<p>What I should really do is give every module a start and end date and test which are current, however I can just see the start\/end date data getting out of sync. A middle road might be to keep an &#8220;exceptions&#8221; list, then build start &amp; end dates via a script. Then there&#8217;s the question of an end date &#8212; as we need to keep them open until after referrals etc.<\/p>\n<p>The thing is, this only impacts 1% of our modules, so, sadly, I think the hack&#8217;s the right solution. I just don&#8217;t have the resources to re-engineer the whole system for one special case. If we ever rebuild the system we&#8217;ll know better next time.<\/p>\n<p>UPDATE: after thinking it over and discussing with other staff, I think the best long term solution is to add a table for &#8220;module expiry date&#8221; which will be module_id, session_id, date. This is only used for modules which last into the next session and the canonical list of active modules are all those where the session_id is the current academic session PLUS all those with a expiry date and that date still in the future.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>All of our modules fit nicely into academic sessions&#8230; except 2, the MSc projects, which last into the first semester of the year AFTER they start. In several places I need to work with all &#8220;current&#8221; modules: The student homepage needs to show them all the modules they are currently on, up to now I&#8217;ve [&hellip;]<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"ngg_post_thumbnail":0,"footnotes":""},"categories":[86,87],"tags":[],"class_list":["post-22","post","type-post","status-publish","format-standard","hentry","category-database","category-intranet"],"_links":{"self":[{"href":"https:\/\/blog.soton.ac.uk\/webteam\/wp-json\/wp\/v2\/posts\/22","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.soton.ac.uk\/webteam\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.soton.ac.uk\/webteam\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.soton.ac.uk\/webteam\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.soton.ac.uk\/webteam\/wp-json\/wp\/v2\/comments?post=22"}],"version-history":[{"count":4,"href":"https:\/\/blog.soton.ac.uk\/webteam\/wp-json\/wp\/v2\/posts\/22\/revisions"}],"predecessor-version":[{"id":25,"href":"https:\/\/blog.soton.ac.uk\/webteam\/wp-json\/wp\/v2\/posts\/22\/revisions\/25"}],"wp:attachment":[{"href":"https:\/\/blog.soton.ac.uk\/webteam\/wp-json\/wp\/v2\/media?parent=22"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.soton.ac.uk\/webteam\/wp-json\/wp\/v2\/categories?post=22"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.soton.ac.uk\/webteam\/wp-json\/wp\/v2\/tags?post=22"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}