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

CONTEXT not updated #130

Closed
nimdanor opened this issue Nov 19, 2018 · 20 comments
Closed

CONTEXT not updated #130

nimdanor opened this issue Nov 19, 2018 · 20 comments
Assignees
Labels
Bug Something isn't working Critical priority This task is very important.

Comments

@nimdanor
Copy link
Member

nimdanor commented Nov 19, 2018

did the following in an evaluator (qcm_evaluator.pl in python-pl-bank )
dic["text"]=" Berk"

output(100," bravo" , dic)

the old text was still visible.

@nimdanor nimdanor added Bug Something isn't working Critical priority This task is very important. labels Nov 19, 2018
@ddoyen
Copy link

ddoyen commented Dec 11, 2018

This is really important to make dynamic feedback.

@nimdanor
Copy link
Member Author

This is just a bug no ?
It should be correct easily no ?
Why 0.6.0 ?

@qcoumes
Copy link
Contributor

qcoumes commented Jan 15, 2019

Yes.
Probably, nobody had the time to took a look at it.
Because 0.5.0 should have been released since 2018-12-01, but we're late.

@nimdanor
Copy link
Member Author

I realy woud like to start the second semester with this bug fixed on the production

because more people will write exercises directly on PL and it's an important feature

@nimdanor
Copy link
Member Author

nimdanor commented Jan 15, 2019

Le bug est dans le code suivant (playexo/model/sessionexerciceabstract)

        else:  # Success
            context = dict(response['context'])
        keys = list(response.keys())
        for key in keys:
            response[key + "__"] = response[key]
            del response[key]
        del response['context__']
        context.update(response) # si je comprend bien les valeurs mises a jours sont avec des __ à la fin 
donc on écrase pas les anciennes.
 # l'autre remarque c'est quoi la différence entrre self.context et context 
 # ne doit on pas faire un udate de self.context plustot que de context ??
 # car context n'est plus visible a la sortie de la méthode         
        dic = dict(self.context)
        dic.update(context)
        dic['answers__'] = answers
        return answer, feedback, dic
    # et pourquoi on retourne le dic ici et pas le context

@nimdanor
Copy link
Member Author

We drop an eye me and @qcoumes.
We clean up playexo/model/sessionexerciceabstract
but we can't find in the javascript where the exercise is recharged,
@mciissee can you drop an eye. Because it's between the response to the ajax call and the graphical update.

@nimdanor
Copy link
Member Author

any progress on this ??

@qcoumes
Copy link
Contributor

qcoumes commented Jan 22, 2019

It's fixed, currently on full_editor, will be merge on 0.5.0 with #163

@nimdanor
Copy link
Member Author

excellent

@qcoumes
Copy link
Contributor

qcoumes commented Jan 22, 2019

If you could check over pl-test4 that it's working as intended.

@Pavell94000
Copy link
Collaborator

Context is now updated

@Pavell94000 Pavell94000 unpinned this issue Jan 29, 2019
@nimdanor nimdanor reopened this Feb 6, 2019
@nborie
Copy link
Collaborator

nborie commented Feb 6, 2019

To avoid miscommunications about bugs and behaviors. Perhaps we should turn into smaller cycles of development with less ambitious enhancement (just split them could be enough).

Also, print the number of the current version of PL-server being run inside the GUI is more and more becoming critical since users are reporting bugs in all direction (without citing the machine, the url, the run version, verbally only, false bug, not reproducible, etc... ).

For this issue #130, on https://pl.u-pem.fr/, this 6 February, defining context['click'] = 0 in my build and applying context['click'] += 1 in my grader, the variable context['click'] stay at 1 after the first run of my grader and stay at 1 event I click submit severals times. I have evidences that my grader is well running since other content are well upated (context['text'] and context['form'] seems to me well updates).This behavior is obtained with the following ressource https://github.com/nborie/OSbank/blob/master/exercises/MCQ/generalities/parametrized_MCQ.pl

@qcoumes
Copy link
Contributor

qcoumes commented Feb 11, 2019

Problem may come from the fact the we don't send the context again to the sandbox once the exercise is build.

@nimdanor
Copy link
Member Author

The bug seams to be solved will be closed when in PRODUCTION ;)

@nborie nborie reopened this Apr 16, 2019
@nborie
Copy link
Collaborator

nborie commented Apr 16, 2019

On preprod, on the version 0.6.0

The context is no more updated (text, form, any_key in context, ...)

@mciissee
Copy link
Collaborator

If the problem is that the exercice is not refreshed after an evaluation, like for #248, this issue is fixed on fix-239 branch that will be integrated to the next release.

@nborie
Copy link
Collaborator

nborie commented Apr 16, 2019

There is good chance that all this stuff is related...

I am ready to re-close it once PL resources will be back functionning !

@nimdanor
Copy link
Member Author

nimdanor commented Jul 5, 2019

@qcoumes is this closed ?

@nborie
Copy link
Collaborator

nborie commented Jul 5, 2019

It is OK for me on prod...

@nimdanor
Copy link
Member Author

nimdanor commented Jul 5, 2019

you mean it's ok on prod

@nimdanor nimdanor closed this as completed Jul 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Critical priority This task is very important.
Projects
None yet
Development

No branches or pull requests

7 participants