Giter VIP home page Giter VIP logo

bookserver's People

Contributors

ascholerchemeketa avatar bjones1 avatar bnmnetp avatar runestonetest avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

bookserver's Issues

Crasher on server side grading

I'm getting a ton of crashes in the log due to this code:

    # Do server-side grading if needed, which restores the answer and feedback.
    if feedback := await is_server_feedback(request_data.div_id, request_data.course):
        rcd = runestone_component_dict[EVENT2TABLE[request_data.event]]
        # The grader should also be defined if there's feedback.
        assert rcd.grader
        # Use the grader to add server-side feedback to the returned dict.
        ret.update(await rcd.grader(row, feedback, user.is_exam_mode))

The error is 'AuthUserValidator' object has no attribute 'is_exam_mode'

In all of bookserver this is the only place that is_exam_mode is used. It is not in the model. Nor is it in RunestoneServer code.... Maybe I"m missing a PR? Does it even make sense that is_exam_mode would be an attribute of the user??

Alembic confused by new database

If you try to run an alembic migration on a database that has been created by a docker build you end up in a bad state.

  1. The created database is created fresh from the models, and has no need of a migration.
  2. But if you do some development and now want to do a migration or create a migration for use elsewhere alembic thinks it needs to start over from the first revision. -- which naturally errors out because it does not need to do the earlier migrations.
  3. Alembic uses the table alembic_version to keep track. Its simple.
create table alembic_version ( version_num varchar(32) not null );

alembic puts the latest revision in the table so it knows where it should start.

Somewhere in our build / initialization process for docker we should insert the command

alembic stamp head

This will create the table and populate it with the latest.

@bjones1 -- pinging you FYI -- or maybe you know right where to put this in the build process?

It may be obvious but I guess I should add that this should not be done for production. It would maybe be nice to automatically run the migration on a production build, but I think I feel more comfortable running migrations manually.

500 Internal Server Error when loading Assessments on csawesome 2.12 "Toggle Mixed Up or Write Code Practice"

What Course are you in
The course I'm enrolled in is CSAwesome AP CSA.

What Page were you on
Section 2.12 of CSAwesome (https://runestone.academy/ns/books/published/csawesome/Unit2-Using-Objects/topic-2-11-practice-mixed-code-toggle.html?mode=browsing)

What is your username
Not available, as I'm using the website logged-out.

Describe the bug
Section 2.12 of the CSAwesome curriculum has a few "dynamic questions" to test the student's understanding of the course material. However, this fails to load and is stuck on "Loading a dynamic question ..."

image

Looking through the Web Console, it appears that the assessments don't load due to a 500 Internal Server Error.

image

This seems to be a server-side issue, as I've confirmed that the same happens across different browsers on both mobile and desktop platforms.

Traceback
A traceback doesn't seem to be available.

Javascript Errors
Many many errors can be quickly diagnosed from the Javascript Console error log. On Chrome this is View --> Developer --> Javascript Console, on Safari โŒฅโŒ˜i or Develop --> Show Web Inspector on Firefox Tools --> Web Developer --> Toggle Tools

The Javascript console indicates that the XHR request to runestone.academy/ns/assessment/htmlsrc?acid... fails due to a 500 Internal Server Error. Please refer to the above screenshot of the console for more details.

Add authentication to rslogging calls.

Generally adding to the useinfo and xxx_answers tables seems to be working. Next step is to add authentication. checking so we use the correct username.

FastAPI / SQLAlchemy based book server

This is a start on a migration of the book server to FastAPI - Lets use this Issue to discuss.

I want to polish up this first bit to set the stage for the rest of what needs to come. So getting this as "right" as we can is the goal.

You should be able to run this yourself with the following:

  1. clone this repo
  2. Install poetry
  3. run poetry install to install all of the dependencies (you can either make your own virtualenv or let Poetry)
  4. run the command uvicorn app.main:app --reload
  5. Navigate to http://localhost:8000/docs

You can then exercise the API call for logger/bookevent using the autogenerated documentation.

Next up getting a unittest set up for this first endpoint.

Tagging @bjones1

JS Dependency problems

@bjones1

We have a nasty problem in the latest version of _sphinx_static_files.html.

On the one hand jquery needs to be imported before the loop over the files in webpack_static_imports.json. But, when we do the menus in the instructor interface to not work! On the other hand if we import jquery AFTER webpack_static_imports.json then all kinds of stuff including selectquestion fails badly.

We need a solution where it all works! Any ideas? Does the user menu work for you on your servers?? when you are using the instructor interface??

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.