Skip to content

Commit de44e81

Browse files
committed
Merge remote-tracking branch 'upstream/main' into async-toggle
2 parents 48375c9 + 7cbb8c9 commit de44e81

33 files changed

Lines changed: 285 additions & 44 deletions

File tree

.github/workflows/test-crud.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,11 @@ jobs:
6464
- name: Install dependencies
6565
run: poetry install --with dev --no-interaction
6666

67+
- name: Create stub static asset directories
68+
run: |
69+
mkdir -p bases/rsptx/assignment_server_api/react
70+
mkdir -p bases/rsptx/assignment_server_api/staticAssets
71+
6772
- name: Run tests
6873
run: |
6974
poetry run pytest -v --tb=short

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,6 @@ _build
3434
**/test/_static
3535
bake.log
3636
WARP.md
37+
CLAUDE.md
3738
init_runestone.log
3839
.claude

CHANGELOG.md

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,68 @@
11
# ChangeLog
22

3+
## Updates since last changelog entry (2026-03-14 → 2026-03-28)
4+
5+
Coverage: changes merged/landed after the previous changelog update commit on **2026-03-13**, through **2026-03-28**.
6+
7+
### Highlights
8+
9+
- **Term start date enforcement (issue-1167 / PR #1185):** major cross-cutting workstream to respect `term_start_date` everywhere — `fetch_last_answer`, `fetch_code`, `fetch_page_activity_counts`, all `_scorable_X` functions, `checkLocalStorage` in interactives, and the `eBookConfig` context dict / layout template; course home page now warns instructors of old/expired courses.
10+
- **Automated testing + CI (new):** full GitHub Actions CI pipeline landed — CRUD test suite, route smoke tests (book + assignment servers), functional route tests with real DB and fake auth, and a CI status badge in the README.
11+
- **Learning clues (continued):** merged the `learning_clues` branch into main; follow-on additions include coach-mode switch, source filter, citation links, study-clues logic abstraction, and logging.
12+
- **Async Peer Instruction UX:** added a step banner with progress dots to async PI, improved voting-stage clarity, and updated the LLM prompt; banner colors refined to shades of blue (PR from conzty01).
13+
- **Canvas timezone fix (PR #1189):** updated LTI1p3 timezone handling to accommodate a recent Canvas change.
14+
- **SmartSearch / CopyExercise modal (issue-829-3 / PR #1175):** refactored `SmartSearchExercises` and `CopyExerciseModal` to support editing and improve UX; added Prism to component templates.
15+
- **Next-question placement fix (PR #1178):** corrected next-question placement and styling.
16+
- **Ops / tooling:** dependency and lock-file updates, pgcli bump, black formatting fixes, Linux build-system init fix, LLM prompt hallucination fix, micro-parsons dependency bump, and a course-list typo fix.
17+
18+
### Commit notes (for reference)
19+
20+
- d3d901ae Fix typo in course list
21+
- 06f8480e Merge pull request #1185 from ascholerChemeketa/no-work-before-term-start
22+
- fd5cb654 Test fixes — safety first STOP if not in test mode
23+
- 861470a1 Merge pull request #1189 from ascholerChemeketa/canvas-tz-fix
24+
- a1563c1a LTI1p3: update timezone handling to accomodate Canvas change
25+
- 29289cc4 Merge branch 'automated_testing'
26+
- 20a47f22 Add CI test status badge to README
27+
- 8235da93 Phase 4: add functional route tests with real DB and fake auth
28+
- 1245b286 Phase 3: add route smoke tests for book and assignment servers
29+
- 8ea0695c Update CI to run full test suite via poetry run pytest
30+
- 22481225 Add automated CRUD test suite with GitHub Actions CI
31+
- 6fe58f54 Add term_start_date to course home page. Warn instructors of old courses
32+
- ea2187a9 Merge pull request #1178 from sethbern/fix-next-question-placement
33+
- e6e12b9e Merge pull request #1175 from morozov-av/issue-829-3
34+
- eb1599da Merge branch 'learning_clues'
35+
- 78142449 abstract the shouldShowStudyClues logic
36+
- 140f811f Interactives: checkLocalStorage respects termStartDate from eBookConfig
37+
- bede5cc0 Interactives: update micro-parsons dependancy to 0.2.0
38+
- 16647263 Add eBookConfig.termStartDate to layout.html template
39+
- 95a97c50 serve_page: add term_start_date to eBookConfig context dict
40+
- e69cff37 Merge branch 'morozov-av-issue-1167'
41+
- e1f0a3ea All _scorable_X functions check term start date
42+
- c05bbc28 Bugfix for lp_answers practice start time
43+
- c1b90ba7 fetch_last_answer and fetch_code respect term_start_date
44+
- 236f942d Book fetch_page_activity_counts respects term_start_date
45+
- 377080d1 Add prism to component templates
46+
- 6495b7cc Refactor: enhance SmartSearchExercises and CopyExerciseModal to support editing and improve UX
47+
- b860d1ee Add logging for learning clues
48+
- a4f44d45 update LLM prompt to stop hallucinating a code snippet when there is none
49+
- edf40963 fix black formatting
50+
- fbc69136 change banner to be shades of blue. added step dots to show which stage they are at
51+
- 228138ca Merge branch 'conzty01-main'
52+
- cab35979 Fix: linux needs -T for piped input, use parms instead
53+
- 1d781c12 make sure build system is initialized
54+
- e7e0e99f Add step banner to async PI and improve voting stage clarity
55+
- c76b918f update prompt
56+
- 9c8a5bc6 fix next question placement/style
57+
- ee4e25c4 clean up random print statements
58+
- 9f0fd727 Update pgcli
59+
- 8b5d7752 Update lock files
60+
- 5fe4ca7c Add citation links
61+
- 7854735b Add source filter
62+
- 2ad0f730 Add switch for coach mode
63+
64+
---
65+
366
## Updates since last changelog entry (2026-02-28 → 2026-03-13)
467

568
Coverage: changes merged/landed after the previous changelog update commit on **2026-02-28**, through **2026-03-13**.

bases/rsptx/book_server_api/routers/books.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -402,6 +402,7 @@ async def serve_page(
402402
context = dict(
403403
request=request,
404404
course_name=course_name,
405+
term_start_date=course_row.term_start_date.isoformat(),
405406
base_course=course_row.base_course,
406407
user_id=user.username if user else "",
407408
# _`root_path`: The server is mounted in a different location depending on how it's run (directly from gunicorn/uvicorn or under the ``/ns`` prefix using nginx). Tell the JS what prefix to use for Ajax requests. See also `setting root_path <setting root_path>` and the `FastAPI docs <https://fastapi.tiangolo.com/advanced/behind-a-proxy/>`_. This is then used in the ``eBookConfig`` of :doc:`runestone/common/project_template/_templates/plugin_layouts/sphinx_bootstrap/layout.html`.

bases/rsptx/book_server_api/routers/course.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,8 @@ def sort_key(assignment):
151151
"assignment_list": assignments,
152152
"stats": stats,
153153
"course": course,
154+
"is_old_course": course.term_start_date
155+
< (datetime.datetime.now() - datetime.timedelta(weeks=52)).date(),
154156
"user": user,
155157
"request": request,
156158
"institution": course.institution,

bases/rsptx/interactives/package-lock.json

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bases/rsptx/interactives/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
"handsontable": "7.2.2",
4444
"jexcel": "^3.9.1",
4545
"jquery-ui": "1.10.4",
46-
"micro-parsons": "https://github.com/RunestoneInteractive/micro-parsons-element/releases/download/v0.1.7/micro-parsons-0.1.7.tgz",
46+
"micro-parsons": "https://github.com/RunestoneInteractive/micro-parsons-element/releases/download/v0.2.0/micro-parsons-0.2.0.tgz",
4747
"select2": "^4.1.0-rc.0",
4848
"sql.js": "1.5.0",
4949
"vega-embed": "3.14.0",

bases/rsptx/interactives/runestone/clickableArea/js/clickable.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,17 +152,21 @@ export default class ClickableArea extends RunestoneBase {
152152
var ex = localStorage.getItem(this.localStorageKey());
153153
if (ex !== null) {
154154
this.hasStoredAnswers = true;
155+
let error = false;
155156
try {
156157
storageObj = JSON.parse(ex);
157-
this.clickedIndexArray = storageObj.answer.split(";");
158158
} catch (err) {
159159
// error while parsing; likely due to bad value stored in storage
160-
console.log(err.message);
160+
console.log(`Error parsing stored ClickableArea data for ${this.divid}: ${err.message}`);
161+
error = true;
162+
}
163+
if (error || storageObj.timestamp < eBookConfig.termStartDate) {
161164
localStorage.removeItem(this.localStorageKey());
162165
this.hasStoredAnswers = false;
163166
this.restoreAnswers({});
164167
return;
165168
}
169+
this.clickedIndexArray = storageObj.answer.split(";");
166170
if (this.useRunestoneServices) {
167171
// log answer to server
168172
this.givenIndexArray = [];

bases/rsptx/interactives/runestone/common/js/bookfuncs.js

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -716,12 +716,19 @@ function createStudyCluesWidget() {
716716
if (!query) {
717717
return;
718718
}
719-
719+
var sectionInfo = "this page";
720720
// find the section title on the page to include in the initial query
721-
let section = document.querySelector('section.section');
722-
let sectionTitle = section.querySelector('span.title').innerText;
723-
let sectionNumber = section.querySelector('span.codenumber').innerText;
724-
let sectionInfo = `${sectionNumber} ${sectionTitle}`;
721+
if (document.querySelector("body.pretext")) {
722+
let section = document.querySelector('section.section');
723+
let sectionTitle = section.querySelector('span.title').innerText;
724+
let sectionNumber = section.querySelector('span.codenumber').innerText;
725+
sectionInfo = `${sectionNumber} ${sectionTitle}`;
726+
} else {
727+
let sectionSpan = document.querySelector("span.section-number");
728+
if (sectionSpan) {
729+
sectionInfo = sectionSpan.parentElement.innerText.trim();
730+
}
731+
}
725732
if (studyCluesConversationId === -1) {
726733
query = `Regarding section "${sectionInfo}": ${query}`;
727734
}
@@ -814,7 +821,7 @@ function shouldShowStudyCluesWidget() {
814821
}
815822

816823
const enabledBasecourses = ["csawesome2", "py4e-int", "thinkcspy", "PTXSB"];
817-
const enabledCourses = ["SI201-W26-MW and SI201-W26-TTh", "DukeCS101SP26", "mcd-csa-schoology", "mcd-csa-canvas"];
824+
const enabledCourses = ["SI201-W26-MW", "SI201-W26-TTh", "DukeCS101SP26", "mcd-csa-schoology", "mcd-csa-canvas"];
818825
const host = window.location.hostname;
819826

820827
if (host === "localhost") {

bases/rsptx/interactives/runestone/common/project_template/_templates/plugin_layouts/sphinx_bootstrap/layout.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,7 @@
290290
eBookConfig.host = '';
291291
eBookConfig.app = eBookConfig.host + '/runestone';
292292
eBookConfig.course = '{{ course_name }}';
293+
eBookConfig.termStartDate = '{{ term_start_date }}';
293294
eBookConfig.basecourse = '{{ base_course }}';
294295
eBookConfig.isLoggedIn = {{ is_logged_in}};
295296
eBookConfig.email = '{{ user_email }}';
@@ -309,6 +310,7 @@
309310
eBookConfig.host = '{{course_url}}' || 'http://127.0.0.1:8000';
310311
eBookConfig.app = eBookConfig.host+'/{{appname}}';
311312
eBookConfig.course = '{{course_id}}';
313+
eBookConfig.termStartDate = '{{ term_start_date }}';
312314
eBookConfig.basecourse = '{{ basecourse }}';
313315
eBookConfig.isLoggedIn = false;
314316
eBookConfig.enableCompareMe = eBookConfig.useRunestoneServices;

0 commit comments

Comments
 (0)