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

WR438262: Submission interface improvements #84

Conversation

sarahjcotton
Copy link
Contributor

@sarahjcotton sarahjcotton commented Sep 3, 2024

Addresses #83

However, once the locked options are removed from the selection screen it makes it difficult for the student to see what's currently submitted as that is also locked, so I've added in a static element to display the currently selected item.

Previously the currently selected item would have been selected, but if the student tries to resubmit it instead of going back/canceling, an error occurs, so this also addresses that.

Submitted page

Screenshot from 2024-09-03 12-46-16

Submitted collection

Screenshot from 2024-09-03 12-38-49

@sarahjcotton sarahjcotton force-pushed the WR438262-submission-interface-improvements branch from e2110c6 to e28826a Compare September 3, 2024 12:06
@sarahjcotton sarahjcotton force-pushed the WR438262-submission-interface-improvements branch from e28826a to 653d646 Compare September 10, 2024 14:57
@sarahjcotton
Copy link
Contributor Author

@danmarsden Would you mind reviewing this please?

$viewurl = "/view/view.php?id=" . $view['id'];
$anchor = $this->get_preview_url($view['title'], $viewurl, strip_tags($view['description']));
$mform->addElement('radio', 'viewid', '', $anchor, 'v' . $view['id']);
if ($view['submissionoriginal'] == 0) {
Copy link
Member

Choose a reason for hiding this comment

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

What does $view['submissionoriginal'] == 0 mean? Maybe add a comment explaining it? Same below on line 500

Comment on lines +486 to +488
$currentpagesubmitted = $mform->createElement('static', 'currentsubmission',
get_string('currentsubmitted', 'assignsubmission_maharaws', 'page'), $view['displaytitle']);
Copy link
Member

Choose a reason for hiding this comment

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

Looks like this can can be abstracted to a method to avoid a code duplication. See pretty much same code at lines 506-507

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've run out of time on this WR so can only do what's necessary to move it along I'm afraid.

@@ -25,6 +25,7 @@
$string['assign_submission_maharaws_name'] = 'Mahara Assignment submission (web services)';
$string['assign_submission_maharaws_description'] = 'Mahara functions used in Mahara assignment submission plugin.<br />Publishing this service on a Moodle site has no effect. Subscribe to this service if you want to be able to use assignments with {$a}.<br />';
$string['collectionsby'] = 'Collections by {$a}';
$string['currentsubmitted'] = 'Current submitted {$a}';
Copy link
Member

Choose a reason for hiding this comment

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

Probably need a version bump for this string to come up.

@dmitriim
Copy link
Member

dmitriim commented Sep 10, 2024

Hi @sarahjcotton
Thanks for working on that patch. The code looks good to me. There is some opportunities for refactoring to exclude code duplication, but it's not critical as soon as the code does what it needs to do. Version bump is required though.

@sarahjcotton sarahjcotton force-pushed the WR438262-submission-interface-improvements branch from 653d646 to 51a82b6 Compare September 13, 2024 08:19
@sarahjcotton
Copy link
Contributor Author

Thanks @dmitriim hopefully this should be good to go now!

@danmarsden danmarsden merged commit 3bdedcf into catalyst:main Sep 13, 2024
22 checks passed
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.

3 participants