cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Add Regular Expressions to Quizzes

Add Regular Expressions to Quizzes

This idea has been developed and deployed to Canvas

 

          

Currently in quizzes, for fill-in-the-blank or short-answer questions, you have to come up with every possible phrase combinations to match what students might type that would be correct. Previous recommendations asked that the answer "contain" keywords rather than match.

I would like to see regular expressions, which have been in every major programming language since the 1950's and every LMS until Canvas. Regular expressions are also known as regex, pattern matching, and wildcards.

Here is a good example:

    Who was the major African-American civil rights leader of the 1960's assassinated in 1968?

The official answer is "Dr. Martin Luther King, Jr.", but what if they forget to put "Dr.", abbreviate Luther as "L.", or forget "Jr.". Is it wrong? How many permutations of the right answer could there be? Is punctuation included?

Using regex, the answer would be /.*Martin.*L.*King.*/i, meaning anything before Martin, must contain an L
between Martin and King, can contain anything after King, and "i" means case insensitive. If you use "g" with the "i", you
can apply multiple phrases across an entire document so you can check papers for content automatically.

Please add this to quizzes. Most programming languages (including JavaScript) accept this as a phrase or function.

This extends upon Allow fill-in-the-blank answers that can *contain* a term vs having to match a term  and Improve Regular Expression Tool (pattern matching).

 

Comments from Instructure

This idea was completed with general availability of Quizzes.Next.  You can find more information about the overall project in the Quizzes.Next User Group.‌

  • Quizzes.Next is now available for all paid accounts.
  • Quizzes.Next documentation will live in the Quizzes.Next User Group until July 14, 2018. On July 14, 2018, all of the documentation will be moved to the Canvas Guides in the Canvas Instructor Guide or Canvas Student Guide
  • Quizzes.Next updates will be included in the Canvas Release Notes. This includes new features, updated features, and relevant fixed bugs. New and updated features will be deployed to Quizzes.Next near the same time as the Canvas release. Fixed bugs may be deployed at any time.
42 Comments
Renee_Carney
Community Team
Community Team

This idea was moved from Under Consideration stage (no longer in use) to the Product Radar stage.  

This change was made as part of a feature idea process evolution.  Find more information, and contribute insights, by joining Focus Group: DRAFT Feature Idea Space

ryan_corris
Advocate

This would be a very nice feature!

tsawicki
New Member

This sounds far superior to trying to guess and enter every possible correct permutation to an answer.  I would certainly take the time to learn how to use this.

ronmarx
Community Contributor

I would certainly take the time to learn how to use this too!

Hopefully regex will become part of the Quizzes.Next upgrade.

hasti
Community Champion

Please, please, please, a thousand times please, add this feature to quizzes!!!!!!

I teach computer programming/math based classes and the ability to at least be able to specify that spaces are unimportant is critical (including leading spaces, which currently students can enter but I can't enter as legit correct answers!).

Quick trivial example: write an expression that finds the sum of 1, 2, and 3 in that order. As it stands now, I need to give a bazillion different versions of the correct answer (or tell students not to include spaces, even though it might make the answer more readable):

1+2+3

1 +2+3

1 + 2+3

1 + 2 +3

1 + 2 + 3

1+ 2+3

1+ 2 +3

etc.

Literally 16 different possibilities for spaces around the + signs, or a total 64 answers if spaces are allowed before and/or after the expression and Canvas allowed me to specify a correct answer that started with a space (since it does allow students to give a response that starts with a space - it just always marks it incorrect).

Moreover, when the students see the correct answer, they see all the variations (which tends to cause confusion, because they don't understand why the "same" answer is being shown over and over).

ja46272
New Member

I relied on these in our previous LMS.  As was mentioned above, yes, if you don't know how to use regex it can be graded as wrong.  However, it would be very very useful instead of needing to either A) create lots and lots of multiple choice options (for instance, if I say which City has the most people), or B) create lots and lots of correct responses.  Please add this.

michael_fedyk
New Member

Hi  @rwatkins ‌, it's great to see this idea is on the product radar as it is very much needed in the  accounting quizzes that we create in our University. 

For example, My issue is that there is multiple ways to write one thousand, eg, 1000, 1,000, 1000.00, 1,000.00, $1000, $1,000, $1000.00, $1,000.00, that's 8, if I have two possible answers, ie GST, my answers become 1000 and 100, so therefore I have 12 combinations. CANVAS doesn't allow me to copy and past answers, but rather I have to input into 12 different boxes the 12 possible answers. 1 of my assignments has 132 answers, multiple by 12, and then I have a pool of 6 possible assignments, equals 9,500 bits of text input into 9,500 answer boxes, with no ability to copy and paste. This can take too long. A wildcard would mean [$]1[,]000[.00] , [$]100[.00]. Copy and paste and move on. 

Cheers,

hasti
Community Champion

So it's been a year since the update by Deactivated user‌. Any word on whether this critical feature for any modern quizzing tool will ever be added to Canvas (I don't have time to watch a year-old 41 minute presentation - searchable text is much, much, much more easy for me to deal with, especially since the computer my Computer Sciences department has provided me with is unable to create sound).

Stef_retired
Instructure Alumni
Instructure Alumni

 @hasti ‌, we've got an active beta testing focus group underway for the new quiz tool at Quizzes LTI User Group‌ and you'll also find documentation on the new quiz tool there. During the beta testing period new features and new documentation are being added regularly, so be sure to "follow" the group and post questions as they arise.

hasti
Community Champion

Is there no search function within that Quizzes LTI User Group? I don't have time to do the work I have to do this semester as it is, so digging through a pile of unsearchable links is less than helpful. I was hoping for a yes/no response on the issue of regular expressions.

I have neither the interest nor time to be an unpaid developer/beta tester for Instructure.

Stef_retired
Instructure Alumni
Instructure Alumni

 @hasti ‌, the spotlight search that appears at the top of every page allows the user to toggle to a directed search, as detailed in https://community.canvaslms.com/docs/DOC-1329 

hasti
Community Champion

Then I would suggest that every search field that shows up within a page of the Canvas guides be removed as it leads to a completely false impression of how to search.

Not to mention that clicking on the magnifying glass in the upper right corner initially does not give me any indication that the ability to restrict my search further will magically pop up once I start typing. This is extremely poor design - I should not have to read a whole user guide (or invest time into experimenting) to figure out how search works differently in this place than it does, say, in my web browser (Firefox), where it doesn't give me additional options for restricting my search just because I've started to type something.

Renee_Carney
Community Team
Community Team
This idea has been developed and is On Canvas Beta Quizzes LTI User Group 

 

          

This feature is now available through the new Quizzes LTI tool.  Find more information on the Quizzes LTI tool, and how to access it, at Quizzes LTI User Group 

The specific guide for this feature in the Quizzes LTI tool is How do I create a Fill in the Blank question in the Quizzes LTI? 

Renee_Carney
Community Team
Community Team
This idea has been developed and deployed to Canvas 

 

This idea was completed with general availability of Quizzes.Next.  You can find more information about the overall project in the Quizzes.Next User Group.‌

  • Quizzes.Next is now available for all paid accounts.
  • Quizzes.Next documentation will live in the Quizzes.Next User Group until July 14, 2018. On July 14, 2018, all of the documentation will be moved to the Canvas Guides in the Canvas Instructor Guide or Canvas Student Guide
  • Quizzes.Next updates will be included in the Canvas Release Notes. This includes new features, updated features, and relevant fixed bugs. New and updated features will be deployed to Quizzes.Next near the same time as the Canvas release. Fixed bugs may be deployed at any time.
tpavlic
Community Participant

Yet another feature that most of us won't be able to use because it is impossible to use Quizzes.Next at institutions that require the use of LockDown Browser/Monitor. 

Instructure needs to continue supporting and developing Quizzes as it is clear that Quizzes.Next won't be ready for real production for at least another year if not longer.

gutow
New Member

I would like to 2nd Ted Pavlic's comment above. It is quite clear as I have been migrating a large course from another LMS, that Quizzes.Next is essentially at the beta stage as it is missing key features (a preview that does not require publishing first, anyone?). Please port the regular expression code (again something that has been available in every real programming language and essentially all complete LMSs for a long time) to the more stable and functional legacy quiz tool.

I am not pleased that my organization is basically paying to test what appears to be at best beta to Release Candidate quality software. Everything has bugs, but Canvas is missing basic abilities! These missing quiz features are just the most important.

Jonathan Gutow

Chemistry Professor and a programmer. I have contributed to Jmol and SageMath.

kjohn113
Community Participant

Is there a guide to regular expressions that can be used in Quizzes.Next?  I couldn't find one in the user's guide, and using RegExes appears to be quite a bit different from the Pattern Match options in Blackboard's Test Canvas.

CraigOgden
Community Participant

I use this website to check my regular expressions to make sure they are correct.

https://regexr.com/ 

You do not need the beginning / and the ending /g.  Canvas puts them in automatically.

kjohn113
Community Participant

Thanks!  I'll try it.

Keith

CraigOgden
Community Participant

I live regular expressions. It has it limits and could be better, but it is

much better than what we had in the past.

On Tue, Oct 8, 2019, 4:09 PM kjohn113@asu.edu <instructure@jiveon.com>