llaske / ExerciserReact

React code of Exerciser Activity. GSoC 2018
Apache License 2.0
15 stars 49 forks source link

GSOC 2022: Exerciser Evaluation Mode #137

Closed nikkuAg closed 1 year ago

nikkuAg commented 2 years ago

Most of the packages have been updated to the latest released version. Still, for some of them, when upgrading to the newest version, all the pre-written code was not working correctly, like upgrading the bootstrap to the latest version made the matching exercise overflow.

llaske commented 2 years ago

@nikkuAg the build failed on my side:

$ npm run build

> exerciser@0.1.0 build
> react-app-rewired build --scripts-version react-scripts

Creating an optimized production build...
Failed to compile.

Failed to minify the code from this file: 

    ./node_modules/@react-dnd/invariant/dist/index.js:10 

Read more here: http://bit.ly/2tRViJ9

$

I've removed the node_modules content, launched npm install and reinjected lib folder. @ashish0910 does it works for you?

nikkuAg commented 2 years ago

@llaske, The error that is occurring in deploying exerciser on sugarizer server is:

  1. To allow drag and drop of exercise to reorder them I have used the package react-dnd having version 16.0.1. Now to deploy this on sugarizer when I am running npm run build I get an error Failed to minify the code from this file.

2022-07-25 (1)

2022-07-25

  1. If I upgrade the version of react-scripts to any version greater than 2, then the above error gets resolved but after deploying the exercise on sugarizer a blank screen appears when we open the activity and in the console there is an error Uncaught TypeError: Super expression must either be null or a function.

2022-07-25 (2)

2022-07-25 (4)

2022-07-25 (5)

llaske commented 2 years ago

@thingthing is this something that sounds familiar to you? Any advice for us?

llaske commented 2 years ago

I'm now able to build the app, thanks. BTW I can't move exercises in settings mode. See below.

Peek 09-08-2022 22-18

llaske commented 2 years ago

@nikkuAg, the Run all button doesn't work like expected. The idea was: At the end of each exercise, the result screen is displayed as today but the "Redo" button is replaced by a "Next exercise" button (will be a "Finish" button on the last exercise).

llaske commented 2 years ago

Works now. It seems related to my browser cache.

llaske commented 2 years ago

Good job! Here are some remarks:

Capture d’écran du 2022-10-01 21-22-27

Capture d’écran du 2022-10-01 21-25-03 image

Capture d’écran du 2022-10-01 21-26-23

Capture d’écran du 2022-10-01 21-27-28

nikkuAg commented 2 years ago
  • [ ] Once completed the Run icon is replaced by the Evaluation icon. It's weird. I suggest to just hide the icon. @llaske Can you please elaborate on this point?
llaske commented 2 years ago

@nikkuAg After running an exercise in Evaluation mode, the Run icon of this exercise is changed (see my screen capture). You've probably done it to indicate that the exercise is completed so it can't be done anymore. It will be better to hide the icon instead.

nikkuAg commented 2 years ago

I have added a new button so that users can see their score after completing the exercise as it was asked in the proposal, after completion the user can see their score and detailed result.

nikkuAg commented 2 years ago

Also the icons on my pc are aligned perfectly 2022-10-02 (1)

llaske commented 2 years ago

@nikkuAg there is now an issue when clicking on the evaluation mode button. The screen become blank and there is an error in the console.

Peek 04-10-2022 21-58

nikkuAg commented 2 years ago

Hi @llaske, Actually to update the color of the icon I have used the activity from sugar dependencies so I think you have to copied the new lib into your node module and hence your getting this error

llaske commented 2 years ago

Actually to update the color of the icon I have used the activity from sugar dependencies so I think you have to copied the new lib into your node module and hence your getting this error

You can't do that. Sugar Web library files are common to all activities, they can't be changed. Could you find another way to fix the issue?

nikkuAg commented 2 years ago

You can't do that. Sugar Web library files are common to all activities, they can't be changed.

But since in exerciser we are using react and finally we are just deploying the build folder so it will not affect any other activities so I thought to use the activity.js

And also the code I have added is dynamic and can be used with any icon just you have to pass the icon and color

llaske commented 2 years ago

No. Your new getUpdateIcon method is not at all related to the activity object. It has no sense to add this method inside. The good practice to change the color of an icon is to use directly the colorize method into the icon.js module. You just have to pass the DOM Element as first parameter of the method.

nikkuAg commented 2 years ago

@llaske, I have corrected the error

llaske commented 2 years ago

Good fix :+1: BTW now when I launch a new instance of the activity, the Export to evaluation icon doesn't appear and Shared icon on items doesn't appear neither.

image

nikkuAg commented 2 years ago

Actually because your exercise open in evaluation mode

nikkuAg commented 2 years ago

Actually this is because your exercise open in evaluation mode

llaske commented 2 years ago

Actually this is because your exercise open in evaluation mode

No it's the same thing when I'm opening a new exercise

llaske commented 2 years ago

Actually this is because your exercise open in evaluation mode

Tested on another computer, it works. Should be related to a browser cache issue. I'm going to have a look on it.

I have added a new button so that users can see their score after completing the exercise as it was asked in the proposal, after completion the user can see their score and detailed result.

The idea was to just review their answers (not the right answers) and their scores. But I think it's not a good idea as the evaluation is similar to an exam, it should be review with the teacher only. So could you remove this new button?

2022-10-07 12-03-49 2022-10-07 12_05_45

2022-10-07 11-56-43 2022-10-07 11_58_16

llaske commented 2 years ago

I have added a new button so that users can see their score after completing the exercise as it was asked in the proposal, after completion the user can see their score and detailed result.

The idea was to just review their answers (not the right answers) and their scores. So could you remove this new button?

@nikkuAg I've discussed with a teacher on this. He convince me that it's important to let students review their answers but don't let them see the right answers and scores. So I suggest to let a button to allow to display users answers without seeing the score and the right answers. Basically, it means displaying the result screen without the column Correct answers and the column Correct/Wrong and without buttons to see Score/Time and Replay the exercise.

image

Instead of the medal icon, you could use for this button the Correct/Wrong answers icon from the result screen.

llaske commented 1 year ago

@nikkuAg could you fix the remaining issues so I could be able to merge your work.

llaske commented 1 year ago

Look like @nikkuAg gave up the project :disappointed: so I've fixed issues myself.

TanmayAgarwal123 commented 1 year ago

I would love to work on this project, can you assign me Regards, Tanmay Agarwal

llaske commented 1 year ago

@TanmayAgarwal123 the work is already done.