open-resources / scripts

Repo of converter scripts to and from MD files to various platform file formats.
3 stars 0 forks source link

Webwork Script: Create Markdown Files using Webwork Questions #8

Closed Parsa-Rajabi closed 3 years ago

Parsa-Rajabi commented 3 years ago

Change Log

Github Issue

closes #6

cbm755 commented 3 years ago

Hi @firasm et al, I tried this on two semi-randomly selected WW from OPL. It fails b/c my .pg files did not contain BEGIN_HINT.

Traceback (most recent call last):
  File "/home/cbm/work/teaching/math253/2021s1/tmp/webwork_to_md.py", line 45, in <module>
    problem_full = file_contents[file_contents.index(start_of_problem_src):file_contents.index(begin_hint_src)]
ValueError: substring not found

If you want to reproduce, to files I tried were:

FortLewis/Calc3/12-1-Two-variable-functions/HGM4-12-1-02-Functions-of-two-variables.pg
272/setStewart12_1/problem_1.pg
firasm commented 3 years ago

Thanks @cbm755 ! Looks like all of the physics ones we were looking at had hints. Still a work-in-progress so hopefully we have a cleaned up version soon!

cc: @Parsa-Rajabi

Parsa-Rajabi commented 3 years ago

Hi @firasm et al, I tried this on two semi-randomly selected WW from OPL. It fails b/c my .pg files did not contain BEGIN_HINT.

Traceback (most recent call last):
  File "/home/cbm/work/teaching/math253/2021s1/tmp/webwork_to_md.py", line 45, in <module>
    problem_full = file_contents[file_contents.index(start_of_problem_src):file_contents.index(begin_hint_src)]
ValueError: substring not found

If you want to reproduce, to files I tried were:

FortLewis/Calc3/12-1-Two-variable-functions/HGM4-12-1-02-Functions-of-two-variables.pg
272/setStewart12_1/problem_1.pg

Thanks @cbm755 for the review. Could you please provide a link to those math pg files?

cbm755 commented 3 years ago

those are the links with OLP, do you need a direct link?

firasm commented 3 years ago

those are the links with OLP, do you need a direct link?

Hey @cbm755 I tried to find that problem here: https://github.com/openwebwork/webwork-open-problem-library/tree/master/OpenProblemLibrary/FortLewis/Calc3/12-1-Two-variable-functions

But that directory doesn't seem to exist...

cbm755 commented 3 years ago

It works for me... Here are the two direct links:

https://github.com/openwebwork/webwork-open-problem-library/blob/master/OpenProblemLibrary/FortLewis/Calc3/12-1-Two-variable-functions/HGM4-12-1-02-Functions-of-two-variables.pg

https://github.com/openwebwork/webwork-open-problem-library/blob/master/OpenProblemLibrary/272/setStewart12_1/problem_1.pg

I think maybe you're trying to combine my two examples into one or something

firasm commented 3 years ago

Ha! Silly me... sorry about that! I had appended the second one to the first one.

Parsa-Rajabi commented 3 years ago

@cbm755 I've updated the script to handle problems with no hint (although most physics problems do have hints). Feel free to try the script on some math problems :) (answer section is still WIP).

Parsa-Rajabi commented 3 years ago

webwork formatting to be clarified via #21

firasm commented 3 years ago

Is this ready for me to review @Parsa-Rajabi ?

Parsa-Rajabi commented 3 years ago

closing to rebase