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
Fix part of #13162: added schemas for SkillMasteryDataHandler #14395
Changes from all commits
46787a8
66af425
1053e4d
8143b0a
c26c9ab
6628376
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,6 +21,7 @@ | |
from core import utils | ||
from core.controllers import acl_decorators | ||
from core.controllers import base | ||
from core.controllers import domain_objects_validator | ||
from core.domain import skill_domain | ||
from core.domain import skill_fetchers | ||
from core.domain import skill_services | ||
|
@@ -33,6 +34,25 @@ class SkillMasteryDataHandler(base.BaseHandler): | |
""" | ||
|
||
GET_HANDLER_ERROR_RETURN_TYPE = feconf.HANDLER_TYPE_JSON | ||
URL_PATH_ARGS_SCHEMAS = {} | ||
HANDLER_ARGS_SCHEMAS = { | ||
'GET': { | ||
'comma_separated_exp_ids': { | ||
'schema': { | ||
'type': 'basestring' | ||
} | ||
} | ||
Comment on lines
+40
to
+44
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please refactor this to use |
||
}, | ||
'PUT': { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @vojtechjelinek Shouldn't There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah, yes, use |
||
'mastery_change_per_skill': { | ||
'schema': { | ||
'type': 'object_dict', | ||
'validation_method': ( | ||
domain_objects_validator.validate_mastery_change) | ||
} | ||
} | ||
} | ||
} | ||
|
||
@acl_decorators.can_access_learner_dashboard | ||
def get(self): | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.