Skip to content

Conversation

@drdrew42
Copy link
Member

Now that Contrib is almost as large as the OPL itself, it seems time to support the searching of Contrib alongside the OPL in the Library Browser.

Testing this PR requires the OPL release created by drdrew42/webwork-open-problem-library@c2eb5be

To test:

Load up the OPL release here

Go to Library Browser, select a DBsubject/chapter/section, and check the "Include Contrib" box. Problems from Contrib will appear at the end of search, so you might have to go through multiple pages (or increase the number of results shown per page).

@drdrew42 drdrew42 marked this pull request as ready for review May 16, 2022 20:26
Copy link
Member

@drgrice1 drgrice1 left a comment

Choose a reason for hiding this comment

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

Looks good.

Would it be a good idea to add another checkbox to include OPL problems also, that is checked by default? If unchecked, and Include Contrib is checked, then only Contrib problems are shown. I guess if both are unchecked you get nothing! I am just throwing this out there, because it might be nice to see what the inclusion of Contrib is adding for those that have already culled the OPL problems.

Another thing that might be nice is if the count were updated to also count the Contrib problems that will be shown when the checkbox is checked or unchecked. At this point it is a bit misleading when the page shows There are 120 matching problems while Include Contrib is unchecked, and when you check the box there is no change. Yet going to the end I do see that Contrib problems are now listed.

@pstaabp
Copy link
Member

pstaabp commented May 18, 2022

Does this require to rerun OPL-update? or does fetching from the OPL handle this instead?

@drgrice1
Copy link
Member

Once everything is merged, the download-OPL-metadata-release.pl will handle everything. Alternately, you can run OPL-update.

For now, you will either need to run OPL-update, or manually download the metadata release that @drdrew42 linked in his original comment.

@drdrew42
Copy link
Member Author

use download-OPL-metadata-release with a modification to use the drdrew42 repo instead of openwebwork (line 32?)

@drgrice1
Copy link
Member

Yeah, that is probably simpler than what I did!

@pstaabp
Copy link
Member

pstaabp commented May 18, 2022

I ran OPL-update and got a fatal error

Invalid subject Particle and Quantum Physics
File /opt/webwork/libraries/webwork-open-problem-library/Contrib/BCIT/OpenHomeworkSystemsProjectBCcampus/BCIT_uwlm.pg
DBD::MariaDB::db do failed: Incorrect integer value: '' for column `webwork`.`opl_chapter`.`textbook_id` at row 1 at bin/OPL-update line 820, <IN> line 5323776.

I'll try the download-OPL-metadata-release as well.

@pstaabp
Copy link
Member

pstaabp commented May 18, 2022

It appears that even though it failed, I can down select contrib problems!!

@drdrew42
Copy link
Member Author

Thanks for the reminder... I need to migrate my update-OPL changes from the github action in the OPL repo to this PR

@drdrew42
Copy link
Member Author

I had to update File::Fetch on my dev server... definitely should be mentioned in the upgrade instructions.

@drgrice1
Copy link
Member

Starting the lengthy OPL-update process to test this now. Back in 10 to 15 minutes...

@drgrice1
Copy link
Member

Wait, its done already?

@drdrew42
Copy link
Member Author

Don't merge yet -- still needs some tweaks. e.g. if a course does not have a link to Contrib, then searching Contrib can lead to adding problems that are 'unreachable'

@pstaabp
Copy link
Member

pstaabp commented May 27, 2022

OPL-update now just downloads the metadata. Did you run OPL-update-legacy?

@drgrice1
Copy link
Member

@pstaabp: That was a joke.

@drdrew42
Copy link
Member Author

legacy now runs successfully, albeit with a TON of warnings about tags.

@drgrice1 drgrice1 requested a review from pstaabp May 27, 2022 19:23
@drgrice1
Copy link
Member

@pstaabp: Can you give this another try now. I think we got this all working. Then we can merge!

Copy link
Member

@pstaabp pstaabp left a comment

Choose a reason for hiding this comment

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

Looks great now. the OPL-update-legacy ran and ran and ran and ran and finished!!

@pstaabp pstaabp merged commit 9b1f7d7 into openwebwork:WeBWorK-2.17 May 29, 2022
@taniwallach
Copy link
Member

This had some new maketext calls. The localization files will need to be updated again before the release.

@drgrice1
Copy link
Member

@taniwallach: Yeah, another update is needed. There was another change a while back that isn't in Transifex as well.

@drgrice1
Copy link
Member

@taniwallach: All of the current translations strings are now in Transifex. The final step will be to push those back to here before the final release. I made an announcement on Transifex a while back about this for translators. Hopefully we can have some complete translation files!

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.

4 participants