hhchiang
Community Member

Hi all, I've deployed an LTI 1.3 tool as a Discussion Topic Menu, and when I click the menu item in my course, I get back a json result, but I can't find the Discussion Topic ID in the json results.   

Does anyone else have experience working with LTI1.3 and Discussion Topic Menu placement ?

Thanks

more
0 0 365
Code-with-Ski
Community Participant

I recently updated my Canvas LMS Mods (Basic) Chrome extension to provide some new enhancements to the course search and admin flyout menu inspired by ideas and requests I have seen from other users in the community.

Read more...

more
14 19 2,328
elena18
Community Member

It's few months that I don't access the Canvas app installed on OVH VPS server. I tried now and it shows the directory of files, but not the login interface. Nothings has been changed since the last time I use it (december 2022)

Read more...

more
0 2 589
RobbieWatling
Community Novice

Hi all,

I would like to attach a zip file to all of my students submissions. I have been able to upload the file via the Cavnas API. However, I cannot seem to get the file to attach a student's submission. Acccording to https://canvas.instructure.com/doc/api/submission_comments.html I need to "PUT" the file id to the submission API. Can someone who knows rest API better assist me? The main issue is not really understanding how to use the "parameters" for a submission comment here https://canvas.instructure.com/doc/api/submissions.html#method.submissions_api.update 

 

I've attached a portion of my script below, but a linux command would be sufficient too.

 

REQUIREMENTS = """
certifi==2018.11.29
chardet==3.0.4
idna==2.8
python-magic==0.4.15
requests==2.21.0
urllib3==1.24.1
"""

# https://stackoverflow.com/a/44873382
def sha256sum(filename):
    h = hashlib.sha256()
    b = bytearray(128 * 1024)
    mv = memoryview(b)
    with open(filename, "rb", buffering=0) as f:
        for n in iter(lambda: f.readinto(mv), 0):
            h.update(mv[:n])
    return h.hexdigest()


# https://stackoverflow.com/a/16696317 with tweaks
def download_file(url, f):
    # NOTE the stream=True parameter below
    with requests.get(url, stream=True) as r:
        r.raise_for_status()
        for chunk in r.iter_content(chunk_size=8192):
            if chunk:  # filter out keep-alive new chunks
                f.write(chunk)
    # possibly unneeded.
    f.flush()


def add_custom_site_packages_directory(raise_if_failure=True):
    digest = hashlib.sha256(REQUIREMENTS.encode("utf8")).hexdigest()
    dep_root = os.path.join(gettempdir(), "pyallinone_{}".format(digest))
    os.makedirs(dep_root, exist_ok=True)

    for dirpath, dirnames, filenames in os.walk(dep_root):
        if dirpath.endswith(os.path.sep + "site-packages"):
            # that's our dir!
            sys.path.insert(0, os.path.abspath(dirpath))
            return dep_root

    if raise_if_failure:
        raise ValueError("could not find our site-packages dir")

    return dep_root


dep_root = add_custom_site_packages_directory(False)

deps_installed = False

while True:
    try:
        import requests
        import magic

        break
    except ImportError:
        if deps_installed:
            raise ValueError("Something was broken, could not install dependencies")
        try:
            from pip import main as pipmain
        except ImportError:
            from pip._internal import main as pipmain

        with NamedTemporaryFile() as req:
            req.write(REQUIREMENTS.encode("utf-8"))
            req.flush()
            pipmain(
                [
                    "install",
                    "--prefix",
                    dep_root,
                    "--upgrade",
                    "--no-cache-dir",
                    "--no-deps",
                    "-r",
                    req.name,
                ]
            )

        add_custom_site_packages_directory()
        deps_installed = True

print("Step 1...")
hashes = {}
file_ids = []
file_sizes = []
for fn in FILENAMES:
    print(
        "uploading {fn} for assignment {ASSIGNMENT_ID}".format(
            fn=fn, ASSIGNMENT_ID=ASSIGNMENT_ID
        )
    )
    with requests.post(
        CANVAS_API_BASE
        + "courses/{COURSE_ID}/assignments/{ASSIGNMENT_ID}/submissions/{SUBMISSION_ID}/comments/files".format(
            COURSE_ID=COURSE_ID, ASSIGNMENT_ID=ASSIGNMENT_ID, SUBMISSION_ID=SUBMISSION_ID
        ),
        json={
            "access_token": CANVAS_KEY,
            "name": fn,
            "size": os.stat(fn).st_size,
            "content_type": magic.from_file(fn, mime=True),
        },
    ) as r:
        r.raise_for_status()
        response = r.json()
    upload_url = response["upload_url"]
    upload_params = response["upload_params"]

    hashes[fn] = sha256sum(fn)
    with requests.post(
        upload_url, data=upload_params, files={"file": (fn, open(fn, "rb"))}
    ) as r2:
        r2.raise_for_status()
        upload_response = r2.json()

    file_ids.append(upload_response["id"])
    location = upload_response["location"]

print(file_ids)

 

more
0 0 373
SteveBarnes
Community Member

I need an access token to grab a list of line items during the LTI1.3 workflow. I am currently receiving an unsupported grant type error.

I have seen claims that Canvas does not support this flow to issue access tokens for machine to machine API use.

Link here: https://community.canvaslms.com/t5/Canvas-Developers-Group/grant-type-client-credentials/m-p/459904

more
0 0 556
RandyBennett
Community Novice

I'm a teacher, and I've been playing with the api in a few other sheets that I've found. It's got me wondering if I could use a google sheet with a series of my gradebooks brought from other sheets, and have it update the grades in canvas.

Read more...

more
0 1 500
DeletedUser
Not applicable

Hi, I'm new

Read more...

more
0 1 409
SarahDaugherty
Community Member

I have a suggestion for a couple new features that I know i would use frequently. I believe other students would as well. It is efficient and time saving, also would help navigate us through what we have completed over our time in school, our past and current classes. Maybe the instructors would find it useful and a helpful added feature for them as well. 

 

Unsure of how Canvas is programed but I sure am hoping it can be tested, figured out and added into a feature update. 

Read more...

more
0 1 502
arlin_burton
Community Member

Hi Im a Canvas Admin, for a University

Im requesting a disign feature for Canvas,

is it possible to add a pionts total option to appear on the Assignemnts modules

I have instructors with 25 to 40 assignemnts and have to remind them the points for the assignemnts do no total what they have in the syllabus.

see attachemnt

If you could just design the module to sum the total of the page points.

see attachment

 

arlin.burton

Read more...

more
0 1 671
WastaTariq
Community Member

Dear Canvas 

This is Wasta, I am using Canvas app which my school provides me to takes the video lecture but on my Ipad (IOS 15) generation 8 ,as I open the video there is no audio in the video , only when I start the video there is a sound but as soon as I forward it or rewind the video the audio disappears. I contacted the apple support system they said my device is working fine and everything is good to go from my side they asked me to contact the developer as this issue is specifically for canvas. 
Also I tried to take the video from safari, chrome, Firefox but I faced the same issue there as well no audio as soon as I forward or rewind the video. Please help me in fixing the problem I am so worried due to this.

Regards 

Wastatar30@gmail.com

more
0 0 562
WastaTariq
Community Member

Dear Canvas 

Dear Canvas

This is Wasta, I am using Canvas app which my school provides me to takes the video lecture but on my Ipad (IOS 15) generation 8 ,as I open the video there is no audio in the video , only when I start the video there is a sound but as soon as I forward it or rewind the video the audio disappears. I contacted the apple support system they said my device is working fine and everything is good to go from my side they asked me to contact the developer as this issue is specifically for canvas. 
Also I tried to take the video from safari, chrome, Firefox but I faced the same issue there as well no audio as soon as I forward or rewind the video 

Please help me as I am in stress due to this 

 

regards

wastatar30@gmail.com

Read more...

more
0 0 550
DominicDeSantis
Community Member

My team is trying to replicate in one of our views how Canvas presents TODOs in its own UI. The TODO items endpoint (https://canvas.instructure.com/doc/api/users.html#method.users.todo_items) appears to be the correct one to use, although it's unclear what parameters Canvas itself may be using to for its presentation. As such, we have some questions about Canvas and the API.

When Canvas presents the TODOs in its own UI, what rules/boundaries determine the list of items that are being presented:
1. Does it present the user's most recent n number of TODOs?
2. Does it present the user's TODOs for the current term?
3. Does it present all of the user's TODOs ever?
4. Something else?

Regarding the TODO items API (https://canvas.instructure.com/doc/api/users.html#method.users.todo_items), we're trying to understand some nuances of the pagination. Specifically, what is the difference between fetching the "current" vs "last" pages?

more
0 2 790
zapsarth
Community Member

I want to know how to use the webhook subscription api, including all the context types and such.

 

Read more...

more
0 0 659
zapsarth
Community Member

I need an api endpoint that returns a course image url.

Read more...

more
0 2 896
Code-with-Ski
Community Participant

Learn about the Chrome extension that I've been developing as a personal side project to use with Canvas LMS to add some new features and help improve workflows.  Most of the customizations so far are for the admin area of Canvas, but I am now working on adding some customizations that will add features in other areas of Canvas that could be useful to more users.

Link to Chrome Extension in the Chrome Web Store: Canvas LMS Mods (Basic)

Read more...

more
10 18 3,447
Alex1005
Community Member

“Computer Vision” sounds like something from the future, though computer vision algorithms are not as fantastic as they seem to be. Starting from 1960-ies and up to today, computer vision was developing along with AI ideas and culminated in today’s helping hand of business and marketing enhancement. Let’s discover why, in the era of tech, it becomes essential to get to know such technologies.

Read more...

more
0 0 676
BradHeffernan
Community Member

Hi Everyone,

Great to be part of this community, Im IT Support for Horizon Christian School, and would love to share an app i made for the school.

Not sure were to post this, so hopefully ok here.

I have created an application with a Settings file that will make this application universal across platforms.

Our host of example is horizon-sa.instructure.com the key you need to generate in your user settings

Click [+ New Access Token]. button

I have shared from my onedrive, feel free to try it out if you like.

Screenshot Attached

Horizon Canvas User Importer 

more
0 0 756
BetsyWilkinson
Community Member

I want a test question type that I will call a mastery question. This kind of question will allow me to randomize the input numbers so that the answer can be calculated by Canvas but will be different every time for every student.

For example, ...
If I want to test that students know that the sum of the three angles in any triangle is 180 degrees then I would have Canvas randomize a variable 'A' (I could tell Canvas to generate a whole number between 20 and 50) and a variable 'B' (I could tell Canvas to generate a whole number between 50 and 90). Then the answer could be automatically calculated by Canvas as '180 - A - B'.

Students could answer this question only if they understood the principle but could test their knowledge using the same question an unlimited number of times. That is because the first time they are asked the question: "What is the third angle of a triangle if the first angle is 32 degrees [random number generated for 'A'] ad the second angle is 76 degrees [input random number generated for 'B']? The correct answer would be calculated by Canvas as 72 degrees (180-32-76 = 72). If the student did not enter the correct answer they would get feedback reminding them of what they need to know then they could get the same question again but with different numbers.

I want to use this for a math review test that should evaluate the students' readiness for moving forward in a course. This is essential for any math-rich course.

more
0 2 839
breilly1
Community Member

Unenroll user from a class via SIS UserID?

Read more...

more
0 2 985
JosephRousseau
Partner
Partner

I'm looking to build an app that integrates on all canvas pages for the student role and ideally would like to use LTI to accomplish this, but as LTI placement doesn't allow for space on every page and doesn't allow for the space I'm looking to occupy (right sidebar) I am currently building this app out using the global javascript functionality. I do still need to authenticate the user on my server for server side functions and this is where LTI really would have helped. I'm curious if anyone has any experience combining these two approaches and if there might be a way  to authenticate a global js based app using the LTI 1.3 protocol (from the global js context - so would have to be an api call or something).

If not (maybe I'm approaching this the wrong way), I know I can call the canvas api using the context of the currently logged in user, is there an easy way I could maybe pass a token or something that my server could authenticate the logged in user?

more
0 6 1,332
OliverKharasGU
Community Explorer

Hi everyone, I hopefully have a simple question to ask here about this call.

I want to run a creation of quiz questions through a CSV file with this API and I have everything sorted bar how to write the say 4 possible answers to a multiple choice question. I'm using Postman to run the call.

If someone has an example that would be great too 😊

*FYI I have attached an image of a test question

 

Thanks again,

more
0 1 916
RongenRobles
Community Member

We need to embed our Hubspot chatflow to our Canvas Instructure.

Read more...

more
0 0 929
OliverKharasGU
Community Explorer

Hi everyone this is what I currently have:

 

Capture.PNG

 

And my CSV contains the following two copies:

222.PNG

But my two copies are sitting as 'pre processing' and I am unsure as to what I'm doing wrong. Help would be greatly appreciated

more
0 4 1,150
JeremyWu
Community Member

Get grade book  of course with Canvas API

Read more...

more
0 1 850
JackKushnatsian
Community Member

Has anyone had success renaming specific terminology both in the navigation and throughout the platform?

Read more...

more
1 5 1,151
gerosullivan1
Community Member

If you are thinking of taking your courses to the next level or are interested in other flexible ways to develop and manage content authoring, read on!

🎬 YouTube version.

Following on from our CanvasCon 2018 talk, this article describes how we embraced the web’s shift to a decentralised stack (APIs, no-code, Notion, Zapier...) and created our own authoring system that creates engaging and responsive pages rendered in Canvas.

pages_gif.gif

Read more...

more
11 1 1,664
mortezajafari
Community Member

گلاب با تقطیر گلبرگهای گل رز با بخار ایجاد می شود. گلاب معطر است و گاهی اوقات به عنوان یک عطر طبیعی ملایم به عنوان جایگزینی برای عطرهای پر از مواد شیمیایی استفاده می شود.

هزاران سال از گلاب استفاده شده است ، از جمله در قرون وسطی. تصور می شود که در ایران کنونی ریشه گرفته باشد.

به طور سنتی هم در محصولات زیبایی و هم در محصولات غذایی و آشامیدنی مورد استفاده قرار گرفته است.

این همچنین با بسیاری از مزایای بالقوه سلامتی ، از جمله موارد زیر همراه است

Read more...

more
0 0 877
RezaMazroei
Community Member

This is a general question about APIs. Imagine, we have an object (users, assignments, etc) in canvas with all parameters set especially (SIS ID, or integration ID). Now, I want to know, if I send an API(POST request) with exact parameters to canvas, what would happen when the object exists already in canvas?

The canvas ignore the POST request? or overwrite the object with the new request, or create a duplicate?

I am asking this question because I am developing a python code, reads the data from the database and sends POST requests to create an object in canvas, so I am worried if I send a request which the object is already into the system.

Read more...

more
0 2 1,054
jerry_nguyen
Community Contributor

Exporting Canvas Live Events to your SQL database

Read more...

more
7 6 2,478
RobertGainer
Community Member

Hello,

We are trying to set up Diffing mode to run our SIS files and are using the below CURL command.

/usr/bin/curl --tlsv1.2 -H 'Content-Type: application/octet-stream' -F diffing_data_set_identifier=DiffID -F attachment=@/home/batch/Canvas/canvasfiles.zip --output /dev/null --write-out '%{http_code}' --stderr /tmp/CANVAS.07072021.7995592.err.canvasfiles.zip -H "Authorization: Bearer TOKEN" https://oursite.edu/api/v1/accounts/1/sis_imports.json?import_type=instructure_csv&extension=zip 

Unfortunately the files are not updating anything in the system. Does anyone see anything wrong with our CURL command that may be causing this issue to occur?

Thanks,

Robert

more
0 1 1,037