Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Rubyric exercises, details about the configuration of the exercises and instructions about local development #25

Merged
merged 2 commits into from
Sep 30, 2020

Conversation

jaguarfi
Copy link
Contributor

@jaguarfi jaguarfi commented Jul 30, 2020

Description

Instructions about testing Rubyric in a local environment is added.
In addition, one more Rubyric exercise is added to the manual along
with some detail about some of the configuration parameters.

Testing

I tested the exercises in http://localhost:8000/def/current/rubyric/example/

Is it Done?

Clean up your git commit history before submitting the pull request!

  • I (developer) have created unit tests and the tests pass
  • I (developer) have created functional tests (Selenium tests) if applicable
  • I (developer) have tested the changes manually
  • Reviewer has finished the code review
  • After the review, the developer has made changes accordingly
  • Customer/Teacher has accepted the implementation of the feature

Sorry, something went wrong.

@jaguarfi
Copy link
Contributor Author

This PR had something weird in it, and it added some other commits belonging to Jaakko and Saara. Anycase, now the PR is clean :)

@jaguarfi jaguarfi force-pushed the add_rubyric_exercise branch from 4ecd9a9 to c28abe3 Compare August 20, 2020 07:45
@@ -0,0 +1,17 @@

_external: true
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why was this internal value required?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is a good question. I was actually taking some config values from the o1 course

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a-plus-rst-tools adds _external: true for LTI exercises, but I am not sure if it is really necessary. However, we should recommend teachers to use RST when it is possible instead of writing YAML config files manually. The group size settings are still missing from the submit RST directive.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Most likely the parameter _external is not necessary in this case. Therefore, I will remove it. @Mankro which group size setting?

Copy link
Contributor

@markkuriekkinen markkuriekkinen Sep 28, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, you can see in a-plus-rst-tools/toc_config.py that the _external field is used in an if branch. Thus, it can't be removed.

The group size settings consist of min_group_size and max_group_size. They haven't been added to the submit RST directive.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is what I said. Nobody has added the group size settings to the submit RST directive. They are missing. Adding them is a task for another pull request. Currently, one needs to use a config.yaml file in order to define a group exercise.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When I said that the group size settings are missing from the RST submit directive, I meant that they are a missing feature and not YET implemented in the code. You seem to have read it as "missing from the RST example, let's add the options to the example exercise". Now it should be clear!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, now it is clear.

lti: Rubyric
lti_context_id: ''
lti_resource_link_id: hello-world
lti_open_in_iframe: true
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this work without the iframe as there is the aplus_get_and_post?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess so. I think I got lost in the documentation because there is no mention about these two options being somehow mutually exclusive. Maybe we need to add some more details to the documentation.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They shouldn't be exclusive, but if the communication is between A+ and the browser, then the iframe shouldn't be requires. But if it communicates directly with rubyric, then it is.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Having both lti_open_in_iframe and lti_aplus_get_and_post true does not make sense. It is interesting to see what happens then, though. Since lti_aplus_get_and_post changes the protocol and it is not LTI at all anymore, there is no request from the browser to the Tool Provider that could be opened in an iframe.

Note that Rubyric requires the aplus get and post setting. Rubyric does not support real LTI.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was stated in the Aplus Manual
image

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then we need to fix that part in the aplus-manual too. You could do it in this same pull request, but keep the git commit separate from the other changes.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wasn't sure where you took that screenshot. If it was in this same Rubyric module, then ignore my comment about separating the git commits. That wouldn't be necessary.

exercises/hello_rubyric/config.yaml Outdated Show resolved Hide resolved
rubyric/02_getting_started.rst Outdated Show resolved Hide resolved
rubyric/example.rst Outdated Show resolved Hide resolved
Copy link
Contributor

@markkuriekkinen markkuriekkinen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's fine-tune the details.

You need to rebase your branch since the upstream master was force-pushed in the summer. Your branch has my one old commit that was changed in the force push.

You have examples of both pure RST exercise configuration and manual config.yaml file configuration for Rubyric. We can keep both, but would you emphasize that RST is preferred if the teacher has no special reason to manually write the config.yaml file?

@@ -0,0 +1,17 @@

_external: true
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a-plus-rst-tools adds _external: true for LTI exercises, but I am not sure if it is really necessary. However, we should recommend teachers to use RST when it is possible instead of writing YAML config files manually. The group size settings are still missing from the submit RST directive.

exercises/hello_rubyric/config.yaml Outdated Show resolved Hide resolved
exercises/hello_rubyric/config.yaml Outdated Show resolved Hide resolved
lti: Rubyric
lti_context_id: ''
lti_resource_link_id: hello-world
lti_open_in_iframe: true
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Having both lti_open_in_iframe and lti_aplus_get_and_post true does not make sense. It is interesting to see what happens then, though. Since lti_aplus_get_and_post changes the protocol and it is not LTI at all anymore, there is no request from the browser to the Tool Provider that could be opened in an iframe.

Note that Rubyric requires the aplus get and post setting. Rubyric does not support real LTI.

rubyric/example.rst Outdated Show resolved Hide resolved
lti_resource_link_id: hello-world
lti_open_in_iframe: true
lti_aplus_get_and_post: true
url: /aplus_exercise
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is good to mention in the manual that the special URL /aplus_exercise is specific to Rubyric and it makes Rubyric create the exercise automatically so that the teacher does not need to manually create any exercises in Rubyric beforehand. If the exercises are created beforehand, then the URL must hardcode the id value that can be seen in Rubyric. Likewise, the resource link id could be manually hardcoded in both systems if there is a need for that, but automatic setup should be preferred.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added a short description

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't realize this before. Have you tested the automatic Rubyric setup (using url /aplus_exercise) in group exercises? It is very possible that Rubyric does not set the group size automatically and the teacher needs to set it manually in Rubyric after Rubyric has created the exercise automatically. Furthermore, there are plenty of settings in Rubyric (grading rubrics etc.) that certainly can not be set in the A+ course git repo. The reader should be warned about that, especially the group size setting. (The warning should be in the chapter text, not here in config.yaml.)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did not test that. But it seems like the group size is not set automatically. I tried the following configuration

min_group_size: 1
max_group_size: 4

But the result was the following: 🤔
Screenshot taken from Rubyric
image

So it seems like those options are useless. Should I remove them from the example?. In one comment above, I added a screenshot that shows that the :min_group_size: and :max_group_size: options cannot be added to the RST directive because it causes compilation errors.

Regarding the other settings, I think the whole module cover most of them, and there is no need for adding more details about them.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The group size settings are NOT useless. They are simply not automatically forwarded to Rubyric and we should remind the reader that many settings need to be manually configured in Rubyric (after the exercise has been created in Rubyric either manually or automatically). Note that the group size setting must be defined in BOTH A+ and Rubyric in order to enable group submissions (when Rubyric exercises are integrated into A+). The config.yaml group size settings define them for A+, and once the group size options are added to the RST submit directive, RST can be used too.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Although the instructions about groups in Rubyric https://plus.cs.aalto.fi/aplus-manual/experimental/rubyric/04_roles_and_groups/#groups do not mention the A+ side. I think we should make those changes in a new PR.

rubyric/example.rst Outdated Show resolved Hide resolved
rubyric/02_getting_started.rst Outdated Show resolved Hide resolved

If you want to test Rubyric locally, you must read the
`Official Rubyric documentation <https://github.com/Aalto-LeTech/rubyric/blob/master/doc/rubyric.md#connect-local-rubyric-to-a-course-in-docker-optional>`_
and follow the instructions on how to use a local copy of Rubyric along with A+.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Running Rubyric locally would be much easier if we created a Docker container for it, but that has not been done.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried but it was slightly difficult, maybe I will try again in the future.

rubyric/02_getting_started.rst Outdated Show resolved Hide resolved
Copy link
Contributor

@markkuriekkinen markkuriekkinen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Just small changes still needed.

lti_resource_link_id: hello-world
lti_open_in_iframe: true
lti_aplus_get_and_post: true
url: /aplus_exercise
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't realize this before. Have you tested the automatic Rubyric setup (using url /aplus_exercise) in group exercises? It is very possible that Rubyric does not set the group size automatically and the teacher needs to set it manually in Rubyric after Rubyric has created the exercise automatically. Furthermore, there are plenty of settings in Rubyric (grading rubrics etc.) that certainly can not be set in the A+ course git repo. The reader should be warned about that, especially the group size setting. (The warning should be in the chapter text, not here in config.yaml.)

exercises/hello_rubyric/config.yaml Outdated Show resolved Hide resolved
rubyric/example.rst Outdated Show resolved Hide resolved
@jaguarfi jaguarfi changed the title Add more information about Rubyric exercises Add Rubyric exercises, details about the configuration of the exercises and instructions about local development Sep 30, 2020
@jaguarfi
Copy link
Contributor Author

I think the instruction on how to configure Rubyric using the submit directive is lacking. However, the intention of this PR is to add another Rubyric example using the conf.yaml so that the users can at least copy and paste a working example of the Rubyric exercises, and follow the instruction presented in the Rubyric module to configure Rubyric. The second purpose of this PR was to add a brief description about how to test Rubyric locally and warn about the complexity of the process.
That said, perhaps we could create a new issue to review the Rubyric module and add more guidance on how the different settings that may be included in the submit directive can affect the actual Rubyric exercise.

Copy link
Contributor

@markkuriekkinen markkuriekkinen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Final changes and then you can squash the git commits. The example exercise and the local installation could be in different commits.

exercises/hello_rubyric/config.yaml Outdated Show resolved Hide resolved
exercises/hello_rubyric/config.yaml Outdated Show resolved Hide resolved
New instruction on how to run Rubyric are added, including links to the
updated Rubyric documentation.
A new example using a **config.yaml** file was added to the Manual.
This new exercise will allow the users of this manual to be aware of
the additional options that can be set for the Rubyric exercises. A
short paragraph was also added to describe in some of the options in
more detail.
Copy link
Contributor

@markkuriekkinen markkuriekkinen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good.

You had some thoughts about further changes to clarify some settings. Did you write them down?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants