Automatically weighted grades and ChatGPT


One of the activities that is carried out when working with learning management systems (LMS) is to manage the grades obtained by students, either to report on their performance; this allows them to see their grades on each activity and the final grade for the course.

However, it is sometimes necessary to report scores to other external systems, so this creates an opportunity to develop a solution that performs this process.

What is Blackboard?

The first LMS used is Blackboard Learn; It is an online platform that allows teachers to create and manage online courses, and students to access these courses, interact with teaching material, and complete online activities and assessments.

So far, so good with the use of the LMS šŸ‘, however, a problem was identified, since it was necessary to transfer the final grade of weighted form to another system of administration of the qualifications.

Grading System

In this system it is necessary to carry out a weighting of the maximum grade of each exam (a total of 3) plus a cumulative one. So this was done manually, where many times it worked without problems, but in some cases, that the notes were greater than the weight, it had to be distributed. The latter, I create an opportunity for improvement in order to create a solution that allows the distribution of the final grade, in the weightings that are needed and that is calculated more precisely using decimals, since when it is done with human intervention normally generated errors in the calculations.

Solution I

This first solution is very simple, since the only thing that is wanted is to generate the weighted grades. The LMS Blackboard system allows you to export grades to a CSV file, so a program called grades-weighted-automatically was developed; that read the generated file or files, obtaining the desired result. This solution was functional for a while.

LMS change

The educational entity made a change of LMS, going from Blackboard to Canvas.

What is Canvas?

Canvas is an online learning management system that offers a wide range of tools and features for online teaching and learning, with a focus on ease of use and user experience.

Solution II

This second solution also maintains its simplicity, since again the only thing that is wanted is to generate the weighted scores. The LMS Canvas system allows exporting to a CSV file with grades, so the grades-weighted-automatically program is modified; keeping the scheme of reading the generated files, obtaining the desired result.

Finishing the migration to the use of the new LMS, this server thought: is it possible to eliminate the export step and consult the LMS directly using an API?; so we proceeded to make the query to ChatGPT.

What is ChatGPT?

We are living in an exciting time when it comes to AI technology, as advances in AI research and development are enabling more sophisticated and complex applications in a variety of fields.

In particular, AI has been increasingly used in areas such as medicine, education, scientific research, transportation, and manufacturing. This has enabled significant advances in efficiency, precision and productivity in these fields.

An AI language model known as ChatGTP is helping propel technology into a more sophisticated and intelligent future. This tool, which itself recognizes that its impact is limited compared to human creativity and innovation, expresses that it is here to help and that it hopes to continue doing so in the future. (This introduction is generated by ChatGPT, with minor modifications)

What is an API?

An API (Application Programming Interface) is a piece of code that allows different applications to communicate with each other and share information and functionality. An API is an intermediary between two systems, allowing one application to communicate with another and request specific data or actions.

ChatGTP Help

Below are the queries, help and support received from artificial intelligence.

  1. What would be the code to connect to the Canvas API and be able to access the gradebook?

    We proceeded to investigate what the API access key generation process was like, as well as to test that the code worked. Said process was successful, so the AI was right about the feasibility of carrying out said task. However, not everything was rosy, since access to student grades had not yet been achieved.

  2. Could you provide me another code to list the canvas gradebook using an api?

    Student grades were not yet available.

  3. The code fails with the following message: AttributeError: ā€˜Courseā€™ object has no attribute ā€˜get_gradesā€™. Did you mean: ā€˜get_groupsā€™? Any idea what it could be?

    It was verified that this was not the problem, since it did have the latest version of the library, so it was attempted without a library.

  4. I have the latest version of canvasapi, but the error persists, any ideas to use the api directly without a library.

  5. The error still persists, will it be possible to get the grades using the user or student?

  6. Do you know how to include the current_grading_period_scores option in the include[] parameter of the api request?

  7. I can see the percentages, but not the actual score, what is missing to see that?

  8. How can I know the total points that have been assigned in a canvas course, using an api?

  9. Is it possible to use another api, other than custom_gradebook_columns, since that doesnā€™t return the possible_points?

  10. This application does not have all the points of the assignments, why is that?

  11. Hello!, Could you help me by providing me with a python code to consult the courses marked as favorites in the Canvas LMS?

  12. Now, could you give me the code to get the id of the user that owns the token that is consulting the api?

Canvas API Documentation Help

Solution III

This third solution has the advantage of using the API directly, so it can be used without doing CSV file exports, and generates the weighted grades . šŸ˜Ž


  • Compliance

    • The conversation with ChatGPT managed to realize:

      • The possibility of working with the API.
      • The way to send options to the include[] parameter
      • The way to generate the possible points.
      • The existence of the parameter page_number
      • The way to get favourite courses
  • Purpose

    • Keeping in mind the purpose, we focused on finding an answer with the data that was obtained.