Skip to content
This repository was archived by the owner on Jun 30, 2024. It is now read-only.

Commit d956bf4

Browse files
committed
Merge branch 'master' into use_webpack
2 parents 4e820b6 + 7f3e4d6 commit d956bf4

File tree

4 files changed

+105
-6
lines changed

4 files changed

+105
-6
lines changed

static/motd.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,11 @@
33
<p><img src="/runestone/static/_images/logo-trademark.png" height="20" alt="Edfinity"> <strong>online homework for Runestone</strong> now available <a href="https://edfinity.com/products?tags=runestone">Here</a></p>
44
</div>
55

6-
<h4>Recent Updates (April 11, 2020)</h4>
6+
<h4>Recent Updates (April 28, 2020)</h4>
77
<ul>
88
<li>Editorial Page - I am looking for volunteers to be Editors! This page allows an editor to review questions that have been flagged. It allows you to delete obviously bad questions or edit questions to fix typos or problems with autograding. If you are interested in becoming an editor please contact me. Here is a short video overview: https://youtu.be/ErWAni-aAI4 </li>
9-
<li>Timed Exam -- The students will not see a button to finish the exam untill they have at least looked at every question. This should help prevent accidental submissions.</li>
9+
<li>Chapter Progress -- This report has been greatly updated and enhanced based on teacher feedback. This is especially useful if you don't use Runestone Assignments.</li>
10+
<li>Datafiles - You can now add a custom datafile via the assignment interface. This datafile is available on the assignment page, as well as in the grading interface.</li>
1011
</ul>
1112

1213
<h4>Support Runestone</h4>

tests/test_dashboard.py

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import datetime
2+
13
#
24
# Unit Tests for DASHBOARD API endpoints
35
# Set up the environment variables
@@ -97,6 +99,97 @@ def test_exercisemetrics(test_client, runestone_db_tools, test_user, test_user_1
9799
)
98100

99101

102+
def test_grades(test_client, runestone_db_tools, test_user):
103+
course_4 = runestone_db_tools.create_course("test_course_1")
104+
test_student_1 = test_user("test_student_1", "password_1", course_4)
105+
test_student_1.logout()
106+
test_instructor_1 = test_user("test_instructor_1", "password_1", course_4)
107+
test_instructor_1.make_instructor()
108+
test_instructor_1.login()
109+
db = runestone_db_tools.db
110+
111+
course_start_date = datetime.datetime.strptime(
112+
course_4.term_start_date, "%Y-%m-%d"
113+
).date()
114+
115+
start_date = course_start_date + datetime.timedelta(days=13)
116+
end_date = datetime.datetime.today().date() + datetime.timedelta(days=30)
117+
max_practice_days = 40
118+
max_practice_questions = 400
119+
day_points = 1
120+
question_points = 0.2
121+
questions_to_complete_day = 5
122+
graded = 0
123+
124+
# set up practice - similar to test_instructor_practice_admin
125+
test_client.post(
126+
"admin/practice",
127+
data={
128+
"StartDate": start_date,
129+
"EndDate": end_date,
130+
"graded": graded,
131+
"maxPracticeDays": max_practice_days,
132+
"maxPracticeQuestions": max_practice_questions,
133+
"pointsPerDay": day_points,
134+
"pointsPerQuestion": question_points,
135+
"questionsPerDay": questions_to_complete_day,
136+
"flashcardsCreationType": 2,
137+
"question_points": question_points,
138+
},
139+
)
140+
141+
test_client.validate("dashboard/grades",)
142+
143+
assert "Gradebook" in test_client.text
144+
145+
146+
def test_questiongrades_redirect(
147+
test_client, runestone_db_tools, test_user, test_user_1
148+
):
149+
course_3 = runestone_db_tools.create_course(
150+
"test_course_3", base_course="test_course_1"
151+
)
152+
test_instructor_1 = test_user("test_instructor_1", "password_1", course_3)
153+
test_instructor_1.make_instructor()
154+
155+
test_instructor_1.login()
156+
157+
test_client.validate("dashboard/questiongrades",)
158+
159+
assert "Cannot call questiongrades directly" in test_client.text
160+
161+
162+
def test_questiongrades(test_assignment, test_client, test_user, test_user_1):
163+
# make a dummy student to do work
164+
student1 = test_user("student1", "password", test_user_1.course)
165+
student1.logout()
166+
167+
test_user_1.make_instructor()
168+
test_user_1.login()
169+
170+
# make dummy assignment
171+
my_ass = test_assignment("test_assignment", test_user_1.course)
172+
assignment_id = my_ass.assignment_id
173+
my_ass.addq_to_assignment(question="subc_b_fitb", points=10)
174+
my_ass.save_assignment()
175+
176+
# record a grade for that student on an assignment
177+
sid = student1.username
178+
acid = "subc_b_fitb"
179+
grade = 5
180+
comment = "OK job"
181+
res = test_client.validate(
182+
"assignments/record_grade",
183+
data=dict(sid=sid, acid=acid, grade=grade, comment=comment),
184+
)
185+
186+
res = test_user_1.test_client.validate(
187+
"dashboard/questiongrades",
188+
"Click on the question name to display or update the grade for any question.",
189+
data=dict(sid=sid, assignment_id=assignment_id),
190+
)
191+
192+
100193
# TODO:
101194
# grades
102195
# questiongrades

views/designer/index.html

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,7 @@ <h3>{{=message}}</h3>
1010

1111
<p><strong>For Instructors ONLY</strong> If you are a self learner you DO NOT need to build your own course. If you are a student and think that building your own course will show you the answers, YOU ARE WRONG.</p>
1212
<p>
13-
This page allows you to select a book for your own class. Once you have selected and built the book, you will also be
14-
able to edit
15-
the table of contents to re-order or remove content, and create assignments for your students. These assignments
13+
This page allows you to select a book for your own class. Once you have selected and built the book, you will be able to create assignments for your students. These assignments
1614
will be publish
1715
right in the book. As the instructor, You can grade your students homework, and have access to a dashboard that
1816
allows you
@@ -165,6 +163,13 @@ <h3>{{=message}}</h3>
165163
</label>
166164
</div>
167165

166+
<div class="radio">
167+
<label>
168+
<input type="radio" name="coursetype" value="ac1" />
169+
Introduction to Google Sheets and SQL
170+
</label>
171+
</div>
172+
168173
<!-- <label>
169174
OR
170175
</label>

views/layout.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@
245245
{{ pass }}
246246
</p>
247247
<p>
248-
&copy; Copyright 2018 Runestone Interactive LLC
248+
&copy; Copyright {{=request.now.year}} Runestone Interactive LLC
249249
{{ if settings.academy_mode: }}
250250
&emsp; ● <a href="/{{=request.application}}/default/privacy">Privacy Policy</a> &emsp; ● <a href="/{{=request.application}}/default/terms">Terms of Service</a>
251251
{{ pass }}

0 commit comments

Comments
 (0)