Comments (4)
I think the simplest fix for this is to just use the unique_id_stub that is defined in PGalias.pm. It incorporates the psvn, problemUUID, and courseID, as well as all of the things used in the $prob_name variable. I have tested it, and it works for the current cases, and should extend well to what Nathan wants. Just remove the $prob_name variable, and use $self->{unique_id_stub} instead.
Edit: Nevermind, I don't think that the unique_id_stub is as easily accessible there as I said. It doesn't work so easily at least.
Edit2: Wait, perhaps it does. I just didn't quit have the path right. Use $self->{PG_alias}{unique_id_stub}.
from pg.
I'll try to take a look. I don't think the unique_id_stub includes the problemSeed for example but I'm just talking from memory -- I'll have to go back and look when I have time to review the various sections of relevant code.
from pg.
The unique_id_stub does include everything that we have discussed. It definition is:
my $unique_id_seed = join("-",
$self->{studentLogin},
$self->{psvn},
$self->{courseID},
'set'.$self->{setNumber},
'prob'.$self->{probNum},
$self->{problemSeed},
$self->{problemUUID},
);
my $unique_id_stub = create_uuid_as_string(UUID_V3, UUID_NS_URL, $unique_id_seed);
$self->{unique_id_stub} = $unique_id_stub;
from pg.
I somewhat suspect that just calling $main::PG->{PG_alias}->make_resource_object()
already brings in the use of the $unique_id_seed
(even without explicitly adding identity parameters to the "file name" portion) which is why the old code could just request the file with parameters
"image$imageNum","png"
.
That is why I wrote:
unless it is certain that these values will be taken into account elsewhere in the path/filename generation (probably based on the definition of $unique_id_stub which is made during the initialize() method in /lib/PGalias.pm ). I did not trace the code flow to see if that will happen.
Someone needs to check the code flow carefully.
If the ID parameters are pulled in automatically, when it suffices to use a generic name for $prob_name
and not something which tries to pull in those values.
from pg.
Related Issues (20)
- Bug with AnswerHash.pm HOT 11
- Warnings when using upToConstant where C0 is already defined HOT 1
- Scaffold section with PopUp breaks subsequent MathObjects HOT 2
- parserRadioMultiAnswer default answer checker doesn't handle list objects HOT 1
- Change behaviour of helpLink in hardcopy?
- Currency errors with hardcopy HOT 14
- macros from OPL that moved to pg: issue with reliance on other macro libraries HOT 5
- q within [@...@] PGML blocks HOT 4
- Syntax bug with PGlateximage.pl and negative parameter values HOT 3
- radio buttons with only one option HOT 5
- unicode characters in strings HOT 1
- Variable adjacent to code substitution in TEXT causes hardcopy error. HOT 8
- PGstatisticsmacros error HOT 2
- Inconsistent/incomplete behaviour for radio button custom answer checkers HOT 3
- inserting an answer between two multiAnswer inputs HOT 13
- issue with `q` and parsing in PGML HOT 9
- PGML bold within a word HOT 3
- Macros whose first line starts with =head1 fail to load. HOT 6
- answer hints in multiple choice HOT 13
- CheckboxList reveals the correct answers HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pg.