Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions teaching/planning/courses.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Edit this file to add or change courses. Dates: YYYY-MM-DD, times: HH:MM.
//
// Each course:
// id, title, kind (seminar | colloquium | lecture | course | workshop | meeting | online),
// id, title, kind (exercise | seminar | colloquium | lecture | online | course | workshop | meeting),
// ects, semester (FS2027 | HS2027), lecturers, language, ksl,
// block: introduction | advanced | reflection | theory | application | final | elective | none
// programmes: which programmes the course counts for: ["major", "minor"]
Expand Down Expand Up @@ -84,7 +84,7 @@ window.DH_COURSES = [
},
{
id: "fs27-altsoc", specialisations: ["culture"], semester: "FS2027", kind: "workshop", ects: 0.5,
title: "Alt-Soc (microcourse, with Digital In/Justice)",
title: "[PPP] Alt-Soc (microcourse, with Digital In/Justice)",
lecturers: "", language: "tba", ksl: "",
block: "application", programmes: ["major"],
tba: "one half day, date tba",
Expand Down Expand Up @@ -146,15 +146,15 @@ window.DH_COURSES = [

// ---------------- HS 2027 (in development) ----------------
{
id: "hs27-intro", semester: "HS2027", kind: "course", ects: 3,
id: "hs27-intro", semester: "HS2027", kind: "exercise", ects: 3,
title: "Introduction to Digital Humanities",
lecturers: "Course team", language: "EN", ksl: "",
block: "introduction", programmes: ["major", "minor"],
weekly: { day: 2, start: "10:15", end: "12:00", from: "2027-09-21", to: "2027-12-21", except: [] },
url: "https://dhbern.github.io/introduction-to-dh/"
},
{
id: "hs27-lab", semester: "HS2027", kind: "course", ects: 4,
id: "hs27-lab", semester: "HS2027", kind: "exercise", ects: 4,
title: "DH Lab",
lecturers: "Course team", language: "EN", ksl: "",
block: "introduction", programmes: ["major", "minor"],
Expand Down
16 changes: 10 additions & 6 deletions teaching/planning/index.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: "Semester planner"
subtitle: "Hermione's time turner"
description: "Pick your DH courses for a semester, see them in a weekly calendar, and check for overlaps and problems"
date: "2026-11-12"
date-modified: "2026-11-19"
date-modified: "2026-11-25"
toc: false
page-layout: full
resources:
Expand All @@ -12,7 +12,7 @@ resources:
---

::: {.callout-note title="How it works"}
Choose (1) the semester you want to plan, (2) your semester in DH, (3) Major or Minor and (4), for the Major, your specialisation. Filter the course list and **add** courses: they appear in the weekly calendar. Overlapping sessions are marked in red; courses that are planned for a later semester or do not count for your programme are flagged. Your selection is kept in this browser only.
Choose (1) the semester you want to plan, (2) your semester in DH, (3) Major or Minor and (4), for the Major, your specialisation. Filter the course list and **add** courses: they appear in the weekly calendar. Overlapping sessions are marked in red; courses that are planned for a later semester are marked light red, and courses that do not count for your programme are flagged. Your selection is kept in this browser only.

**Download .ics** saves the dates of your plan as a calendar file for Outlook, Apple Calendar or Google Calendar. It is a one-off copy: courses without fixed dates are left out, and if dates change, download the file again and replace the old events.

Expand All @@ -38,9 +38,9 @@ Choose (1) the semester you want to plan, (2) your semester in DH, (3) Major or
<div class="pl-filters">
<input type="search" id="pl-q" placeholder="Search title, lecturer, KSL number">
<select id="pl-kind">
<option value="">All types</option><option value="seminar">Seminars</option><option value="colloquium">Colloquia</option>
<option value="course">Courses</option><option value="lecture">Lectures</option><option value="online">Online lecture</option>
<option value="workshop">Workshops (PPP / ProjM)</option><option value="meeting">Meetings</option>
<option value="">All types</option><option value="exercise">Exercises</option><option value="course">Courses</option>
<option value="seminar">Seminars</option><option value="colloquium">Colloquia</option><option value="lecture">Lectures</option>
<option value="online">Online lecture</option><option value="workshop">Workshops (ProjM / PPP)</option><option value="meeting">Meetings</option>
</select>
<select id="pl-block">
<option value="">All blocks</option><option value="introduction">Introduction</option><option value="theory">Theories, approaches &amp; solutions</option>
Expand Down Expand Up @@ -85,6 +85,8 @@ Choose (1) the semester you want to plan, (2) your semester in DH, (3) Major or
#pl-list { max-height: 900px; overflow-y: auto; border-top: 1px solid #ddd; }
.pl-item { display: flex; gap: .6rem; align-items: start; justify-content: space-between; padding: .55rem .2rem; border-bottom: 1px solid #eee; }
.pl-item.on { background: #f3f8ff; }
.pl-item.early { background: #fff0f0; }
.pl-tag-early { color: #b42318; font-weight: 600; }
.pl-item-title { font-weight: 600; line-height: 1.25; }
.pl-item-meta, .pl-item-when { font-size: .8rem; color: #555; }
.pl-item.fit { border-left: 4px solid #4a9a4a; padding-left: .4rem; }
Expand All @@ -98,6 +100,7 @@ Choose (1) the semester you want to plan, (2) your semester in DH, (3) Major or
.pl-checks { list-style: none; padding: 0; margin: 0 0 .6rem; }
.pl-checks li { padding: .35rem .6rem; margin-bottom: .25rem; border-radius: 4px; border-left: 4px solid #bbb; background: #fafafa; }
.pl-checks li.pl-error { border-color: #c00; background: #fdecec; }
.pl-checks li.pl-early { border-color: #e8a0a0; background: #fff0f0; }
.pl-checks li.pl-warn { border-color: #e08a00; background: #fff5e6; }
.pl-checks li.pl-info { border-color: #6c8ebf; background: #eef3fb; }
.pl-checks li.pl-ok { border-color: #2e8b57; background: #edf7f0; }
Expand Down Expand Up @@ -126,6 +129,7 @@ Choose (1) the semester you want to plan, (2) your semester in DH, (3) Major or
## Notes

- **Data:** spring 2027 from KSL and the [semester overview](../fs2027/index.qmd) (as of 12 November 2026); autumn 2027 is [in development](../hs2027/index.qmd) and based on the autumn 2026 timetable. Courses without fixed dates are listed but not shown in the calendar.
- **Checks:** overlaps are computed for every single date (holidays and the Easter break are left out). A course is flagged as *too early* when the study plan places its block in a later semester; elective seminars and PPP / Project Management workshops are only noted, as they can be taken earlier (workshops also make up missing ECTS).
- **Checks:** overlaps are computed for every single date (holidays and the Easter break are left out). A course is marked light red as *too early* when the study plan places its block in a later semester; elective seminars and PPP / Project Management workshops are only noted, as they can be taken earlier (workshops also make up missing ECTS).
- **Order:** the course list shows exercises (Introduction to DH, DH Lab) and the programming course first, then seminars, colloquia, lectures and the micro-credited workshops (Project Management, then PPP), followed by meetings.
- **Specialisations:** seminars and colloquia are tagged with the specialisations they fit; courses without a tag are general. Seminars of your specialisation are marked green.
- Questions: Adrian Demleitner, head of study programmes ([adrian.demleitner@unibe.ch](mailto:adrian.demleitner@unibe.ch)).
34 changes: 26 additions & 8 deletions teaching/planning/planning.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,20 @@

const SEM = window.DH_SEMESTERS, COURSES = window.DH_COURSES, RULES = window.DH_RULES, SPEC = window.DH_SPECIALISATIONS || {};
const DAYS = ["Mon", "Tue", "Wed", "Thu", "Fri"];
const KIND_LABEL = { seminar: "Seminar", colloquium: "Colloquium", lecture: "Lecture", course: "Course",
const KIND_LABEL = { seminar: "Seminar", colloquium: "Colloquium", lecture: "Lecture", exercise: "Exercise", course: "Course",
workshop: "Workshop", meeting: "Meeting", online: "Online lecture" };
const BLOCK_LABEL = { introduction: "Introduction", theory: "Theories, approaches & solutions",
advanced: "Advanced studies", reflection: "Reflection", elective: "Elective seminar",
application: "Application", final: "Final phase", none: "–" };
const STORE = "dh-teaching-planner-v2";
// Order of the course list: exercises (and the other introductory courses), seminars,
// colloquia, lectures, then the micro-credited workshops (Project Management before PPP),
// then meetings. Within a group the order of courses.js is kept.
function typeRank(c) {
if (c.kind === "workshop") return /^\[ProjM\]/.test(c.title) ? 6 : /^\[PPP\]/.test(c.title) ? 7 : 8;
const r = { exercise: 0, course: 1, seminar: 2, colloquium: 3, lecture: 4, online: 5, meeting: 9 }[c.kind];
return r == null ? 10 : r;
}

// ---------- state ----------
// Default to the first semester that has not ended yet.
Expand Down Expand Up @@ -69,6 +77,14 @@
`<span class="pl-spec ${k === mySpec() ? "mine" : ""}" title="${esc(SPEC[k] || k)}">${esc(SPEC[k] || k)}</span>`).join(" ");
}

// The study plan places the course's block in a later semester. Elective seminars and
// workshops may be taken earlier, so for them this is only a note (see the page notes).
function tooEarly(c) {
const rec = RULES[state.programme][c.block];
return rec && Number(state.studySem) < rec ? rec : 0;
}
const earlyIsIssue = (c) => !(c.block === "elective" || c.kind === "workshop");

// ---------- checks ----------
function checks() {
const chosen = COURSES.filter((c) => sel().includes(c.id));
Expand Down Expand Up @@ -101,9 +117,9 @@
chosen.forEach((c) => {
if (!counts(c))
out.push({ level: "warn", text: `<b>${esc(c.title)}</b> does not count towards the ${prog === "major" ? "Major" : "Minor"}.` });
const rec = rules[c.block];
if (rec && sem < rec) {
const lvl = (c.block === "elective" || c.kind === "workshop") ? "info" : "warn";
const rec = tooEarly(c);
if (rec) {
const lvl = earlyIsIssue(c) ? "early" : "info";
out.push({ level: lvl, text: `<b>${esc(c.title)}</b> (${BLOCK_LABEL[c.block]}) is planned for semester ${rec}; you are in semester ${sem} – ${c.block === "final" ? "final-year meetings are for your last semester" : "taken too early"}.` });
}
if (["advanced", "reflection", "elective", "theory", "application"].includes(c.block) && sem === 1 && SEM[state.semester].season === "autumn")
Expand Down Expand Up @@ -228,19 +244,21 @@
.filter((c) => !state.block || c.block === state.block)
.filter((c) => !state.onlyMine || counts(c))
.filter((c) => !state.onlySpec || !mySpec() || fitsSpec(c) !== false)
.filter((c) => !q || (c.title + " " + c.lecturers + " " + (c.ksl || "")).toLowerCase().includes(q));
.filter((c) => !q || (c.title + " " + c.lecturers + " " + (c.ksl || "")).toLowerCase().includes(q))
.map((c, i) => ({ c, i })).sort((a, b) => typeRank(a.c) - typeRank(b.c) || a.i - b.i).map((x) => x.c);
$("pl-count").textContent = `${items.length} course(s)`;
$("pl-list").innerHTML = items.map((c) => {
const on = sel().includes(c.id);
const early = earlyIsIssue(c) ? tooEarly(c) : 0;
const ss = sessions(c);
const when = c.weekly ? `${DAYS[c.weekly.day - 1]} ${c.weekly.start}–${c.weekly.end}, ${ss.filter((x) => !x.note).length} sessions` :
ss.length ? ss.map((x) => `${fmtDate(x.date)} ${x.start}–${x.end}`).slice(0, 3).join("; ") + (ss.length > 3 ? " …" : "") : (c.tba || "tba");
return `<div class="pl-item ${on ? "on" : ""} ${fitsSpec(c) === true ? "fit" : ""}">
return `<div class="pl-item ${on ? "on" : ""} ${early ? "early" : ""} ${fitsSpec(c) === true ? "fit" : ""}">
<div class="pl-item-main">
<div class="pl-item-title"><a href="${esc(c.url || "#")}">${esc(c.title)}</a></div>
<div class="pl-item-meta">${KIND_LABEL[c.kind] || c.kind} · ${c.ects} ECTS · ${BLOCK_LABEL[c.block] || ""}${c.lecturers ? " · " + esc(c.lecturers) : ""}${c.language ? " · " + esc(c.language) : ""}${c.ksl ? " · KSL " + esc(c.ksl) : ""}</div>
${c.specialisations ? `<div class="pl-item-spec">${specTags(c)}</div>` : ""}
<div class="pl-item-when">${esc(when)}${c.note ? " · " + esc(c.note) : ""}${!counts(c) ? ' · <span class="pl-tag-warn">not in your programme</span>' : ""}</div>
<div class="pl-item-when">${esc(when)}${c.note ? " · " + esc(c.note) : ""}${!counts(c) ? ' · <span class="pl-tag-warn">not in your programme</span>' : ""}${early ? ` · <span class="pl-tag-early">too early: planned for semester ${early}</span>` : ""}</div>
</div>
<button class="btn btn-sm ${on ? "btn-outline-danger" : "btn-outline-primary"}" data-id="${c.id}">${on ? "Remove" : "Add"}</button>
</div>`;
Expand Down Expand Up @@ -301,7 +319,7 @@
const n = res.chosen.reduce((t, c) => t + sessions(c).length, 0);
$("pl-ics").disabled = !n;
$("pl-ics").textContent = n ? `Download .ics (${n} date${n === 1 ? "" : "s"})` : "Download .ics";
const order = { error: 0, warn: 1, info: 2, ok: 3 };
const order = { error: 0, early: 1, warn: 2, info: 3, ok: 4 };
const list = res.list.sort((a, b) => order[a.level] - order[b.level]);
$("pl-checks").innerHTML = list.length ? list.map((x) => `<li class="pl-${x.level}">${x.text}</li>`).join("")
: (res.chosen.length ? '<li class="pl-ok">No overlaps or problems found.</li>' : "<li>Add courses to see checks.</li>");
Expand Down
Loading