To be sure, I don't really have a problem with this styling convention. I can work around it and continue to comply with Moodle coding guidelines just like I worked around the weird requirement, in my opinion, to put a full stop at the end of an inline comment even when the inline comment is meant as a label rather than a descriptive statement. I enhanced the code checker with an option to fix that automatically and I don't have to think about it anymore. I can do the same with respect to the Given-When-Then in Gherkin.
Itamar Tzadok
Posts made by Itamar Tzadok
Whether what I describe is one scenario or a composite of several scenarios is merely terminological and is really not the issue. Many scenarios can be steps in bigger scenarios and at least some of our current core steps are such. You seem to suggest that for many Gherkin scenarios we need to write their php counterpart only to make complex scenarios look simple. That shouldn't be our preferred approach because it may be counter productive. And don't get me wrong. I'm already adding many "set up" steps to make the tests more efficient. But in general it is not the way. Gherkin may at some point allow re-use of scenarios within scenarios and at any rate it shouldn't be too difficult to add a pseudo step that would do that. The point remains that for some scenarios it may not be worth it to reproduce Gherkin in php only to maintain the Single Given-When-Then convention.
However, I still think that if you are testing more than one things per scenario, you should be allowed to use more than one When and Then because it is much easier to read.
Indeed. But even testing one thing may require more than one Then/When. For instance, if I need to test a feature of Group submission that allows group members to work on the same entry, I need multiple logins in the same scenario. Multiple logins invite multiple "Then" (I don't use "When" at all; one opening Given and then Thens and Ands).
To make the scenario more readable I also add a substantial amount of inline comments. I even use code folding for which I define special "comments" such as #section: to open and #:section to close.
With the Dataform module you can create a resource activity where each entry is a course description which contains the course info, link and even rating and comments. You can create different views. One view can display on the front page a short description of several courses like your first illustration. You can set the view to display a certain number of short descriptions and to change the displayed items periodically. You can also choose to display a specific subset such as 'featured' courses. You can embed this view on the front page so that it is accessible upon entering the site. Another view can display full details for each course. You can also create predefined filters to browse courses by categories or other classifications or allow users to free search the list (to some extent). hth
You can try the Dataform module. You create an instance of the activity on the site front page and add entries with the desired content. Then you add a dataform view block set it to display a designated view from the resource instance and set it to display on course front pages. Then, whenever you change the content of entries in the activity the block will display the new content in the courses. You can create different views of you resources and display each one in a separate dataform view block. You can display any subset of the content of the resource entries. hth