Cookie Refactor

Open
#10,376 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Refactor
Clarity
Mostly clear
Activity status
Stale
Tech stack
php
Domain
backend

Research direction

Start by searching the codebase for cm_folder_data, anon_mode_{}, and default_anon_mode_{}_override, then inspect how their cookie scopes and stored paths are set for course materials and gradeables. Done means the listed cookies use their specific URL or gradeable scope, course-material paths are shortened as requested, and other global-scope instances needing the same treatment are identified.

Written by the indexing model from the issue text.

Description

course materials refactor / coding style TA Grading / TA UI

We currently have a variety of cookies throughout our system. Some of them are scoped correctly but some still store in the global scope. In course materials, we store a cm_folder_data cookie in the global scope which stores a lot of data. Cookies have a limit of 4096 bytes and there is also an overall size limit of an HTTP request for Apache.

There is a couple things which need to be done (can be split up into multiple issues):

  • cm_folder_data should be switched from global scope to the URL of course materials. cm_folder_data also stores the entire system path of each course material which should be shortened to either ID or a relative path.
  • anon_mode_{} exists for each gradeable and also exists in the global scope. This should be refactored to be in the specific gradeable scope.
  • The same applies for default_anon_mode_{}_override.
  • We should look if there are any other instances that need this change too.
Dominant language
PHP
Stars
793
Forks
1.1k
Avg merge
2d 16h
Merged PRs (30d)
78

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Submitty/Submitty

All issues in Submitty/Submitty

Similar issues

More PHP issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.