You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The WeBWorK::PG module is now part of PG, and PG has its own environment
so the webwork2 WeBWorK::PG module (and its derivatives) have been
removed.
The WeBWorK::Constants, WeBWorK::Debug, and WeBWork::CourseEnvironment
modules and the webwork2 conf files are no longer needed and so are
removed. The renderer uses the WeBWorK::PG::Environment module which is
part of PG. Note that this adds one minor installation step for the
renderer. The file conf/pg_config.yml must be copied to lib/PG/conf.
Usually that file will work as is, but in some cases administrators may
want to make changes to it. For example, the externalPrograms are the
standard linux executables and in the standard locations. On some
systems those may need to be changed.
Most of the WeBWorK::Utils module has been removed. All that is left is
the two methods that the renderer uses.
In addition the renderer lib directory has been flattened.
lib/WeBWorK/lib/WeBWorK is now just lib/WeBWorK. With this (among other
things) the WEBWORK_ROOT environment variable is not needed. Note that
$WeBWorK::Constants::PG_DIRECTORY is not available. $ENV{PG_ROOT} is
used instead in the renderer code.
Note that the unnecessary encoding and decoding of perl warnings has
been removed.
Also note that the references to drdrew42 have been changed to
openwebwork.
A default configuration file is included in the container, but it can be overridden by mounting a replacement at the application root. This is necessary if, for example, you want to run the container in `production` mode.
35
+
A default configuration file is included in the container, but it can be overridden by mounting a replacement at the
36
+
application root. This is necessary if, for example, you want to run the container in `production` mode.
| problemSourceURL | string | null | true if `sourceFilePath` and `problemSource` are null | The URL from which to fetch the problem source code | Takes precedence over `problemSource` and `sourceFilePath`. A request to this URL is expected to return valid pg source code in base64 encoding. |
@@ -80,19 +88,21 @@ Can be interfaced through `/render-api`
80
88
| format | string | '' | false | Determine how the response is formatted ('html' or 'json') ||
81
89
| outputFormat | string (enum) | static | false | Determines how the problem should render, see below descriptions below ||
82
90
| language | string | en | false | Language to render the problem in (if supported) ||
83
-
| showHints | number (boolean) | 1 | false | Whether or not to show hints (restrictions apply) | Irrelevant if `permissionLevel >= 10`, in which case `showHints` is regarded as automatically 'true' |
84
-
| showSolutions | number (boolean) | 0 | false | Whether or not to show the solutions (restrictions apply) | Irrelevant if `permissionLevel >= 10`, in which case `showSolutions` is regarded as automatically 'true' |
85
-
| permissionLevel | number | 0 | false | Affects the rendering of hints and solutions. Also controls display of scaffold problems (possibly more) | See the levels we use below |
91
+
| showHints | number (boolean) | 1 | false | Whether or not to show hints ||
92
+
| showSolutions | number (boolean) | 0 | false | Whether or not to show the solutions ||
93
+
| permissionLevel | number | 0 | false | Deprecated. See below. |
94
+
| isInstructor | number (boolean) | 0 | false | Is the user viewing the problem an instructor or not. | Used by PG to determine if scaffolds can be allowed to be open among other things |
86
95
| problemNumber | number | 1 | false | We don't use this ||
87
96
| numCorrect | number | 0 | false | The number of correct attempts on a problem ||
88
-
| numIncorrect | number | 1000 | false |the number of incorrect attempts on this problem | Relevant for triggering hints that are not immediately available|
97
+
| numIncorrect | number | 1000 | false |The number of incorrect attempts on this problem ||
89
98
| processAnswers | number (boolean) | 1 | false | Determines whether or not answer json is populated, and whether or not problem_result and problem_state are non-empty ||
90
99
| answersSubmitted | number (boolean) | ? | false? | Determines whether to process form-data associated to the available input fields ||
91
100
| showSummary | number (boolean) | ? | false? | Determines whether or not to show the summary result of processing the form-data associated with `answersSubmitted` above ||
92
101
| showComments | number (boolean) | 0 | false | Renders author comment field at the end of the problem ||
93
102
| includeTags | number (boolean) | 0 | false | Includes problem tags in the returned JSON | Only relevant when requesting `format: 'json'`|
94
103
95
104
## Output Format
105
+
96
106
| Key | Description |
97
107
| ----- | ----- |
98
108
| static | zero buttons, locked form fields (read-only) |
@@ -103,16 +113,16 @@ Can be interfaced through `/render-api`
103
113
| practice | check answers + show answers buttons |
104
114
105
115
## Permission level
116
+
106
117
| Key | Value |
107
118
| --- | ----- |
108
119
| student | 0 |
109
120
| prof | 10 |
110
121
| admin | 20 |
111
122
112
-
## Permission logic summary for hints and solutions
113
-
* If `permissionLevel >= 10`, then hints and solutions will be rendered - no exceptions.
114
-
* If `permissionLevel < 10`, then:
115
-
- solutions (if they are provided in the pg source code) will be rendered if and only if `showSolutions` is true.
116
-
- hints (if they are provided in the pg source code) will be rendered if and only if:
117
-
+`showHints` is true, and
118
-
+`numCorrect + numIncorrect > n` where `n` is set by the pg sourcce code being rendered
123
+
## Permission logic summary
124
+
125
+
*`permissionLevel` is ignored if `isInstructor` is directly set.
126
+
* If `permissionLevel >= 10`, then `isInstructor` will be set to true.
127
+
* If `permissionLevel < 10`, then `isInstructor` will be set to false.
128
+
*`permissionLevel` is not used to determine if hints or solutions are shown.
0 commit comments