Skip to content
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

Customize payload params #13

Open
hoffm386 opened this issue Sep 20, 2021 · 0 comments · May be fixed by #16
Open

Customize payload params #13

hoffm386 opened this issue Sep 20, 2021 · 0 comments · May be fixed by #16
Labels
enhancement New feature or request

Comments

@hoffm386
Copy link
Contributor

The canvas_interface code currently hard-codes these values:

if options[:type] == "assignment"
  payload = {
    'assignment[name]' => name,
    'assignment[description]' => html,
    'assignment[submission_types][]' => "online_url",
    'assignment[grading_type]' => 'pass_fail',
    'assignment[points_possible]' => 1
  }
elsif options[:type] == "discussion"
  payload = {
    'title' => name,
    'message' => html
  }
else
  payload = {
    'wiki_page[title]' => name,
    'wiki_page[body]' => html,
    'wiki_page[editing_roles]' => "teachers" 
  }
end

To align with what DS is currently doing with the curriculum, it would be useful to be able to customize these through CLI arguments. In particular, the grading_type and points_possible args.

It would be nice to be able to attach an arbitrary dictionary of key/value pairs to be passed along to the API, although I'm not sure how complicated that would be

@hoffm386 hoffm386 added the enhancement New feature or request label Sep 20, 2021
@ihollander ihollander linked a pull request Nov 2, 2021 that will close this issue
@ihollander ihollander linked a pull request Nov 2, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant