Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
15471f0
Update generated README
actions-user Jan 29, 2024
ff5f1d2
Add the appearance of pin button for instructor account and relevant …
Skadeven Feb 11, 2024
882cc26
added two sections in template files, but wait for backend to add pin…
corincewang Feb 11, 2024
73c9304
pinned turns yellow temporarily
viviannna Feb 12, 2024
5ee049e
pass linter and tester
viviannna Feb 12, 2024
f6f5d66
Added sorting posts by priority
jcheng1103 Feb 12, 2024
980d824
Added setters and getters for important attribute
jcheng1103 Feb 12, 2024
9a87c85
Removed unused function parameter
jcheng1103 Feb 12, 2024
a5be705
Added test case for marking posts as important
jcheng1103 Feb 12, 2024
cc6d6e6
postAPI.unimportant didn't get pushed earlier
jcheng1103 Feb 12, 2024
274f6fa
tidied types and disabled linter no-unused-vars
viviannna Feb 13, 2024
bbb7168
Merge pull request #15 from CMU-313/issue8
GabrielAguirre1 Feb 13, 2024
7b7a841
Merge pull request #16 from CMU-313/issue2
GabrielAguirre1 Feb 14, 2024
7c2451c
Merge branch 'main' into 2sections
GabrielAguirre1 Feb 14, 2024
e00578f
Merge pull request #14 from CMU-313/2sections
GabrielAguirre1 Feb 14, 2024
b9326b0
Merge branch 'main' into add-pin-button
GabrielAguirre1 Feb 14, 2024
8b9f21f
Merge pull request #12 from CMU-313/add-pin-button
GabrielAguirre1 Feb 14, 2024
f6744fb
Merge pull request #13 from CMU-313/add-pinned-style
GabrielAguirre1 Feb 14, 2024
64f8abb
second attempt at merging the code (the first one's buttons didn't wo…
GabrielAguirre1 Feb 23, 2024
b042183
changed isImportant to important in data field
corincewang Feb 23, 2024
3b18390
added frontend code and it's working, but the button is still not wor…
corincewang Feb 26, 2024
354c017
lint passed and changed bookmark.js and important.js in src/posts, ad…
corincewang Feb 28, 2024
396a0c1
Added test case justification to UserGuide.md
jcheng1103 Feb 29, 2024
95ae88c
All tests passed, not merged with main
Skadeven Feb 29, 2024
f030e7c
add config_template.json
corincewang Mar 14, 2024
1d597db
add create_config.sh and changed dockerfile
corincewang Mar 14, 2024
ee46ed8
updated userguide.md
corincewang Mar 14, 2024
9ed9489
Added complexity-report
jcheng1103 Mar 14, 2024
1e3302d
installed jshint and added log
viviannna Mar 14, 2024
dfe886c
Merge branch 'main' into complexity-report
viviannna Mar 14, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .history/Dockerfile_20240313163040
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
FROM node:lts

RUN mkdir -p /usr/src/app && \
chown -R node:node /usr/src/app
WORKDIR /usr/src/app

ARG NODE_ENV
ENV NODE_ENV $NODE_ENV

COPY --chown=node:node install/package.json /usr/src/app/package.json

USER node

RUN npm install --only=prod && \
npm cache clean --force

COPY --chown=node:node . /usr/src/app

ENV NODE_ENV=production \
daemon=false \
silent=false

EXPOSE 4567

CMD test -n "${SETUP}" && ./nodebb setup || node ./nodebb build; node ./nodebb start
29 changes: 29 additions & 0 deletions .history/Dockerfile_20240313201006
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
FROM node:lts

RUN mkdir -p /usr/src/app && \
chown -R node:node /usr/src/app
WORKDIR /usr/src/app

RUN apt-get update && apt-get install -y jq

ARG NODE_ENV
ENV NODE_ENV $NODE_ENV

COPY --chown=node:node install/package.json /usr/src/app/package.json

USER node

RUN npm install && \
npm cache clean --force

COPY --chown=node:node . /usr/src/app

ENV NODE_ENV=production \
daemon=false \
silent=false

EXPOSE 4567

RUN chmod +x create_config.sh

CMD ./create_config.sh -n "${SETUP}" && ./nodebb setup || node ./nodebb build; node ./nodebb start
29 changes: 29 additions & 0 deletions .history/Dockerfile_20240313201011
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
FROM node:lts

RUN mkdir -p /usr/src/app && \
chown -R node:node /usr/src/app
WORKDIR /usr/src/app

RUN apt-get update && apt-get install -y jq

ARG NODE_ENV
ENV NODE_ENV $NODE_ENV

COPY --chown=node:node install/package.json /usr/src/app/package.json

USER node

RUN npm install && \
npm cache clean --force

COPY --chown=node:node . /usr/src/app

ENV NODE_ENV=production \
daemon=false \
silent=false

EXPOSE 4567

RUN chmod +x create_config.sh

CMD ./create_config.sh -n "${SETUP}" && ./nodebb setup || node ./nodebb build; node ./nodebb start
Empty file.
29 changes: 29 additions & 0 deletions .history/UserGuide_20240228140824.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
In this file, provide a detailed outline of how to use and user test your new feature(s)
You should also provide a link/description of where your added automated tests can be found, along with a description of what is being tested and why you believe the tests are sufficient for covering the changes that you have made.

1. New Feature Introduction: Pin Posts
The new feature "Pin Posts" allow users to pin the posts at the top of post pool,
so that the people can easily see the pinned, important posts. To make the post pool clean,
only instructors are allowed to pin posts, so students cannot pin posts. Instructors
can pin or unpin posts at any time. All posts, regardless of pinned or unpinned, are
listed in timeline descending sequence, so that the most recent posts are at the top.


2. How to use pin feature:
Instructor can click on the dropdown menu on bottom right position, and then click
on "pin" button under the dropdown. Then, instructors are expected to see that post
be pinned on the very top. If instructors want to unpin that post, then he/she just
need to reopen the dropdown menu and click on "unpin" button instead.


3. How to test pin feature
(a). built-in test in codebase.
(b). users can test pin and unpin feature in the front end.... TO BE DONE


4. Link to Automated test
TO BE DONE


5. Justification of sufficent test
TO BE DONE
29 changes: 29 additions & 0 deletions .history/UserGuide_20240228140852.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
In this file, provide a detailed outline of how to use and user test your new feature(s)
You should also provide a link/description of where your added automated tests can be found, along with a description of what is being tested and why you believe the tests are sufficient for covering the changes that you have made.

1. New Feature Introduction: Pin Posts
The new feature "Pin Posts" allow users to pin the posts at the top of post pool,
so that the people can easily see the pinned, important posts. To make the post pool clean,
only instructors are allowed to pin posts, so students cannot pin posts. Instructors
can pin or unpin posts at any time. All posts, regardless of pinned or unpinned, are
listed in timeline descending sequence, so that the most recent posts are at the top.


2. How to use pin feature:
Instructor can click on the dropdown menu on bottom right position, and then click
on "pin" button under the dropdown. Then, instructors are expected to see that post
be pinned on the very top. If instructors want to unpin that post, then he/she just
need to reopen the dropdown menu and click on "unpin" button instead.


3. How to test pin feature
(a). built-in test in codebase.
(b). users can test pin and unpin feature in the front end.... TO BE DONE


4. Link to Automated test
TO BE DONE


5. Justification of sufficent test
TO BE DONE
29 changes: 29 additions & 0 deletions .history/UserGuide_20240228141027.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
In this file, provide a detailed outline of how to use and user test your new feature(s)
You should also provide a link/description of where your added automated tests can be found, along with a description of what is being tested and why you believe the tests are sufficient for covering the changes that you have made.

1. New Feature Introduction: Pin Posts
The new feature "Pin Posts" allow users to pin the posts at the top of post pool,
so that the people can easily see the pinned, important posts. To make the post pool clean,
only instructors are allowed to pin posts, so students cannot pin posts. Instructors
can pin or unpin posts at any time. All posts, regardless of pinned or unpinned, are
listed in timeline descending sequence, so that the most recent posts are at the top.


2. How to use pin feature:
Instructor can click on the dropdown menu on bottom right position, and then click
on "pin" button under the dropdown. Then, instructors are expected to see that post
be pinned on the very top. If instructors want to unpin that post, then he/she just
need to reopen the dropdown menu and click on "unpin" button instead.


3. How to test pin feature
(a). For backend test, there are built-in test in codebase.
(b). users can test pin and unpin feature in the front end


4. Link to Automated test
TO BE DONE


5. Justification of sufficent test
TO BE DONE
31 changes: 31 additions & 0 deletions .history/UserGuide_20240228141436.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
In this file, provide a detailed outline of how to use and user test your new feature(s)
You should also provide a link/description of where your added automated tests can be found, along with a description of what is being tested and why you believe the tests are sufficient for covering the changes that you have made.

1. New Feature Introduction: Pin Posts
The new feature "Pin Posts" allow users to pin the posts at the top of post pool,
so that the people can easily see the pinned, important posts. To make the post pool clean,
only instructors are allowed to pin posts, so students cannot pin posts. Instructors
can pin or unpin posts at any time. All posts, regardless of pinned or unpinned, are
listed in timeline descending sequence, so that the most recent posts are at the top.


2. How to use pin feature:
Instructor can click on the dropdown menu on bottom right position, and then click
on "pin" button under the dropdown. Then, instructors are expected to see that post
be pinned on the very top. If instructors want to unpin that post, then he/she just
need to reopen the dropdown menu and click on "unpin" button instead.


3. How to test pin feature
(a). For backend test, there are built-in test in codebase. There are tests on
is_important function.
(b). For frontend test, users can test pin and unpin feature on the webpage. They
just click on the bottomright dropdown menu.


4. Link to Automated test
TO BE DONE


5. Justification of sufficent test
TO BE DONE
32 changes: 32 additions & 0 deletions .history/UserGuide_20240228141624.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
In this file, provide a detailed outline of how to use and user test your new feature(s)
You should also provide a link/description of where your added automated tests can be found, along with a description of what is being tested and why you believe the tests are sufficient for covering the changes that you have made.

1. New Feature Introduction: Pin Posts
The new feature "Pin Posts" allow users to pin the posts at the top of post pool,
so that the people can easily see the pinned, important posts. To make the post pool clean,
only instructors are allowed to pin posts, so students cannot pin posts. Instructors
can pin or unpin posts at any time. All posts, regardless of pinned or unpinned, are
listed in timeline descending sequence, so that the most recent posts are at the top.


2. How to use pin feature:
Instructor can click on the dropdown menu on bottom right position, and then click
on "pin" button under the dropdown. Then, instructors are expected to see that post
be pinned on the very top. If instructors want to unpin that post, then he/she just
need to reopen the dropdown menu and click on "unpin" button instead.


3. How to test pin feature
(a). For backend test, there are built-in tests in codebase. There are tests on
is_important function which test the important field actually marks post as important/unimportant
successfully.
(b). For frontend test, users can test pin and unpin feature on the webpage. They
just click on the bottomright dropdown menu.


4. Link to Automated test
TO BE DONE


5. Justification of sufficent test
TO BE DONE
33 changes: 33 additions & 0 deletions .history/UserGuide_20240228142213.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
In this file, provide a detailed outline of how to use and user test your new feature(s)
You should also provide a link/description of where your added automated tests can be found, along with a description of what is being tested and why you believe the tests are sufficient for covering the changes that you have made.

1. New Feature Introduction: Pin Posts
The new feature "Pin Posts" allow users to pin the posts at the top of post pool,
so that the people can easily see the pinned, important posts. To make the post pool clean,
only instructors are allowed to pin posts, so students cannot pin posts. Instructors
can pin or unpin posts at any time. All posts, regardless of pinned or unpinned, are
listed in timeline descending sequence, so that the most recent posts are at the top.


2. How to use pin feature:
Instructor can click on the dropdown menu on bottom right position, and then click
on "pin" button under the dropdown. Then, instructors are expected to see that post
be pinned on the very top. If instructors want to unpin that post, then he/she just
need to reopen the dropdown menu and click on "unpin" button instead.


3. How to test pin feature
(a). For backend test, there are built-in tests in codebase. There are tests on
is_important function which test the important field actually marks post as important/unimportant
successfully.
(b). For frontend test, users can test pin and unpin feature on the webpage. They
just click on the bottomright dropdown menu.


4. Link to Automated test
TO BE DONE


5. Justification of sufficent test
The test coverage is around 75%, and that sufficiently justifies the test is enough
for pin button working well.
33 changes: 33 additions & 0 deletions .history/UserGuide_20240228142243.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
In this file, provide a detailed outline of how to use and user test your new feature(s)
You should also provide a link/description of where your added automated tests can be found, along with a description of what is being tested and why you believe the tests are sufficient for covering the changes that you have made.

1. New Feature Introduction: Pin Posts
The new feature "Pin Posts" allow users to pin the posts at the top of post pool,
so that the people can easily see the pinned, important posts. To make the post pool clean,
only instructors are allowed to pin posts, so students cannot pin posts. Instructors
can pin or unpin posts at any time. All posts, regardless of pinned or unpinned, are
listed in timeline descending sequence, so that the most recent posts are at the top.


2. How to use pin feature:
Instructor can click on the dropdown menu on bottom right position, and then click
on "pin" button under the dropdown. Then, instructors are expected to see that post
be pinned on the very top. If instructors want to unpin that post, then he/she just
need to reopen the dropdown menu and click on "unpin" button instead.


3. How to test pin feature
(a). For backend test, there are built-in tests in codebase. There are tests on
is_important function which test the important field actually marks post as important/unimportant
successfully.
(b). For frontend test, users can test pin and unpin feature on the webpage. They
just click on the bottomright dropdown menu.


4. Link to Automated test
Tests are included in tests/posts.js


5. Justification of sufficent test
The test coverage is around 75%, and that sufficiently justifies the test is enough
for pin button working well.
34 changes: 34 additions & 0 deletions .history/UserGuide_20240228142253.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
prompt:
In this file, provide a detailed outline of how to use and user test your new feature(s)
You should also provide a link/description of where your added automated tests can be found, along with a description of what is being tested and why you believe the tests are sufficient for covering the changes that you have made.

1. New Feature Introduction: Pin Posts
The new feature "Pin Posts" allow users to pin the posts at the top of post pool,
so that the people can easily see the pinned, important posts. To make the post pool clean,
only instructors are allowed to pin posts, so students cannot pin posts. Instructors
can pin or unpin posts at any time. All posts, regardless of pinned or unpinned, are
listed in timeline descending sequence, so that the most recent posts are at the top.


2. How to use pin feature:
Instructor can click on the dropdown menu on bottom right position, and then click
on "pin" button under the dropdown. Then, instructors are expected to see that post
be pinned on the very top. If instructors want to unpin that post, then he/she just
need to reopen the dropdown menu and click on "unpin" button instead.


3. How to test pin feature
(a). For backend test, there are built-in tests in codebase. There are tests on
is_important function which test the important field actually marks post as important/unimportant
successfully.
(b). For frontend test, users can test pin and unpin feature on the webpage. They
just click on the bottomright dropdown menu.


4. Link to Automated test
Tests are included in tests/posts.js


5. Justification of sufficent test
The test coverage is around 75%, and that sufficiently justifies the test is enough
for pin button working well.
35 changes: 35 additions & 0 deletions .history/UserGuide_20240228142319.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
prompt:
In this file, provide a detailed outline of how to use and user test your new feature(s)
You should also provide a link/description of where your added automated tests can be found, along with a description of what is being tested and why you believe the tests are sufficient for covering the changes that you have made.

1. New Feature Introduction: Pin Posts
The new feature "Pin Posts" allow users to pin the posts at the top of post pool,
so that the people can easily see the pinned, important posts. To make the post pool clean,
only instructors are allowed to pin posts, so students cannot pin posts. Instructors
can pin or unpin posts at any time. All posts, regardless of pinned or unpinned, are
listed in timeline descending sequence, so that the most recent posts are at the top.


2. How to use pin feature:
Instructor can click on the dropdown menu on bottom right position, and then click
on "pin" button under the dropdown. Then, instructors are expected to see that post
be pinned on the very top. If instructors want to unpin that post, then he/she just
need to reopen the dropdown menu and click on "unpin" button instead.


3. How to test pin feature
(a). For backend test, there are built-in tests in codebase. There are tests on
is_important function which test the important field actually marks post as important/unimportant
successfully.
(b). For frontend test, users can test pin and unpin feature on the webpage. They
just click on the bottomright dropdown menu and click on "pin" button, and then
refresh the webpage to view the change.


4. Link to Automated test
Tests are included in tests/posts.js


5. Justification of sufficent test
The test coverage is around 75%, and that sufficiently justifies the test is enough
for pin button working well.
Loading