wyattriley / dvoa

Delaware Valley Orienteering Association
0 stars 0 forks source link

Make result_course_add resilient to different names #15

Open wyattriley opened 1 year ago

wyattriley commented 1 year ago

In particular if a word precedes the name - e.g. "Fun Sprint" it would be recognized as a "Sprint" type course.

Perhaps, after the round of course matching at the start of the name, it should do a more general preg_match() to find the course name anywhere in the name? (That wouldn't work as great though, because "Redwood Sprint" would match "Red"... so maybe the check should verify a unique match?)

So, perhaps there should be a validation check somewhere that the course name will be found - and a warning posted somewhere (on the rslt_jnl_list.php form?) - if a course name won't pass the name-match check.

wyattriley commented 1 year ago

Example: https://imgur.com/EIL2f5F - this failed to load until I changed the course names in OE12 (and was hard to figure out.)

wyattriley commented 1 year ago

Set up the rslt_jnl_list to add a Warning to the top of the page if there's a mis-matched count.

wyattriley commented 1 year ago

Should make the warning red - and also, only show on the = all view (otherwise the list is shorter, and it's okay)