Coder Social home page Coder Social logo

uccser / codewof Goto Github PK

View Code? Open in Web Editor NEW
6.0 6.0 11.0 11.4 MB

A website for maintaining your basic programming skills.

Home Page: https://www.codewof.co.nz

License: MIT License

Python 77.06% HTML 12.13% Dockerfile 0.58% Shell 1.17% JavaScript 6.77% SCSS 2.29%

codewof's People

Contributors

caitlind avatar courtneycb avatar dependabot[bot] avatar ealasdair avatar georgeh049 avatar github-actions[bot] avatar griffinbaxter avatar jackmorgannz avatar jalarimar avatar jimbonothing64 avatar jqi26 avatar katiadelu avatar lucyturn3r avatar mareepalmer avatar pyup-bot avatar taskmaker avatar uccser-admin avatar yamboy1 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

codewof's Issues

Total of evens cannot be answered

The fourth test case for "Total of evens" (total-evens) is currently print(total_of_even_numbers()) which creates a TypeError because the function requires 1 argument. This question cannot be answered because the function definition is locked so it cannot be modified so that the list numbers has a default value.

total of evens

double_even

Python code
def double_even(number):
if number % 2 == 0:
number = number * 2
print(number)

getting an extra line that is printing None in the unit tests

Screenshot from 2019-08-16 12-43-27

Error in driver-speed question text

The question driver-speed uses an example of check_speed(70), but it should really be check_speed(75) to match the requirements of the question

Feature - statistics on homepage

Showing how much the codewof website is being used, similar to parkrun.
Total hours run: 0Years 210Days 18Hrs 42Min 29Secs - Total distance run: 40,730km

Having the homepage showing ?? questions, ?? users, ?? submissions.

Days to Target function IndentationError

The code below was submitted as an answer to the Days to Target function question.

def days_to_target(starting_population, target_population):
    if starting_population - target_population >= 0 :
        return 0
    else:
        keep_going = True
        day_count = 0
        current_population  = starting_population
        
        while keep_going:
            current_population *= 2
            day_count += 1
            if current_population >= target_population:
               	keep_going = False
                return day_count

When the code is run locally (I ran it in Wing), the function runs without an error being thrown and all of the test cases pass, but when it is run in codeWOF, I get the following error:

IndentationError: unindent does not match any outer indentation level on line 14
                return day_count

                ^

I have not been able to figure out why the behaviour is different when the same function is run in these two different environments.

Rounding issue in Print Score function

If the user submits this code as their answer:

def print_score(points, total_possible):
    print(str(points / total_possible * 100) + '%')

It contains the correct amount of decimal places in the answer. However, if they submit this code:

def print_score(points, total_possible):
    print("{}%".format(points / total_possible * 100))

Then it is marked as incorrect. When the two answers are run in a normal IDE, both are marked as correct. I assume that this rounding problem is to do with Skulpt, which would mean that this question should be removed, or modified.
image

Create research application

Add application for managing research studies on codeWOF.

Todo

  • Add models
  • Add views
  • Add forms
  • Email copy of study and consent form to user
  • Filter questions for user
  • Require login for all questions pages
  • Prevent user registering for study more than once
  • Add information how to leave study in enrolled
  • List questions with types

Phase 2 (tasks to do later)

  • Handle multiple studies (limit to one study at a time)
  • Add researcher relationship for study
  • Add admin view for study researcher

Error on first run of ./dev sampledata

This seems to have been introduced in #83

On the first run of sampledata after a fresh build/start/update the error pasted at the bottom of this issue occurs.

This happens when we try to create a batch of question attempts (error in AttemptFactory.py). so far I am unsure what the exact issue is. But as this is only a local error and the sampledata command runs fine on a second run this is low priority.

Research studies loaded.
Traceback (most recent call last):
  File "./manage.py", line 27, in <module>
    execute_from_command_line(sys.argv)
  File "/docker_venv/lib/python3.6/site-packages/django/core/management/__init__.py", line 381, in execute_from_command_line
    utility.execute()
  File "/docker_venv/lib/python3.6/site-packages/django/core/management/__init__.py", line 375, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/docker_venv/lib/python3.6/site-packages/django/core/management/base.py", line 316, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/docker_venv/lib/python3.6/site-packages/django/core/management/base.py", line 353, in execute
    output = self.handle(*args, **options)
  File "/codewof/codewof/general/management/commands/sampledata.py", line 83, in handle
    AttemptFactory.create_batch(size=50)
  File "/docker_venv/lib/python3.6/site-packages/factory/base.py", line 576, in create_batch
    return [cls.create(**kwargs) for _ in range(size)]
  File "/docker_venv/lib/python3.6/site-packages/factory/base.py", line 576, in <listcomp>
    return [cls.create(**kwargs) for _ in range(size)]
  File "/docker_venv/lib/python3.6/site-packages/factory/base.py", line 564, in create
    return cls._generate(enums.CREATE_STRATEGY, kwargs)
  File "/docker_venv/lib/python3.6/site-packages/factory/django.py", line 141, in _generate
    return super(DjangoModelFactory, cls)._generate(strategy, params)
  File "/docker_venv/lib/python3.6/site-packages/factory/base.py", line 501, in _generate
    return step.build()
  File "/docker_venv/lib/python3.6/site-packages/factory/builder.py", line 272, in build
    step.resolve(pre)
  File "/docker_venv/lib/python3.6/site-packages/factory/builder.py", line 221, in resolve
    self.attributes[field_name] = getattr(self.stub, field_name)
  File "/docker_venv/lib/python3.6/site-packages/factory/builder.py", line 375, in __getattr__
    extra=context,
  File "/docker_venv/lib/python3.6/site-packages/factory/declarations.py", line 196, in evaluate
    value = next(iter(self.iterator))
StopIteration```

Create initial function based questions

We need to create roughly 3 to 6 questions to populate the question bank. Questions should be at a beginner programming level (for team members: think of questions at the end of a 121 lab) and focus only on this concept.

Create initial while loop questions

We need to create roughly 3 to 6 questions to populate the question bank. Questions should be at a beginner programming level (for team members: think of questions at the end of a 121 lab) and focus only on this concept.

Create initial list questions

We need to create roughly 3 to 6 questions to populate the question bank. Questions should be at a beginner programming level (for team members: think of questions at the end of a 121 lab) and focus only on this concept.

Create initial input based questions

We need to create roughly 3 to 6 questions to populate the question bank. Questions should be at a beginner programming level (for team members: think of questions at the end of a 121 lab) and focus only on this concept.

These questions must be of the program type, as these are the only ones that take input.

ExternalError for Add 10 question

When the tests are run for the "Add 10" question they fail with the error message:

ExternalError: TypeError: t.test_input_list is undefined on line 1

This seems to only happen when the code includes input(), if it just prints 34 then the first test passes, and when there is no code written it gives the expected "No Python code provided." output.

Screenshot from 2019-06-06 11-04-47

Create initial string questions

We need to create roughly 3 to 6 questions to populate the question bank. Questions should be at a beginner programming level (for team members: think of questions at the end of a 121 lab) and focus only on this concept.

Finish features that were half implemented in gamification

Two features in #75 (activity graph and badge card) weren't quite finished.

  • Activity graph is intended to be similar to the github activity graph, and will track each day either (not sure which one) if the user has achieved their goal number of questions per day or just solved a question on that day.

  • Badge card was a template to make the badges appear in a similar fashion to the questions. Maree can't quite remember the end goal but there might be some further information on it in her final report.

Activity graph code

Badge card template

New question list layout

Change the layout of the list of questions to be similar to that shown in the image attached.

  • They could be ordered alphabetically, and would rearrange themselves to fit to the screen size.

  • Unsure of what the best colours would be to accommodate for a range of colour-blindness.

  • Questions that have been completed would be filled with the colour of that question type, and questions that have not been completed would have the colour of the question type as their border.

question layout

Create initial question bank

We need to create roughly 30 questions to fill the question bank. Questions should be at a beginner programming level and focus on one concept.

Add user dashboard

Should provide links to

  • Questions to do
  • Research studies
  • Profile updates

Answered questions picked for questions of the day

Sometimes questions that a user has already answered (on another day) show up under their questions for the day on their dashboard. If we are going to show them questions they have already answered after some minimum time limit (e.g. one or two months) then they should not be formatted as a question that has been answered, i.e. there should be no tick in the checkbox and the background should not be highlighted.

It would also be nice if the questions shown for the questions of the day could change over at midnight.

Create initial conditional questions

We need to create roughly 3 to 6 questions to populate the question bank. Questions should be at a beginner programming level (for team members: think of questions at the end of a 121 lab) and focus only on this concept.

Factorial question ambiguous about 0!

When I wrote the question I didn't consider that 0! === 1.

If x is less than 1 or greater than 10 your function should return None.

This sentence in the question itself should better reflect that these values should not be worried about, rather than that they are invalid โ€“ because 0 and all values greater than 10 are valid

Create initial for loop questions

We need to create roughly 3 to 6 questions to populate the question bank. Questions should be at a beginner programming level (for team members: think of questions at the end of a 121 lab) and focus only on this concept.

Add public content creator dashboard

Should contain the following information:

  • Number of questions per type.
  • Types which require questions (based off user submissions).
  • Information about planned feature to submit questions.

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.