"Bug" Objects deleted, but used in conditions - condition isn't removed

theav-ator Community Member Posts: 69 ☆ Roadie ☆
I just ran across this this morning. I think there's a bug when deleting an item that is referenced in a Set Action Condition list where the object is removed, but not its associated relationship (or the whole line in general)

I had a course with like 9 chapters in it. I had an Action at the AU level that checked to see if each chapter was completed, if all were yes, then it would show the TOC and allow the student to jump to any point they wanted in the course.  Worked great! Looks like this -> OnShow - Show - Table of contents - If - chapter1 Is Completed, Chapter2 Is Completed, ..., Chapter9 Is Completed

I'm building a new course based on this course but it only has 1 chapter. So I took the current course and deleted all the extra chapters and tests/quizes and certificates and all that jazz.

Because I deleted chapters 2-9 it deleted all of those references. In the Set Action Conditions table however, it deleted the objects listed in the variable column (chapter2, chapter3,...chapter9) but left their associated relationships (is completed). So it ended up showing the first line as Chapter1 - Is Completed, and the next 8 lines were an empty box followed by Is Completed.

The attached pics show the Set Action Conditions window with the chapters and then after the chapters are deleted. The table on the deleted image should not be possible to exist - when you try creating that line by line, it throws an error that you don't have all the required content to move onto the next line (i.e. a variable and a condition). I think when the chapter is deleted, the entire line where it is used should be deleted, not just the variable column.


  • jasonadal
    jasonadal Community Member Posts: 441 ♪ Opening Act ♪
    I actually find this "convenient" in some ways. I have templates where there are conditions based on a variety of things (conditions for modifying variables, changing contents, etc.) that I have in a template and/or a "sandbox" that I copy over to other courses. If it didn't retain the condition, I would have to create the whole thing from scratch. For me, it's easier and much faster to change the variable only rather that create the entire set of conditions.
  • theav-ator
    theav-ator Community Member Posts: 69 ☆ Roadie ☆
    Makes sense in those terms.

    In my case it caused the whole course to not work, except on the one page where I had it disinherited. Because it was the first thing run in the course when loading a page, when it got to the blanks, it hung up and wouldn't load any content past that. Even in debug mode it would show the action firing, but wouldn't flag that it couldn't process all of the conditions.

    So just a word of caution, that it may good when using it in templates - but you have to know where they are (or in my case just remember them) or stuff isn't going to work.