Activity Feed
- Liked Update on Canvas Data 2 plans? for ColinMurtaugh. 05-11-2021 11:52 AM
- Got a Like for Re: Enroll user via theme edit. 08-06-2020 02:03 AM
- Liked New Quizzes - RCE to match Canvas for kroeninm. 07-29-2020 03:08 PM
- Liked [DocViewer] Print annotated comments from Speedgrader for 1086095. 07-13-2020 11:17 AM
- Liked [New Quizzes] New Quizzes Question Type - Drawing for brendan_lake. 07-13-2020 11:17 AM
- Liked New Quizzes: Likert-scale question type as ready-option for ssimpso4. 07-13-2020 11:17 AM
- Liked [Enrollments] Search for user option in course enrollment page for mahola. 06-12-2020 11:32 AM
- Liked Disable automatic inline previews of YouTube Videos for sooterg. 06-01-2020 03:51 PM
- Liked [Discussions] Download discussion board posts for jvolkman. 05-14-2020 04:15 PM
- Liked New Quizzes: Quiz Availability & Extended Time for sbj. 05-14-2020 09:58 AM
- Liked Paste Images into Canvas for blomas. 05-13-2020 03:02 PM
- Liked Ability to View HEIC files in SpeedGrader Preview for jlmckown. 05-07-2020 02:30 PM
- Liked New Rich Content Editor: Open Links in New Window for danielcktan. 04-29-2020 11:53 AM
- Got a Like for Enroll user via theme edit. 04-28-2020 11:45 AM
- Got a Like for Re: Enroll user via theme edit. 04-28-2020 11:45 AM
- Posted Re: Enroll user via theme edit on Canvas Developers Group. 04-28-2020 11:17 AM
- Posted Enroll user via theme edit on Canvas Developers Group. 04-27-2020 11:59 AM
- Tagged Enroll user via theme edit on Canvas Developers Group. 04-27-2020 11:59 AM
- Tagged Enroll user via theme edit on Canvas Developers Group. 04-27-2020 11:59 AM
- Tagged Enroll user via theme edit on Canvas Developers Group. 04-27-2020 11:59 AM
My Posts
Post Details | Date Published | Views | Likes |
---|---|---|---|
Hello, Not a web developer so I have only basic knowledge of CSS and JS. I am trying to put some buttons in the course settings that instructors can click on to add people to their course. These b... |
04-27-2020 |
990 |
1 |
04-28-2020
11:17 AM
1 Like
Hello Robert, Thank you for the detailed post. Yes, we are only expecting the buttons on the settings page. The three buttons are for three different people and instructors would click on the one corresponding to the person they are talking to. I was able to modify your code and add a parameter to the function. I was interested in working with SQS to improve some processes we run at our campus. I wasn't able to get any of that infrastructure set-up, so I ultimately didn't end up using it. I will work on something to provide a notification for success. Thank you again for the great help. -Henry
... View more
04-27-2020
11:59 AM
1 Like
Hello, Not a web developer so I have only basic knowledge of CSS and JS. I am trying to put some buttons in the course settings that instructors can click on to add people to their course. These buttons are for our student assistants and it speeds up the process of them being added to a course to help troubleshoot remotely. I got a version of this working, but it isn't working consistently. Right now the latest version of Firefox isn't doing it while previous versions are working. Chrome is working on my machine. Is there any way I can modify this to make it more consistent? It is adding them as a custom role, and when it works it works well. Any help is appreciated. This code is part of the .js in the theme. if (ENV['current_user_roles'].includes('teacher')) { var undel = window.location.href; var course_id = undel.match(/\d{2,}/); var api_url = "/api/v1/courses/REPLACE_THIS/enrollments"; api_url = api_url.replace("REPLACE_THIS",course_id); undel = undel.slice(0, -9); undel = undel + "/undelete"; $("div#right-side-wrapper.ic-app-main-content__secondary aside#right-side > div > a.Button.Button--link.Button--link--has-divider.Button--course-settings.validator_link").after("<a class='Button Button--link Button--link--has-divider Button--course-settings' href='" + undel + "'><i class='icon-trash'></i> Undelete Content</a>"); $("div#right-side-wrapper.ic-app-main-content__secondary aside#right-side > div > a.Button.Button--link.Button--link--has-divider.Button--course-settings.validator_link").after("<a class='Button Button--link Button--link--has-divider Button--course-settings' href='.' id='addLMS3'><i class='icon-user'></i> LMS Support #3</a>"); $("div#right-side-wrapper.ic-app-main-content__secondary aside#right-side > div > a.Button.Button--link.Button--link--has-divider.Button--course-settings.validator_link").after("<a class='Button Button--link Button--link--has-divider Button--course-settings' href='.' id='addLMS2'><i class='icon-user'></i> LMS Support #2</a>"); $("div#right-side-wrapper.ic-app-main-content__secondary aside#right-side > div > a.Button.Button--link.Button--link--has-divider.Button--course-settings.validator_link").after("<a class='Button Button--link Button--link--has-divider Button--course-settings' href='.' id='addLMS1'><i class='icon-user'></i> LMS Support #1</a>"); document.getElementById("addLMS1").onclick = function() {addLMSPerson1()}; document.getElementById("addLMS2").onclick = function() {addLMSPerson2()}; document.getElementById("addLMS3").onclick = function() {addLMSPerson3()}; function addLMSPerson1() { $.post(api_url, { 'enrollment': {'user_id': xxxxx, 'type': 'TaEnrollment', 'role_id': 23} }); } function addLMSPerson2() { $.post(api_url, { 'enrollment': {'user_id': xxxxx, 'type': 'TaEnrollment', 'role_id': 23} }); } function addLMSPerson3() { $.post(api_url, { 'enrollment': {'user_id': xxxxx, 'type': 'TaEnrollment', 'role_id': 23} }); } } Thank you, Henry
... View more