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

In a MOOC-Grader personalized exercise, the teacher should be able to view and test all exercise instances via the A+ frontend #1254

Open
markkuriekkinen opened this issue Sep 5, 2023 · 0 comments
Assignees
Labels
area: exercises Related to exercises. Use other labels to focus issue to UI/backend area: UX teacher User experience and usability for teachers effort: days Estimated to take less than one week, from the creation of a new branch to the merging experience: moderate required knowledge estimate requester: CS The issue is raised internally by a CS teacher type: feature New feature or change to a feature

Comments

@markkuriekkinen
Copy link
Contributor

markkuriekkinen commented Sep 5, 2023

Currently in personalized exercises set up in the MOOC-Grader, the teacher sees only one exercise instance in A+ just like students. The teacher needs a way to view and test all exercise instances.

The exercise instance selection is deterministic in the MOOC-Grader:
https://github.com/apluslms/mooc-grader/blob/c697bee96202999725bd08ce0b596012a1a2e674/util/personalized.py#L62-L86
Should there be extra parameters for testing specific exercises or should A+ manipulate the existing parameters that are sent to the grader when the teacher is testing the exercise?

A+ sets the parameters for the grader protocol mainly here:

def get_load_url( # pylint: disable=too-many-arguments
self,
language: str,
request: HttpRequest,
students: List[UserProfile],
url_name: str = "exercise",
ordinal: Optional[int] = None,
) -> str:
if self.id:
if request.user.is_authenticated:
user = request.user
if ordinal is None:
submission_count = self.get_submissions_for_student(
user.userprofile, exclude_errors=True
).count()
ordinal = submission_count + 1
else:
user = None
ordinal = 1
# Make grader async URL for the currently authenticated user.
# The async handler will handle group selection at submission time.
submission_url = update_url_params(
api_reverse("exercise-grader", kwargs={
'exercise_id': self.id
}),
get_graderauth_exercise_params(self, user),
)
return self._build_service_url(
language, students,
ordinal, url_name, submission_url, lti_launch_id=request.session.get("lti-launch-id")
)
return super().get_load_url(language, request, students, url_name, ordinal)

def _build_service_url(self, language, students, ordinal_number, url_name, submission_url, lti_launch_id=None):
"""
Generates complete URL with added parameters to the exercise service.
"""
uid_str = '-'.join(sorted(str(profile.user.id) for profile in students)) if students else ''
params = {
"max_points": self.max_points,
"max_submissions": self.max_submissions,
"submission_url": build_aplus_url(submission_url),
"post_url": build_aplus_url(str(self.get_url(url_name)), user_url=True),
"uid": uid_str,
"ordinal_number": ordinal_number,
"lang": language,
}
if lti_launch_id:
params["lti_launch_id"] = lti_launch_id
return update_url_params(self.get_service_url(language), params)

@markkuriekkinen markkuriekkinen added type: feature New feature or change to a feature area: UX teacher User experience and usability for teachers area: exercises Related to exercises. Use other labels to focus issue to UI/backend effort: days Estimated to take less than one week, from the creation of a new branch to the merging experience: moderate required knowledge estimate requester: CS The issue is raised internally by a CS teacher labels Sep 5, 2023
@ihalaij1 ihalaij1 self-assigned this Sep 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: exercises Related to exercises. Use other labels to focus issue to UI/backend area: UX teacher User experience and usability for teachers effort: days Estimated to take less than one week, from the creation of a new branch to the merging experience: moderate required knowledge estimate requester: CS The issue is raised internally by a CS teacher type: feature New feature or change to a feature
Projects
Status: Todo
Development

No branches or pull requests

2 participants