Mercurial Hosting > lang
changeset 67:1793510fa36a
course description
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Fri, 22 Aug 2025 10:28:13 -0600 |
parents | 2ff1f78bb13e |
children | a366d27db8f1 |
files | courses/course.txt courses/j1.txt src/edit_course.html.luan src/lang_courses.html.luan src/lib/Course.luan src/save_course.js.luan src/view_course.html.luan src/your_courses.html.luan |
diffstat | 8 files changed, 25 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/courses/course.txt Fri Aug 22 07:25:35 2025 -0600 +++ b/courses/course.txt Fri Aug 22 10:28:13 2025 -0600 @@ -1,5 +1,9 @@ Course Design + +This course is to have Claude help you design your own course. When you make a course and then start a chat, Claude can read that chat if you give Claude the chat ID from the chat URL. This let's you discuss a chat with Claude in a chat of this course. + + This is an AI language learning website using the Claude API. Users can create courses on this website by entering a system prompt for Claude. The purpose of this thread/chat is to help users design these courses, mostly by editing the system prompt of the course. This website also has text-to-speech and speech-to-text using OpenAI. A course also has instructions for text-to-speech. Users can discuss a chat with you by giving you a chat ID so you can read the chat using the tool/function `get_chat`.
--- a/courses/j1.txt Fri Aug 22 07:25:35 2025 -0600 +++ b/courses/j1.txt Fri Aug 22 10:28:13 2025 -0600 @@ -1,6 +1,9 @@ Beginner Listening +In this course, you will be given sentences in Japanese and you should translate them to English. This is to build vocabulary. If you don't know what the sentence means, say so, and Claude will explain it to you. Then say "ok" and Claude will repeat the sentence. + + # CRITICAL RULES - CHECK EVERY RESPONSE 1. **MARKDOWN ROMAJI**: Every Japanese word must use {japanese|romaji} format. For example {は|wa}. NO plain romaji ever.
--- a/src/edit_course.html.luan Fri Aug 22 07:25:35 2025 -0600 +++ b/src/edit_course.html.luan Fri Aug 22 10:28:13 2025 -0600 @@ -29,6 +29,7 @@ ai_first_message = "" tts_instructions = "" has_ruby = false + description = "" } end Io.stdout = Http.response.text_writer() @@ -66,6 +67,11 @@ <h4>Course name</h4> <input type=text required name=name value="<%=html_encode(course.name)%>"> + <h4>Description</h4> + <textarea required name=description oninput="fixTextarea(event.target)"><%=html_encode(course.description)%></textarea> + + <br> + <p><label clickable><input type=checkbox name=has_ruby <%= course.has_ruby and "checked" or "" %> > Has pronunciation like {japanese|romaji}</label></p> <h4>AI system prompt - chat instructions</h4>
--- a/src/lang_courses.html.luan Fri Aug 22 07:25:35 2025 -0600 +++ b/src/lang_courses.html.luan Fri Aug 22 10:28:13 2025 -0600 @@ -43,9 +43,7 @@ <table> <% for _, course in ipairs(courses) do %> <tr> - <td><%= course.name_html() %></td> - <td><a href="new_chat.red?course=<%=course.id%>">New chat</a></td> - <td><a href="view_course.html?course=<%=course.id%>">View</a></td> + <td><a href="view_course.html?course=<%=course.id%>"><%= course.name_html() %></a></td> </tr> <% end %> </table>
--- a/src/lib/Course.luan Fri Aug 22 07:25:35 2025 -0600 +++ b/src/lib/Course.luan Fri Aug 22 10:28:13 2025 -0600 @@ -26,6 +26,7 @@ ai_first_message = doc.ai_first_message tts_instructions = doc.tts_instructions has_ruby = doc.has_ruby == "true" + description = doc.description or "" } end @@ -38,9 +39,10 @@ course_updated = long(course.updated) name = course.name or error() ai_system_prompt = course.ai_system_prompt or error() - ai_first_message = course.ai_first_message - tts_instructions = course.tts_instructions + ai_first_message = course.ai_first_message or error() + tts_instructions = course.tts_instructions or error() has_ruby = course.has_ruby and "true" or nil + description = course.description or error() } end
--- a/src/save_course.js.luan Fri Aug 22 07:25:35 2025 -0600 +++ b/src/save_course.js.luan Fri Aug 22 10:28:13 2025 -0600 @@ -32,6 +32,7 @@ course.ai_first_message = parameters.ai_first_message or error() course.tts_instructions = parameters.tts_instructions or error() course.has_ruby = parameters.has_ruby ~= nil + course.description = parameters.description or error() course.updated = time_now() course.save() end )
--- a/src/view_course.html.luan Fri Aug 22 07:25:35 2025 -0600 +++ b/src/view_course.html.luan Fri Aug 22 10:28:13 2025 -0600 @@ -54,6 +54,11 @@ <% end %> </p> + <h4>Description</h4> + <pre><%=html_encode(course.description)%></pre> + + <br> + <p><input type=checkbox name=has_ruby <%= course.has_ruby and "checked" or "" %> disabled> Has pronunciation like {japanese|romaji}</p> <h4>AI system prompt - chat instructions</h4>
--- a/src/your_courses.html.luan Fri Aug 22 07:25:35 2025 -0600 +++ b/src/your_courses.html.luan Fri Aug 22 10:28:13 2025 -0600 @@ -54,9 +54,7 @@ <% for _, course in ipairs(courses) do %> <tr> <td><%= course.language_name() %></td> - <td><%= course.name_html() %></td> - <td><a href="new_chat.red?course=<%=course.id%>">New chat</a></td> - <td><a href="view_course.html?course=<%=course.id%>">View</a></td> + <td><a href="view_course.html?course=<%=course.id%>"><%= course.name_html() %></a></td> </tr> <% end %> </table>