openwebwork / webwork2

Course management front end for WeBWorK
http://webwork.maa.org/wiki/Main_Page
Other
145 stars 165 forks source link

move PGML lab files to assets folder #2359

Closed Alex-Jordan closed 6 months ago

Alex-Jordan commented 6 months ago

This moves the PGML lab files to the assets folder. Otherwise as a course is copied from term to term, it will copy potentially outdated PGML lab files. This way we can maintain them centrally in the assets folder and make sure they are relevant to the current version of WeBWorK/PG.

drgrice1 commented 6 months ago

Perhaps we are in a place that the modelCourse could not be in the courses directory at all anymore, and could be used directly from the webwork2/courses.dist directory? I mean, at this point we can now copy from any course we want to. So if an administrator wants to have their own "model course", then the administrator can create a course that is set up the way they want (and could even call it "modelCourse" -- of course we would remove all code that skips that in course listings). Yeah, it would actually have the database tables, but is that a problem?

Of course that still doesn't solve the issue of courses having the up to date PGML lab problem, but it is worth considering.

drgrice1 commented 6 months ago

Note the same problem can occur with the capaLibrary, Contrib, and Library links. I think that these links should be created programmatically when a course is created using the values in the directory settings from the course environment. This would ensure that they point to the correct location regardless of the directory structure.

We could even go further and detect broken links in an existing course, and then update them to point to the correct locations.

Alex-Jordan commented 6 months ago

I had in mind the situation with Library as a precedent, and if someone changes those locations, there would be consequences. The model course would need its symlinks rewired.

It would not be a problem for a model course to have database tables. In fact, that is a feature! Our model courses at PCC have exercise sets already loaded, and we are using the new ability to copy those when creating a new course. This saves instructors who just want to load the default sets for our courses the step of importing sets.

I don't think we can automate solving the issue of a course that was created in 2.18 and has the PGMLLab/ folder directly in its templates/ folder. They are out of luck until someone recognizes there is this issue and updates that course. The same is true by the way for the achievements/ folder, where if we want to update how achievements behave, we are out of luck with courses that are propagating old achievements/ folders.

drgrice1 commented 6 months ago

I think these are things to think about for webwork3. That is if there even is a course directory (probably better to avoid that entirely).

drgrice1 commented 6 months ago

This can be merged. The link issue can be resolved later since it is not new with this pull request.