index.xhtml 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. <?php
  2. /**
  3. * <https://y.st./>
  4. * Copyright (C) 2016-2017 //y.st. <mailto:copyright@y.st>
  5. *
  6. * This program is free software: you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation, either version 3 of the License, or
  9. * (at your option) any later version.
  10. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License
  17. * along with this program. If not, see <https://www.gnu.org./licenses/>.
  18. **/
  19. $xhtml = array(
  20. 'nav' => array('en/main'),
  21. 'title' => 'Alex Yst&apos;s coursework',
  22. 'copyright year' => '2016-2017',
  23. 'body' => <<<END
  24. <p>
  25. I&apos;m currently in school studying for my computer science degree at <a href="http://www.uopeople.edu/">University of the People</a>.
  26. This index listing includes major assignments that I&apos;ve completed, such as written assignments (essays), but excludes minor work such as discussion assignments.
  27. The pages labeled &quot;Learning Journal&quot; actually contain multiple unnamed submissions for learning journal assignments that were presented throughout the course of the courses.
  28. For a general idea of what courses I have left to take and what their prerequisites are, check out the <a href="/en/weblog/2017/07-July/28.xhtml#university">latest update to my course tree in my journal</a>.
  29. </p>
  30. END
  31. );
  32. foreach($coursework as $key_coursecode => $value_coursearray):
  33. $xhtml['body'] .= <<<END
  34. <header>
  35. <h2 id="$key_coursecode">{$value_coursearray['title']}</h2>
  36. <p>
  37. {$value_coursearray['subtitle']}
  38. </p>
  39. </header>
  40. <ol>
  41. END;
  42. if(file_exists(__DIR__."/$key_coursecode/index.xhtml")):
  43. $xhtml['body'] .= <<<END
  44. <li value="0">
  45. <a href="/en/coursework/$key_coursecode/">Learning Journal</a>
  46. </li>
  47. END;
  48. else:
  49. $xhtml['body'] .= <<<END
  50. <li value="0">
  51. <span class="hyperlink_unavailable">Learning Journal</span>
  52. </li>
  53. END;
  54. endif;
  55. foreach($value_coursearray['assignments'] as $key_href => $value_assignment):
  56. $xhtml['body'] .= <<<END
  57. <li value="{$value_assignment['unit']}">
  58. <a href="/en/coursework/$key_coursecode/$key_href.xhtml">{$value_assignment['title']}</a>
  59. </li>
  60. END;
  61. endforeach;
  62. $xhtml['body'] .= <<<END
  63. </ol>
  64. END;
  65. endforeach;