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

Webwork enhancements #27

Draft
wants to merge 14 commits into
base: main
Choose a base branch
from
Draft

Webwork enhancements #27

wants to merge 14 commits into from

Conversation

Parsa-Rajabi
Copy link
Contributor

No description provided.

@Parsa-Rajabi Parsa-Rajabi marked this pull request as draft June 8, 2022 17:28
@firasm
Copy link
Contributor

firasm commented Jun 24, 2022

for the record, here's how I've been running the two scripts:

# webwork to md
python webwork_to_md.py source_path='../../../webwork-open-problem-library/Contrib/BrockPhysics/College_Physics_Urone/' destination_path='../../../instructor_physics_bank/source_ww/output'

# process
python ../../../instructor_physics_bank/scripts/process.py --instructor=true --public=true --prairielearn=true ../../../instructor_physics_bank/webwork/source/

Your webwork to md script should now work, I got to the point of using process.py to convert from md to pl, and ran into some errors which you should look at:

../../../instructor_physics_bank/webwork/source/College_Physics_Urone/11.Fluid_Statics/NU_U17-11-02-002/NU_U17-11-02-002.md
../../../instructor_physics_bank/webwork/source/College_Physics_Urone/11.Fluid_Statics/NU_U17-11-03-002/NU_U17-11-03-002.md
../../../instructor_physics_bank/webwork/source/College_Physics_Urone/11.Fluid_Statics/NU_U17-11-02-010/NU_U17-11-02-010.md
../../../instructor_physics_bank/webwork/source/College_Physics_Urone/11.Fluid_Statics/NU_U17-11-09-008/NU_U17-11-09-008.md
../../../instructor_physics_bank/webwork/source/College_Physics_Urone/11.Fluid_Statics/NU_U17-11-09-006/NU_U17-11-09-006.md
../../../instructor_physics_bank/webwork/source/College_Physics_Urone/11.Fluid_Statics/NU_U17-11-09-001/NU_U17-11-09-001.md
../../../instructor_physics_bank/webwork/source/College_Physics_Urone/11.Fluid_Statics/NU_U17-11-08-001/NU_U17-11-08-001.md
../../../instructor_physics_bank/webwork/source/College_Physics_Urone/11.Fluid_Statics/NU_U17-11-08-006/NU_U17-11-08-006.md
../../../instructor_physics_bank/webwork/source/College_Physics_Urone/11.Fluid_Statics/NU_U17-11-07-017/NU_U17-11-07-017.md
There is an error in this problem: 
        - File path: ../../../instructor_physics_bank/webwork/source/College_Physics_Urone/11.Fluid_Statics/NU_U17-11-07-017/NU_U17-11-07-017.md
        - Error: [Errno 2] No such file or directory: '../../../instructor_physics_bank/webwork/source/College_Physics_Urone/11.Fluid_Statics/NU_U17-11-07-017/yes'
Traceback (most recent call last):
  File "/Users/firasm/Sync/EL/Physics OER Bank/problem_bank_scripts/src/problem_bank_scripts/../../../instructor_physics_bank/scripts/process.py", line 66, in <module>
    main()
  File "/Users/firasm/Sync/EL/Physics OER Bank/problem_bank_scripts/src/problem_bank_scripts/../../../instructor_physics_bank/scripts/process.py", line 54, in main
    raise e
  File "/Users/firasm/Sync/EL/Physics OER Bank/problem_bank_scripts/src/problem_bank_scripts/../../../instructor_physics_bank/scripts/process.py", line 44, in main
    pbs.process_question_md(source_filepath, instructor=True)
  File "/Users/firasm/.pyenv/versions/3.10.2/lib/python3.10/site-packages/problem_bank_scripts/problem_bank_scripts.py", line 925, in process_question_md
    [
  File "/Users/firasm/.pyenv/versions/3.10.2/lib/python3.10/site-packages/problem_bank_scripts/problem_bank_scripts.py", line 926, in <listcomp>
    copy2(pathlib.Path(source_filepath).parent / fl, output_path.parent)
  File "/Users/firasm/.pyenv/versions/3.10.2/lib/python3.10/shutil.py", line 434, in copy2
    copyfile(src, dst, follow_symlinks=follow_symlinks)
  File "/Users/firasm/.pyenv/versions/3.10.2/lib/python3.10/shutil.py", line 254, in copyfile
    with open(src, 'rb') as fsrc:
FileNotFoundError: [Errno 2] No such file or directory: '../../../instructor_physics_bank/webwork/source/College_Physics_Urone/11.Fluid_Statics/NU_U17-11-07-017/yes'

@Parsa-Rajabi
Copy link
Contributor Author

TODO:

  • Fix assets to not include anything but asset names
  • No null in tags

Process in the future

  • .pg -> .md -> validator for assets & types -> .pl through process.py

@Bluesy1 Bluesy1 force-pushed the main branch 2 times, most recently from 5d27a03 to 5e18acf Compare June 19, 2024 01:30
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.

2 participants