Giter VIP home page Giter VIP logo

Comments (4)

drgrice1 avatar drgrice1 commented on July 26, 2024

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.

mgage avatar mgage commented on July 26, 2024

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.

drgrice1 avatar drgrice1 commented on July 26, 2024

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.

taniwallach avatar taniwallach commented on July 26, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.