GithubHelp home page GithubHelp logo

hexatester / moodlepy Goto Github PK

View Code? Open in Web Editor NEW
24.0 24.0 12.0 690 KB

Python wrapper for moodle web service.

Home Page: https://hexatester.github.io/moodlepy/

License: MIT License

Python 100.00%
lms moodle python-client python-wrapper webservice-client

moodlepy's People

Contributors

gaetan1903 avatar hexatester avatar kernicpanel avatar sesostris avatar smehrbrodt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

moodlepy's Issues

mod_page_view_page

Please,
Can you incorporate mod_page_view_page?
I have tried:
arguments3 = {
"pageid": 11
}
contents = moodle ('mod_page_view_page', ** arguments3)

And it returned: "moodle.exception.MoodleException"

Thank you

[Doc Request ✨]

Hi, very good moodle python 🥇

I don't know how send parametre on a function with your module,

Can you show me ?

[Question] Are all types manually written?

Hey I recently stumbled upon your project and was positively surprised how thoroughly everything was annotated.
I am currently in the process of writing basically the same and wanted to ask if these were all manually written or if you scanned the moodle code (or documentation page)?

[BUG 🐞] add_cohort_members parameters result in invalid_parameter_exception

Hey,

I'm trying to add a member to a cohort using the AddCohortMember, CohortType and UserType classes but keep failing. What am I doing wrong?

member = AddCohortMember(CohortType(type = 'id', value = '299'),
                             UserType(type = 'id', value = '9'))
members = [member]
moodle.core.cohort.add_cohort_members(members)

"exception": "invalid_parameter_exception"

[Feature Request ✨] User enrolment

Dear Hexatester,

I'm very glad you're developing this library! I have a moodle website and I tested your lib and it worked well. I'm not a very experienced developer and I'd love to have the function of enrolling students thought the web service.
Could you provide me some help?

Thanks a lot!

moodlepy v1 Roadmap!

Moodlepy version 1 means all functions and arguments must be implemented, but it is not mandatory for tests, documentation and types.

Area list:

  • core_course
  • core_enrol
  • mod_assign
  • mod_forum
  • mod_quiz
  • mod_lesson
  • mod_label
  • core_files
  • gradereport_user
  • core_competency
  • core_fetch
  • core_filters
  • core_form
  • core_get
  • core_grading
  • core_group
  • core_h5p
  • core_output
  • core_question
  • core_rating
  • core_role
  • core_search
  • core_session
  • core_tag
  • core_update
  • core_user
  • gradereport_overview
  • gradingform_guide
  • gradingform_rubric
  • local_mobile
  • message_airnotifier
  • message_popup
  • mod_book
  • mod_choice
  • mod_feedback
  • mod_glossary
  • mod_imscp
  • mod_lti
  • mod_scorm
  • mod_survey
  • mod_wiki
  • report_competency
  • report_insights
  • tool_analytics
  • tool_lp
  • tool_templatelibrary
  • tool_usertours
  • tool_xmldb
  • core_comment
  • core_grades

How to use get_users

Trying to get an existing user by id.

user_service = BaseUser(...)
user = user_service.get_users({id: submission['userid']})

This fails with:
moodle.exception.MoodleException: Ungültiger Parameterwert

How should the parameters be formatted for the get_users function?

Kudos for this nice project btw, very helpful in working with the cumbersome moodle api.

[BUG 🐞]

Describe the bug
I want to understand this error

To Reproduce
Steps to reproduce the behavior:

from moodle import Moodle
url = 'https://my.domain/webservice/rest/server.php'
token = 'super secret token'
moodle = Moodle(url, token)
dict_site_info = moodle('mod_assign_view_assign', assignid=10')

Expected behavior

 File "/home/gaetan/.local/lib/python3.8/site-packages/moodle/moodle.py", line 20, in __call__
    return self.post(wsfunction, moodlewsrestformat, **kwargs)
  File "/home/gaetan/.local/lib/python3.8/site-packages/moodle/mdl.py", line 65, in post
    return self.process_response(data)
  File "/home/gaetan/.local/lib/python3.8/site-packages/moodle/mdl.py", line 74, in process_response
    raise MoodleException(**data)  # type: ignore
TypeError: __init__() got an unexpected keyword argument 'debuginfo'

The documentation info
image

core.cohort.add_cohort_members

Hi! Can you please give me a example of what kind of dict/array structure i need to give for this function. I've been stuck for hours now since i can't figure out how many nested arrays the function wants. Other fuctions such as create user work fine but this is a pain in the ass.

Thanks in advance!

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.