Skip to content

Fail to view student contributions #337

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

Closed
delahayd opened this issue Jan 6, 2020 · 14 comments · Fixed by #338
Closed

Fail to view student contributions #337

delahayd opened this issue Jan 6, 2020 · 14 comments · Fixed by #338

Comments

@delahayd
Copy link

delahayd commented Jan 6, 2020

Hi,

I fail to view the student contributions when I am in the teacher mode. I can see the registered students but I cannot see the exercises they realized. I guess the students have to make a synchronization and the teacher as well right? But even with the synchronization, it does not work. May be, it is due to some problems of synchronization I have when the Git copy is clean (nothing to commit) and for which I obtain the following message in Learn OCaml : "HTTP error (500): Error: Internal Server Error". Could you help me?

Thanks a lot for your help.

All the best,

David.

@yurug
Copy link
Collaborator

yurug commented Jan 6, 2020

Hi David,

you should be able to inspect students' contributions by a middle-click on the student identifier.

Can you tell me how you are running your learn-ocaml instance?

@delahayd
Copy link
Author

delahayd commented Jan 6, 2020

Hi Yann Régis,

Yes, I can open the window of the contributions of one student (as you indicate). But no contribution is displayed. I have the message "No assigned or open exercises found". But I use the "Demo of the exercise environment" and the student (another account) has realized the corresponding exercise.

I run the learn-ocaml instance locally with : learn-ocaml serve --port 8080, and I first make the exercise with a student account, and finally I enter the teacher mode with the teacher account (where I can see the student but not his contributions).

Thanks again for your help.

David.

@yurug
Copy link
Collaborator

yurug commented Jan 6, 2020

It is probably due to the permissions of the sync directory.

If you run the command from the demo-repository of the git repository, then learn-ocaml must have created a sync folder inside. Do you confirm that? What are the permissions/owner of this directory?

@delahayd
Copy link
Author

delahayd commented Jan 6, 2020

I run learn-ocaml in a directory with the following content:

drwxrwxr-x 5 delahaye delahaye 4096 janv. 6 15:21 my-learn-ocaml-repository
drwxrwxrwx 4 delahaye delahaye 4096 juin 15 2019 sync
drwxr-xr-x 9 delahaye delahaye 4096 juin 15 2019 www

The content of "my-learn-ocaml-repository" is actually the same as the demo-repository in the git repository. I provide all the permissions to the "sync" directory but the synchronization still fails. Should I change the owner as well?

@yurug
Copy link
Collaborator

yurug commented Jan 6, 2020 via email

@delahayd
Copy link
Author

delahayd commented Jan 6, 2020

It does not work because once built, I must launch the server in the directory where I have the "www" directory. Otherwise, I have the following error in the browser: "Error: Unix.Unix_error(Unix.ENOENT, "open", "./www/index.html")". Anyway, after the app for a given exercise repository has been built (with "learn-ocaml build"), I guess it is not used anymore, right?

@delahayd
Copy link
Author

delahayd commented Jan 6, 2020

The synchronization works only when something has changed, otherwise I have an error. Here is the trace of the server (the first synchronization works but the second fails):

2020-01-06T15:00:24Z 127.0.0.1 POST /sync?token=GBS-TOK-D1T-JHJ
HEAD est maintenant à ba93f3a Update
[master 7c78e38] Update
1 file changed, 6 insertions(+)
2020-01-06T15:00:30Z 127.0.0.1 POST /sync?token=GBS-TOK-D1T-JHJ
HEAD est maintenant à 7c78e38 Update
Sur la branche master
rien à valider, la copie de travail est propre
Error handling ((headers
((accept /) (accept-encoding "gzip, deflate")
(accept-language "fr,en-US;q=0.7,en;q=0.3") (connection keep-alive)
(content-length 155) (content-type application/x-www-form-urlencoded)
(host localhost:8080) (origin http://localhost:8080)
(referer http://localhost:8080/)
(user-agent
"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:71.0) Gecko/20100101 Firefox/71.0")))
(meth POST) (resource /sync?token=GBS-TOK-D1T-JHJ) (version HTTP_1_1)
(encoding (Fixed 155))): (Failure "git command failed: commit -m Update")

@yurug
Copy link
Collaborator

yurug commented Jan 6, 2020

I see. This is definitely a bug.

@yurug
Copy link
Collaborator

yurug commented Jan 6, 2020

Sorry for having accidentally closed the issue.

@yurug
Copy link
Collaborator

yurug commented Jan 6, 2020

@delahayd Can you try now?

@delahayd
Copy link
Author

delahayd commented Jan 6, 2020

The bug of synchronization with no change is solved, thanks a lot.

However, I still fail to find the contributions of a student. The window opens when I select a given student but I have the message "No assigned or open exercises found" while the demo exercise pack is marked as opened in the teacher account and while the student has realized the exercises and saved his changes with the synchronization button. I guess I do something wrong but I do not know what. Any idea? Thanks again for your help.

@yurug
Copy link
Collaborator

yurug commented Jan 7, 2020

I found the bug and I am working on a fix.

For the moment, what you can do as a workaround is to mark the exercise as "closed" (do not forget to click on "apply") and mark it back to "open" (and again do not forget to click on "apply".)

@delahayd
Copy link
Author

delahayd commented Jan 7, 2020

Great! The workaround you indicate works perfectly, thanks. Do not hesitate to tell me when the bug will have been fixed. Thanks again for your quick support.

@erikmd
Copy link
Member

erikmd commented Nov 16, 2021

Closed by #439

@erikmd erikmd closed this as completed Nov 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants