diff --git a/assets/Figures/AssignmentExercisesSearch.png b/assets/Figures/AssignmentExercisesSearch.png new file mode 100644 index 00000000..3631c846 Binary files /dev/null and b/assets/Figures/AssignmentExercisesSearch.png differ diff --git a/assets/Figures/GetToInstructor.png b/assets/Figures/GetToInstructor.png index 85cdb957..23842c92 100644 Binary files a/assets/Figures/GetToInstructor.png and b/assets/Figures/GetToInstructor.png differ diff --git a/assets/Figures/GetToInstructorOld.png b/assets/Figures/GetToInstructorOld.png new file mode 100644 index 00000000..85cdb957 Binary files /dev/null and b/assets/Figures/GetToInstructorOld.png differ diff --git a/assets/Figures/InstructorDashboard_CourseAnalytics.png b/assets/Figures/InstructorDashboard_CourseAnalytics.png new file mode 100644 index 00000000..a7d52a64 Binary files /dev/null and b/assets/Figures/InstructorDashboard_CourseAnalytics.png differ diff --git a/assets/Figures/InstructorDashboard_StudentsOnline.png b/assets/Figures/InstructorDashboard_StudentsOnline.png new file mode 100644 index 00000000..0278f955 Binary files /dev/null and b/assets/Figures/InstructorDashboard_StudentsOnline.png differ diff --git a/assets/Figures/InstructorPage.png b/assets/Figures/InstructorPage.png index c7c6615e..fc36e2eb 100644 Binary files a/assets/Figures/InstructorPage.png and b/assets/Figures/InstructorPage.png differ diff --git a/assets/Figures/InstructorPageOld.png b/assets/Figures/InstructorPageOld.png new file mode 100644 index 00000000..c7c6615e Binary files /dev/null and b/assets/Figures/InstructorPageOld.png differ diff --git a/assets/Figures/assignmentBasicInfo.png b/assets/Figures/assignmentBasicInfo.png new file mode 100644 index 00000000..d83252eb Binary files /dev/null and b/assets/Figures/assignmentBasicInfo.png differ diff --git a/assets/Figures/assignmentBuilder.png b/assets/Figures/assignmentBuilder.png new file mode 100644 index 00000000..20213965 Binary files /dev/null and b/assets/Figures/assignmentBuilder.png differ diff --git a/assets/Figures/assignmentExerciseSelect.png b/assets/Figures/assignmentExerciseSelect.png new file mode 100644 index 00000000..a8dce108 Binary files /dev/null and b/assets/Figures/assignmentExerciseSelect.png differ diff --git a/assets/Figures/assignmentExercises.png b/assets/Figures/assignmentExercises.png new file mode 100644 index 00000000..c4f8f547 Binary files /dev/null and b/assets/Figures/assignmentExercises.png differ diff --git a/assets/Figures/assignmentExercisesList.png b/assets/Figures/assignmentExercisesList.png new file mode 100644 index 00000000..66a38493 Binary files /dev/null and b/assets/Figures/assignmentExercisesList.png differ diff --git a/assets/Figures/assignmentList.png b/assets/Figures/assignmentList.png new file mode 100644 index 00000000..96785c18 Binary files /dev/null and b/assets/Figures/assignmentList.png differ diff --git a/assets/Figures/assignmentQuiz.png b/assets/Figures/assignmentQuiz.png new file mode 100644 index 00000000..76067e0b Binary files /dev/null and b/assets/Figures/assignmentQuiz.png differ diff --git a/assets/Figures/assignmentReadings.png b/assets/Figures/assignmentReadings.png new file mode 100644 index 00000000..724f737f Binary files /dev/null and b/assets/Figures/assignmentReadings.png differ diff --git a/assets/Figures/assignmentType.png b/assets/Figures/assignmentType.png new file mode 100644 index 00000000..f8cb5250 Binary files /dev/null and b/assets/Figures/assignmentType.png differ diff --git a/assets/Figures/chapterActivityMenus.png b/assets/Figures/chapterActivityMenus.png new file mode 100644 index 00000000..e41a444e Binary files /dev/null and b/assets/Figures/chapterActivityMenus.png differ diff --git a/assets/Figures/copyAssignmentMenu.png b/assets/Figures/copyAssignmentMenu.png index a7ae62a2..55504db4 100644 Binary files a/assets/Figures/copyAssignmentMenu.png and b/assets/Figures/copyAssignmentMenu.png differ diff --git a/assets/Figures/copyAssignmentMenuOld.png b/assets/Figures/copyAssignmentMenuOld.png new file mode 100644 index 00000000..a7ae62a2 Binary files /dev/null and b/assets/Figures/copyAssignmentMenuOld.png differ diff --git a/assets/Figures/createActiveCode.png b/assets/Figures/createActiveCode.png new file mode 100644 index 00000000..3ad50c93 Binary files /dev/null and b/assets/Figures/createActiveCode.png differ diff --git a/assets/Figures/createMCQ.png b/assets/Figures/createMCQ.png new file mode 100644 index 00000000..5cdde52b Binary files /dev/null and b/assets/Figures/createMCQ.png differ diff --git a/assets/Figures/createNewExercise.png b/assets/Figures/createNewExercise.png new file mode 100644 index 00000000..7b65e913 Binary files /dev/null and b/assets/Figures/createNewExercise.png differ diff --git a/assets/Figures/createParsons.png b/assets/Figures/createParsons.png new file mode 100644 index 00000000..2f40f28b Binary files /dev/null and b/assets/Figures/createParsons.png differ diff --git a/assets/Figures/exerciseMultipleChoice.png b/assets/Figures/exerciseMultipleChoice.png new file mode 100644 index 00000000..327cb95e Binary files /dev/null and b/assets/Figures/exerciseMultipleChoice.png differ diff --git a/assets/Figures/exerciseTypes.png b/assets/Figures/exerciseTypes.png new file mode 100644 index 00000000..845eb228 Binary files /dev/null and b/assets/Figures/exerciseTypes.png differ diff --git a/assets/Figures/manage_students.png b/assets/Figures/manage_students.png index 1ab9aa07..7a73aa92 100644 Binary files a/assets/Figures/manage_students.png and b/assets/Figures/manage_students.png differ diff --git a/assets/Figures/manage_studentsOld.png b/assets/Figures/manage_studentsOld.png new file mode 100644 index 00000000..1ab9aa07 Binary files /dev/null and b/assets/Figures/manage_studentsOld.png differ diff --git a/assets/Figures/mcqOptions.png b/assets/Figures/mcqOptions.png new file mode 100644 index 00000000..eeff9b25 Binary files /dev/null and b/assets/Figures/mcqOptions.png differ diff --git a/assets/Figures/mcqSettings.png b/assets/Figures/mcqSettings.png new file mode 100644 index 00000000..06aea866 Binary files /dev/null and b/assets/Figures/mcqSettings.png differ diff --git a/assets/Figures/selectAssignments.png b/assets/Figures/selectAssignments.png index ec316acd..c3bf8a19 100644 Binary files a/assets/Figures/selectAssignments.png and b/assets/Figures/selectAssignments.png differ diff --git a/assets/Figures/timedExamReset1.png b/assets/Figures/timedExamReset1.png new file mode 100644 index 00000000..5eb2be26 Binary files /dev/null and b/assets/Figures/timedExamReset1.png differ diff --git a/assets/Figures/timedExamReset2.png b/assets/Figures/timedExamReset2.png new file mode 100644 index 00000000..1e18caac Binary files /dev/null and b/assets/Figures/timedExamReset2.png differ diff --git a/assets/Figures/timedExamReset.png b/assets/Figures/timedExamResetOld.png similarity index 100% rename from assets/Figures/timedExamReset.png rename to assets/Figures/timedExamResetOld.png diff --git a/pretext/Assignments/assembleAssignment.ptx b/pretext/Assignments/assembleAssignment.ptx index 71b67db6..39ae6c58 100644 --- a/pretext/Assignments/assembleAssignment.ptx +++ b/pretext/Assignments/assembleAssignment.ptx @@ -3,143 +3,169 @@
+
To create an assignment, whether graded or ungraded, start by going to the Assignments - tab on the instructor interface. Click on the Add button to start creating a new - assignment. On the popup that appears you will notice that you can also copy an old - assignment as a starting point.
+To create an assignment, go to Instructor Dashboard and click on the new Assignment Builder button under Assignments & Grading +
Provide a name for the assignment.
-This will take you to a list of assignments that you have created or copied. + Click on + Create New Assignment button on the top right corner of the page.
+Add a description and check the other options.
+Fill in the basic information for the new assignment such as a name, description, + and due date. Then, click on the Next button. + The builder will give an error message if the name of the assignment is not unique among your assignments.
+Click on Save
to save the assignment. It will show an alert as shown below.
- Click on Ok
.
Please take note of the visible to students check box. If you forget to check this - box then the assignment will not show up in the list that your students (or you) can - see on the assignment page.
-There are 3 types of assignments that you can create: Regular, Quiz/Exam, or Peer Instruction. + Choose Regular for an ordinary assignment and then click on the Create button. + See the next chapters for information on quizzes and peer instruction.
+You will be put into the assignment page with three tabs on the left: Basic Info, Readings, and Exercises. + Readings allow you to select whole chapters or parts of chapters for + your students to read. You can assign points to the readings by tracking the number + of activities they attempt in each subchapter. In readings, these are only graded for interaction, not correctness. + Exercises are individual problems for students to solve that can be graded for correctness, including active code, + short answer, multiple choice, parsons problems, etc. These can be from the ebook that you are using or even problems that you write yourself. + An assignment can have just readings, just exercises, or both. See the subsections below for setting up Readings and Exercises.
+ +There are two primary kinds of assignments.
In either case the primary way you will add questions is through the tree picker interface. - This interface is accessed by expanding either the Readings or Problems accordion and allows - you to drill down from chapter to section to individual problems. There are several icons - associated with problems to help you know what you are looking at.
+ This
Let's create a reading assignment and add a few sections for our students to read. As you add - sections you will see that are shown in a table under the Readings tab.
-There are four things you can change for each section:
+Click on the Readings tab and then the Choose Readings button. + Choose subchapters or pages that you want your students to read. + Click on a white space below the pop up menu to close it when you are done selecting readings. +
+There are 2 things you can change for each reading:
# required - How many of the components on the page do you students need to do in order - to get the points for this section.
-How many points for completing this section?
-Auto-grade - interaction means that the students have done something
+# required: How many of the activities on the page do you students need to do in order + to get the points for this section. These are only graded for interaction or attempts, not correctness. They will get 1 activity for visiting the page. By default, this is set to 75% of the number + of activities on the page. Please remember that the number required for the points is all or nothing, so if they miss one they will not get the points. + This is why it may be better to leave it at 75% or a little below the number of activities in case they miss one.
which to grade - first answer, best answer, or last answer
+Points: How many points for completing this section. You can click on the pencil button at the top if you want to change the number of points for all the readings at once.
Creating a problem assignment is similar. You will most often use the tree picker, but you - can also search for problems or write your own. When selecting a problem if you click on the - name of the problem the interface will display the problem on the page remind you what it is - about.
-Problems have a different set of configurations
+Click on the Exercises tab on the left to add individual exercises for students to do that can be graded for correctness. + Then, click on the + Add Exercises button on the right. + You will see 3 choices: Browse Chapter Exercises, Search Exercise, and Create New Exercise. + Click on Browse Chapter Exercises to choose exercises.
+Scroll to the chapter and subchapters that you want and click on the triangles next to them to expand them. + When you see the exercises, you can click to choose them or click the eye to preview them before choosing. + Exercises can be from the ebook that you are using, written by its author, or contributed by the community. + If the exercise has a name that starts with the ebook's name like "csawesome2__" and has a book icon under the source column, then it is + from the ebook, shown in the red box below. If it has a percon icon under Source, it is contributed by another teacher in the community, shown in the purple box below. + There are also controls in the green box below that can be used to filter by problem type or to just show the problems from the book. + After selecting problems, click on the orange Choose exercises button to add them to the assignment. +
+After adding the exercisee to the assignment, you will see the list of exercises you have chosen. You can drag to reorder them. + And there are 3 things you can change for each exercise:
+
Points - how many points for this question
+Autograde: options here are % correct, All or nothing, Interaction, or manual. If the exercise has unit test autograding code, + it will be set to "% correct". If it does not have autograding, it will be set to manual, where you will need to grade it.
Auto-grade – options here are % correct, All or nothing, Interaction, or manual.
+Which to Grade: Best Answer, first answer or last answer
which to grade – Best Answer, first answer or last answer
+Points: how many points for this question. The pencil button at the top of each column can be used to change the + number of points for all the exercises at once.
Problems with the book icon next to them are written by the author. Problems with the - schoolhouse are contributed by the community. If a problem has a checkmark next to it then you - know it can be automatically graded.
+ + +Some books have large quizbanks of community contributed questions. However, some of these community contributed exercises might have errors. If you are previewing a question and it
+ is obviously bad, or incorrect, or just someone experimenting, use the
You can also Search Exercises by name or keyword or author if you are looking for something specific. Click on Add Exercises button and then select Search Exercises instead of Browse Chapter Exercises. Type in a search word and enter in the search box. You can filter by type. The default is to search for exercises associated with the ebook that you are in, but you can toggle "Book Exercises" to "All Exercises" to search for exercises in other books. You can then click to select or preview exercises from the results and then click on the orange Choose Exercises button to add them to the assignment. You can also Copy Exercises to change them.
+When you are done adding exercises, click on the back arrow by the assignment name or on the Assignment Builder button at the top to return to the main assignment list page. By default, the new assignment will not be visible to students.
+Please make sure that you slide the visibility toggle of an assignment in the assignments list to visible when you want your students to see it. If you forget to toggle this to visible, then the assignment will not show up in the list that your students can see on the assignment page.
+Runestone allows you to create accommodations for students who need them. You can create an - accommodation for a student by clicking on the accommodations menu item in the assignment - builder, or use the link from the course home page. There are three kinds of accommodations + accommodation for a student in the Instructor Dashboard by clicking on Manage Accommodations under the Student Management menu or use the link from the course home page. There are three kinds of accommodations that you can create:
This is for situations where the assignment is not visible to the students, but you would like to mail the student a link to an exam, maybe a makeup exam. Or an extra assignment, or - whatver. This accommodation requires both a student and an assignment. When the + whatever. This accommodation requires both a student and an assignment. When the accommodation is saved, then the assignment will show up for the student in their assignment list, or you can email the student a link to the assignment and they will have access.
diff --git a/pretext/Assignments/copyAssignment.ptx b/pretext/Assignments/copyAssignment.ptx index 6c1d6252..f01a8f32 100644 --- a/pretext/Assignments/copyAssignment.ptx +++ b/pretext/Assignments/copyAssignment.ptx @@ -3,58 +3,31 @@You may have multiple sections where you want to share assignments, or you may simply want to copy your assignments from the last time you taught a course to your current course. You can do this.
+You may have multiple sections where you want to share assignments, or you may simply want to copy your assignments from the last time you taught a course to your current course. Choose "Copy Assignment" from the Instructor Dashboard under the "Assignments & Grading" menu. Before copying assignments, it is a good idea to make sure that the course settings has the correct start date in the "Course Settings" in the "Course Administration" menu of the Instructor Dashboard so that the due dates are adjusted properly.
The copy assignment tab lets you select any of your old or current courses that use the same book.
-At the copy assignment page, select any of your old or current courses that use the same book or the base course if the author has created base course assignments.
+Once the course is selected you can copy one or all of the assignments to your course. If you do this multiple times courses with the same name will be ignored on the second copy. This makes it a little easier if you just want to keep one course in sync with another so you don't have to remember and pick and choose.
The system will add the assignments to your current course and make its best guess to adjust the due date, based on the number of days from the beginning of each course. This is going to get you in the ballpark but you will probably have to manually adjust it due to differences in the calendar from year to year.
+The system will add the assignments to your current course and make its best guess to adjust the due date, based on the number of days from the beginning of each course set in the Course Settings in the "Course Administration" menu of the Instructor Dashboard. This is going to get you in the ballpark, but you will probably have to manually adjust it due to differences in the calendar from year to year.
Some authors have provided a pre-made set of assignments. You can copy these from the "base course" after you have created your course. The "base course" is the code for the book that you chose when you created your own course. Not all authors have done this yet, so your results will vary.
+Help, this is my first time teaching this class and I want to copy assignments from another instructor. This is very possible if the instructor is still available. You simply need to enroll in their course and have them make you a TA. Then you will be able to copy the assignments from their course to yours.
If the previous instructor is not available then we can still probably make it happen, but you are going to have to go out of your way to prove that your request is legit. Sorry, we cannot just take your word for it over email. A link to your faculty page, that verifies your email as a legitimate instructor at the same institution of the instructor of the course you want to copy. We would love to just trust everyone, but data privacy laws are strict and we have to to treat data privacy very carefully. Thanks for understanding.
Some authors have provided a pre-made set of assignments. You can copy these from the "base course" after you have created your course. The "base course" is the code for the book that you chose when you created your own course. Not all authors have done this yet, so your results will vary.
-In the new Assignment Builder in the Instructor Dashboard, you can choose to make a new assignment a Quiz/Exam like below where you can select whether there is a time limit and whether pauses and feedback are allowed.
+If you look at Figure 1 on this page again, you will see there is a checkbox labelled Show as Timed Assessment
This turns a problem assignment into an exam. There are severall things to note about this. First is the appearance to the students, when the students first see a timed exam it looks like this:
When the students first see a timed exam, it looks like this:
When the student navigates to the new question the question they were on is evaluated and the results are sent to the server. Questions that a student has attempted are marked as grey on the numbered interface so students know which questions they have answered.
During an exam the student will not see any feedback on whether they answered the questions right or wrong. Once the exam is completed they will see that feedback unless you have checked the don't show feedback checkbox.
It is important to remind students that if they close the tab or their browser or navigate away from the page or even try to refresh the page, the exam is over and they will not be able to answer any more questions. Once they click the finish exam button they are done. As an instructor you can reset a students exam from the instructors page, but they will be forced to start over.
-When a student submits their exam with the finish exam button or when the exam is automatically submitted due to time expiring, the autograder is run on the server and a score is recorded. If all your questions are autogradable you're done! If not you can use the grading interface to manually grade any questions.
+When a student submits their exam with the finish exam button or when the exam is automatically submitted due to time expiring, the autograder is run on the server and a score is recorded. If all your questions are autogradable you're done! If not, you can use the grading interface to manually grade any questions.
The instructor interface allows you to reset an exam for any student.
+The instructor dashboard allows you to reset an exam for any student.
You just select the student and the assessment name and then press the red reset button.
+You just select the student and the assignment name and then press the red button.
One of the primary goals of the Runestone Instructor Interface is to help you understand where your students are at, and to help you to prepare and make the best use of classtime. We set out to create an interface where you could see at a glance which concepts your students clearly got
and which concepts they were struggling with so that you can spend your valuable class time on the topics that were confusing rather than boring them by covering material they clearly understand. To really be effective with this strategy you should use reading assignments as described in
The Runestone Instructor Dashboard, updated in 2025, provides a variety of tools for instructors to monitor student progress, create assignments, create new exercises, and analyze performa.
+One of the primary goals of the Runestone Instructor Dashboard is to help you understand where your students are at, and to help you to prepare and make the best use of classtime. We set out to create an interface where you could see at a glance which concepts your students clearly got
and which concepts they were struggling with so that you can spend your valuable class time on the topics that were confusing rather than boring them by covering material they clearly understand. To really be effective with this strategy you should use reading assignments as described in
As an instructor, you can access a variety of instructor features. To get to the instructors page follow these steps:
+As an instructor, you can access a variety of instructor features. To get to the Instructor Dashboard follow these steps:
Make sure you are logged in to a course for which you are an instructor. If necessary, click on the person icon at top right and select Change Course to get to a course that you are instructor for, or logout and login with a different account.
Click on the person icon on the top right of the window and select Instructor's Page
+Click on the person icon on the top right of the window and select Instructor Dashboard
You will see the instructor page as shown below. You may be on a different tab that what is shown below.
+You will see the Instructor Dashboard as shown below.
Many actions that students take are logged. These include:
+ +In the new Instructor Dashboard, you can view student activity reports such as Chapter Activity and Exercise Metrics in the Course Analytics menu. You can also download the course logs and csv files.
+The following student activities are logged:
There are many ways to monitor student progress. Starting at the main instructor page here are two of them.
+The following video provides an overview of the various student activity reports (in the older interface):
+ + ++ Under Student Management, you can add and remove students from your class, reset their passwords, manage accommodations, and view students online and what page they are working on in real time.
One very easy to use report that allows you to quickly see how much work your students are doing on each page is the Chapter Progress Report. It looks like this:
+One very easy to use report that allows you to quickly see how much work your students are doing on each page is the Chapter Activity report found under Course Analytics.
+On the Chapter Activity (Student Progress) page, pull down the first menu to select a chapter and pull down the second menu to see different reports on the count of activities that students have completed and how many were correct, as well as their first and last interaction date/times. These reports can be downloaded as CSV files and can be opened as spreadsheets. You can also filter by chapter or any other search criteria using the down arrow next to the column headers.
It can quickly show you the number of elements on each page that your students have interacted with. The dropdown menu gives you other options such viewing the first time a student interacted with an element, the last time a student interacted with the element, and an overview of the number of times a student has interacted. You can also filter by chapter or any other search criteria using the popup menu on the chapter_label column. Just experiement a bit.
+.
The numbers in each cell are clickable so you can drill down into a particular page for a particular student to see what they have done and the number of interactions with each element.
The instructor interface lets you see summaries of some of these activities that may be useful to you. To get started, from the instructor interface, click on the Student Progress tab.
+The instructor interface lets you see summaries of some of these activities that may be useful to you. To get started, from the instructor Dashboard, click on Course Analytics and then Exercise Metrics.
-
If you have assigned students to read a particular chapter prior to (or after) class, you can see at a glance what percentage of them have looked at each of the pages in a chapter. In the upper right hand corner, you can select a chapter. Then look at the left side.
--
You can see how students did on the multiple choice problems in the chapter. Some instructors have found it useful to focus in class on those questions where many students got the question wrong initially. Currently, the interface sorts the questions in order of the percentage of students who got them right the first time, so you may want to scroll down to find the ones they had trouble with.
-When you created the course, you chose a project name. Give that text string to students. +
When you created the course, you chose a unique course name. Give your course name to students.
They will register on the site and enter that string as their course name. If you've forgotten
- what the string is, you can see it displayed on the Course selection page You can also pre-register your students by creating a CSV file and uploading that file
- through the instructor interface. Pull down the 👤 menu and Choose Instructor Page then
- click on the button for Manage Students. You will see a page like this:
You will see a page like this:
In the final exercise for the night, add your own question to the exercise bank using the web interface.
-You can make it any kind of question you would like, but it would be great if it was a real exercise that you like to use in one of your own courses.
-To keep the build system from bogging down, you can let me know once you have saved an exercise and I'll pull it into the sigcse2019 book and build it for you.
-Make sure you assign at least 0 points to your question before you press done. If everything works, you will get a popup telling you that the question has been added successfully.
-Active Code exercises are coding exercises that allow students to write and run code directly within the ebook. These exercises provide an interactive way for students to practice coding skills, receive immediate feedback, and enhance their understanding of programming concepts. Active Code exercises can be created in various programming languages, including Python, JavaScript, Java, C++, and others supported by the Runestone platform.
+ +Here is an example of a simple Active Code exercise in Python:
+Write a Python function that takes two numbers as input and returns their sum.
+
+def add(a, b):
+ # complete this function to add a and b and return the sum
+
+ To write your own Active Code exercises, start or go to any assignment in the Instructor Dashboard "Assignment Builder". In the Exercises section of the assignment, click on "Add Exercise" and select "+ Create New Exercise" and then select "Active Code".
+In step 1 Language, select the coding language for the exercise.
+In Step 2 Instructions, write the instructions for the students using Markup or enter / for formatting options.
+In Step 3 Hidden Prefix, you can optionally provide hidden code that is run before the students code. This is usually left blank.
+In Step 4 Starter Code, write the code that you want the students to complete in the code editor. You can provide starter code or just comments or leave it blank for students to fill in.
+
In Step 5 Hidden Prefix, you can optionally add unit tests to automatically grade the students' code. These tests will run when the student clicks the "Submit" button, and they will receive feedback based on the results of the tests. The next section will explain how to write unit tests.
+In Step 6, you can optionally provide standard input that the student's code can read from if needed. This is usually left blank.
+In Step 7, you can change the settings to set the chapter and section where you want the exercise stored in the assignment builder (where it will show when browsing chapters in the assignment builder), the author, the topic, the number of points for the question, and add tags to help you find the question later. If you change the name of the exercise, make sure it is unique! You can also choose to make the exercise private or contribute it to the question bank for other teachers to use. Please make experimental questions private.
+Then, you can preview and test the problem before saving the problem.
+The real killer feature of these exercises is to be able to create your own unit tests and have the exercise be autograded.
+Let's expand our example to include some simple unittests. We can do this by adding a hidden block of code to our previous example in step 5 Hidden Prefix that uses the standard Python unittest framework. Be careful with using the correct indentation when typing in Python.
+
+from unittest.gui import TestCaseGui
+
+class myTests(TestCaseGui):
+
+ def testOne(self):
+ self.assertEqual(add(2,2),4,"Call to add(2,2) should return 4")
+ self.assertAlmostEqual(add(2.0,3.0), 5.0, 1, "Call to add(2.0,3.0) should return 5.0")
+
+myTests().main()
+
+ If you are not familiar with Python unittests they are pretty easy to write. You create your own class that is a subclass of TestCase, or in our work TestCaseGui so we get some graphical output. Your tests are all methods of the class and must start with the word test
. There are a host of assertXXXX functions that you can use. Check out the
You can create Active Code exercises in other languages supported by Runestone and use their unit testing libraries. For Java, there is the JUnit library as well as a custom library developed by Kate McDonnell for CSAwesome that makes it easy to write autograding unit tests. Here is an example:
++ Complete the method called square that takes an integer as input and returns its square. Then, call the square method in the main method to print out the square of 6. +
+
+public class SquareMethod
+{
+ public static int square(int number)
+ {
+ // TO DO: complete this method to return the square of number
+
+ }
+
+ public static void main(String[] args)
+ {
+ System.out.println("5 squared is " + square(5));
+ // TO DO: Call the square method to print out the square of 6
+
+ }
+}
+
+ The unit test code which would be put in the hidden suffix section in step 4 is as follows:
+
+import static org.junit.Assert.*;
+import org.junit.*;
+import java.io.*;
+
+public class RunestoneTests extends CodeTestHelper
+{
+ @Test
+ public void containsCall()
+ {
+ boolean passed = checkCodeContains("square(6)", "square(6)");
+ assertTrue(passed);
+ }
+ @Test
+ public void testMain() throws IOException
+ {
+ String output = getMethodOutput("main");
+ String expect = "36";
+ boolean passed =
+ getResults(expect, output, "Expected output from main");
+ assertTrue(passed);
+ }
+ @Test
+ public void testSquare()
+ {
+ Object[] args = {9};
+ String output = getMethodOutput("square", args);
+ String expect = "81";
+
+ boolean passed = getResults(expect, output, "square(9)");
+ assertTrue(passed);
+ }
+}
+
+ In this example, we have three tests. The first test checks that the student's code contains a call to square(6). The second test runs the main method and checks that the output contains 36 (the square of 6). The third test calls the square method with an argument of 9 and checks that the return value is 81.
+ +This
Another common question type is the multiple choice question.
-Here is an example from a Data Structures class:
-A common question type is the multiple choice question like below.
+ +3-1-1: Given the following sequence of stack operations, what is the top item on the stack when the sequence is complete?
-What does the following code print?
+
+System.out.println(2 + 3 * 5 - 1);
+
'x'
+24
You may want to check out the docs for isEmpty
++ This would be true if it was System.out.println(((2 + 3) * 5) - 1), + but without the parentheses the multiplication is done first. +
the stack is empty
+14
There is an odd number of things on the stack but each time through the loop 2 things are popped.
++ This would be true if it was System.out.println(2 + (3 * (5 - 1))), + but without the parentheses the multiplication is done first and the + addition and subtraction are handled from left to right. +
an error will occur
+This will give a compile time error.
Good Job.
++ This will compile and run. Try it in DrJava. Look up operator + precedence in Java. +
'z'
+16
You may want to check out the docs for isEmpty
++ Correct! Remember PEMDAS. The multiplication is done first (3 * 5 = 15) and then the addition (2 + 15 = 17) and finally the subtraction (17 - 1 = 16). +
The source code is here:
-To create multiple choice questions, start or go to any assignment in the Instructor Dashboard "Assignment Builder". In the Exercises section of the assignment, click on "Add Exercise" and select "+ Create New Exercise" and then select "Multiple Choice".
+Enter the question. Type in / and press enter to see the menu to format the text and add in images, tables, code blocks, etc. You can also just use Markdown syntax directly (
Click on Next or 2 to move to the Options tab and enter the multiple choice options. Click on Add Option to add more options. Click on the checkmark next to "Correct" to mark a correct option. You can mark more than one answer as correct. You can also add feedback for each choice that will be shown to the student after they answer the question. Do / and enter to see the format menu or use markdown for each option.
+Click on Next or 3 to move to the Settings tab. Here you can set the chapter and section where you want the exercise stored in the assignment builder (where it will show when browsing chapters in the assignment builder), the author, the topic, the number of points for the question, and add tags to help you find the question later. If you change the name of the exercise, make sure it is unique! Some authors put their author names in the exercise name too to make them easier to find. You can also choose to make the exercise private or contribute it to the question bank for other teachers to use. Please make experimental questions private.
+Make sure that you Preview the exercise in step 4 and test it before saving it. Although there is no way to delete an exercise once it is saved, you can always edit it later to fix mistakes, make it private, or flag it for the volunteers to fix or delete.
Mixed-up code or Parsons problems provide the correct code to solve a problem, but the code is broken into blocks and mixed up.
-Create a working program and then paste the code for it into the editor. Indent the code so that the left edge lines up with the options. Indent each line with 4 spaces beyond the previous line. Separate the blocks with =====
which must line up under the options. Put the instructions before the code after a blank line and then followed by ----
.
Parsons problems, also known as mixed-up code problems, are a type of coding exercise where students are presented with a set of code blocks that are mixed up or out of order. The goal is for students to rearrange these blocks into the correct sequence to form a functioning program or solve a specific problem. This type of exercise helps students develop their understanding of code structure, logic, and flow control. They can also be used for pseudocode or mathematical proofs.
+Here is an example:
+The following has the correct code to ‘swap' the values in x and y (so that x ends up with y's initial value and y ends up with x's initial value), but the code is mixed up and contains <b>one extra block</b> which is not needed in a correct solution. Drag the needed blocks from the left into the correct order on the right. Check your solution by clicking on the <i>Check Me</i> button. You will be told if any of the blocks are in the wrong order or if you need to remove one or more blocks.
+Options are indented under the Parsons directive (under the p).
-You can include distractor blocks in the problem. A distractor is code that isn't needed in a correct solution, such as code with a syntax error. Add a distractor block after the correct code block. Distractors can either be paired or unpaired. For paired distractors use #paired at end of the first line of code in the distractor block. For unpaired distractors add #distractor.
-You can include distractor blocks in the problem. A distractor is code that isn't needed in a correct solution, such as code with a syntax error. Distractors can either be paired or unpaired.
+Here is an example with paired distractors from a data oriented intermediate programming course in Python.
The source code for this problem is shown here:
-Here is an example with an unpaired distractor.
-The following has the correct code to ‘swap' the values in x and y (so that x ends up with y's initial value and y ends up with x's initial value), but the code is mixed up and contains <b>one extra block</b> which is not needed in a correct solution. Drag the needed blocks from the left into the correct order on the right. Check your solution by clicking on the <i>Check Me</i> button. You will be told if any of the blocks are in the wrong order or if you need to remove one or more blocks.
-The source code for this problem is shown here.
-To create your own Parsons problems, start or go to any assignment in the Instructor Dashboard "Assignment Builder". In the Exercises section of the assignment, click on "Add Exercise" and select "+ Create New Exercise" and then select "Parsons Prob".
+In step 1, select the coding language or text content for English or another natural language content.
+In Step 2, write the instructions for the students using Markup or enter / for formatting options.
+In Step 3, type in code or text into blocks as shown below. Create the correct solution for the problem. It will be randomly mixed up when presented to students. Click the "Add block" button at the top right or the + at the end of the blue line in between blocks to create new blocks. Click the copy button to create distractors and choose the correct one.
+ +In Step 4, you can change the settings to set the chapter and section where you want the exercise stored in the assignment builder (where it will show when browsing chapters in the assignment builder), the author, the topic, the number of points for the question, and add tags to help you find the question later. If you change the name of the exercise, make sure it is unique! You can also choose to make the exercise private or contribute it to the question bank for other teachers to use. Please make experimental questions private..
+In Step 5, you can preview and test the problem before saving the problem.
+ +Although all of the Runestone books have a pretty good selection of exercises, you can never have too many exercises. We hope to crowd source an enormous collection of questions and problems in our Exercise database. You can help by adding custom exercises for your own course to the database! Once your exercise is in the database it is available for others to find using the search feature on the create assignment page.
-Since the most common exercises are programming exercises let's look at the activecode directive in detail. Here is the full directive with every possible option. This is what you would see if you add an activecode exercise from the web interface. Let's not get bogged down in the details here, let's look at a much simpler example.
-Let's make an exercise to have the student compute the sum of the first N numbers.
-The new Assignment Builder makes it easy to write your own exercises! Although all of the Runestone books have a pretty good selection of exercises, you can never have too many exercises. We hope to crowd source an enormous collection of questions and problems in our Exercise database. You can help by adding custom exercises for your own course to the database! Once your exercise is in the database, it is available for others to find using the search feature on the create assignment page. Community contributed exercises are shown with a person icon instead of a book icon under the source column.
+ +To create new exercises, start or go to any assignment in the Instructor Dashboard "Assignment Builder". In the Exercises section of the assignment, click on "Add Exercise" and select "+ Create New Exercise".
+There are many different types of exercises that you can create as shown below. Some of these are discussed further in the sections below.
+Here are some examples of these different types of exercises. In the next pages, we will go through the steps to create some of these exercises.
+ +Here is an example Multiple Choice Exercise:
+What does the following code print?
+
+System.out.println(2 + 3 * 5 - 1);
+
+ 24
++ This would be true if it was System.out.println(((2 + 3) * 5) - 1), + but without the parentheses the multiplication is done first. +
+14
++ This would be true if it was System.out.println(2 + (3 * (5 - 1))), + but without the parentheses the multiplication is done first and the + addition and subtraction are handled from left to right. +
+This will give a compile time error.
++ This will compile and run. Try it in DrJava. Look up operator + precedence in Java. +
+16
++ Correct! Remember PEMDAS. The multiplication is done first (3 * 5 = 15) and then the addition (2 + 15 = 17) and finally the subtraction (17 - 1 = 16). +
+Parsons (Mixed up Code) Problem:
+ +Write a Python function to sum the first N numbers starting with 0. So if N is 4 then your function should add 0 + 1 + 2 + 3
++ The following has all the correct Java code to print out “Hi there!” when + the code is run, but the code is mixed up and contains some extra + blocks with errors. Drag the needed blocks from left to right and put + them in the correct order. Click on the “Check Me” button to check + your solution. +
The source code for the above looks like this:
-Indentation and whitespace is important. In the previous example, you will see that the optional directive a
in activecode, but using 4 keeps it consistent with my own personal python indentation style. Everything else in the body of the directive must also be indented to match the indentation of the optional parameters.
You can enter this into a textbox by clicking on the Write
button under the Problems area.
After you enter the text you need to compile and render the text. You can get a preview of your question on the right of the page.
- -The first part of the directive body are the instructions for the student. You can use any valid restructured text (rst) in this part of the directive including embedded images. You separate the instructions from any code you want to give the student with
To keep an exercise page looking a bit neater you can substitute the
Here is an example of a simple Active Code exercise in Python:
+Write a Python function to sum the first N numbers starting with 0. So if N is 4 then your function should add 0 + 1 + 2 + 3
+Write a Python function that takes two numbers as input and returns their sum.
+def add(a, b):
+ # complete this function to add a and b and return the sum
+
+ Of course, as you have learned in the previous section, the real killer feature of these exercises is to be able to create your own unit tests, and have the grader autograde the assignment.
-Let's expand our example to include some simple unittests. We can do this by adding a hidden block of code to our previous example that uses the standard Python unittest framework.
-If you are not familiar with Python unittests they are pretty easy to write. You create your own class that is a subclass of TestCase, or in our work TestCaseGui so we get some graphical output. Your tests are all methods of the class and must start with the word test
. There are a host of assertXXXX functions that you can use. Check out the
The second important addition in this example is the :autograde: option. This will allow the grade to make use of your unittests and assign a grade automatically for this particular problem.
-Here is an example of a Drag and Drop matching questions. You can also have Matching questions where + you draw lines to match many to many objects.
+Write a Python function to sum the first N numbers starting with 0. So if N is 4 then your function should add 0 + 1 + 2 + 3
++ Drag the definition from the left and drop it on the correct concept + on the right. Click the "Check Me" button to see if you are correct. +
Review the summaries above.
+Let's try to add another test to the example above. This time we'll show the unittests in the active code window to make it easy for us to test. I strongly recommend you do this in a scratch activecode window when you are writing a question. It will save lots of frustrating wait time as you work out the details of your testing.
-Let's try to add another test to the example above. This time we'll show the unittests in the active code window to make it easy for us to test. I strongly recommend you do this in a scratch activecode window when you are writing a question. It will save lots of frustrating wait time as you work out the details of your testing.
-Clickable Area:
+Write a Python function to sum the first N numbers starting with 0. So if N is 4 then your function should add 0 + 1 + 2 + 3
+Click on the constructor headers (signatures)
+ Constructors are public and have the same name as the class. Click on + the constructor headers which are the first line of the constructors + showing their name and parameters. +
+Fill in the Blank:
+What Java data type should you use for a shoe size like 8.5?
+
+
-
– This option lets you include other activecodes in the current
-seconds – What to do when students create an infinite loop and lock up their browser? Just wait a bit, every run of Python has a built in time limit of 30 seconds. Some things might take longer than this, so if you know an example or assignment is going to take longer, then you can set a higher time limit with this option.
-– codelens is an awesome addition, but it does not work with very many libraries. This is part of the sandboxed security of the codelens server. The most common one to be aware of is the turtle module. If you are doing a turtle example or assigning a turtle problem then you should set this flag so the Show Codelens
button is hidden.
-
– As you saw earlier, Runestone supports Java, python2, and python3 in a sandboxed server environment environment.
-If you choose any of the above, the code from the window is packaged up and set to a separate server for compilation and execution. There are a few options to activecode that only apply to these languages.
--
You can provide an id to a datafile that will be sent along with your Java code
-You can provide additional source files that should be compiled along with the java file you upload.
-You can provide additional binary files to link into the final executable.
-Short Answer
++ Write an algorithm for someone (maybe a robot) to make a peanut butter and jelly sandwich. + Be sure to include at least 5 precise steps in order. + Have someone (maybe your instructor) act it out. Were your instructions precise enough? +
+Poll
+ +I am a
+beginner programmer
+intermediate programmer
+expert programmer
+prefer not to answer
+Select Questions allow the students to choose between already existing questions:
+
print("My first program adds a list of numbers")
myList = [2, 4, 6, 8, 10]
total = 0
for num in myList:
total = total + num
print(total)
-
+
With Sphinx I had a way to write large documents in a very simple markup language called