sensei icon indicating copy to clipboard operation
sensei copied to clipboard

Adapt Sensei Core to the Sensei Co-Teachers functionality.

Open aaronfc opened this issue 2 years ago • 1 comments

Changes proposed in this Pull Request

  • Replace check for author with check for edit_post capability of the lesson for Quizzes.

Testing instructions

  • Create a lesson.
  • Confirm you can get a response from the sensei-internal/v1/lesson-quiz/3033?context=edit&_locale=user API (you can open the editor for the lesson and it will do the request for you).
  • With another user confirm you get a permission error when accessing the sensei-internal/v1/lesson-quiz/3033?context=edit&_locale=user API.

New hooks

  • sensei_filter_module_terms_by_owner: Filter that allows to alter the result of the module terms when being filtered checking for the owner.
  • sensei_teacher_meta_box_coteachers_feature: Action that is expected to render the coteachers meta box content.

Screenshot / Video

TBD

aaronfc avatar Jul 11 '22 06:07 aaronfc

Codecov Report

Merging #5345 (328391d) into trunk (8cad8f9) will decrease coverage by 0.01%. The diff coverage is 67.69%.

Impacted file tree graph

@@             Coverage Diff              @@
##              trunk    #5345      +/-   ##
============================================
- Coverage     44.97%   44.96%   -0.02%     
  Complexity     9456     9456              
============================================
  Files           476      476              
  Lines         33482    33491       +9     
  Branches        272      272              
============================================
- Hits          15059    15058       -1     
- Misses        18221    18231      +10     
  Partials        202      202              
Impacted Files Coverage Δ
includes/admin/class-sensei-learners-main.php 5.04% <0.00%> (ø)
...e-list/class-sensei-course-list-block-patterns.php 0.00% <ø> (ø)
...udes/blocks/class-sensei-block-contact-teacher.php 92.15% <ø> (ø)
includes/blocks/class-sensei-lesson-blocks.php 0.00% <0.00%> (ø)
includes/class-sensei-modules.php 35.59% <0.00%> (ø)
includes/class-sensei-teacher.php 46.02% <0.00%> (-0.77%) :arrow_down:
includes/hooks/template.php 0.00% <ø> (ø)
includes/class-sensei-utils.php 54.21% <50.00%> (ø)
includes/class-sensei-quiz.php 60.38% <83.33%> (ø)
...udes/blocks/class-sensei-course-overview-block.php 88.88% <88.88%> (ø)
... and 12 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update fddfa21...328391d. Read the comment docs.

codecov[bot] avatar Jul 11 '22 06:07 codecov[bot]

New branch: add/coteachers-metabox-hook New PR: https://github.com/Automattic/sensei/pull/6115

aaronfc avatar Nov 14 '22 14:11 aaronfc