Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
projects/12 Local News.md
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
93 lines (58 sloc)
4.13 KB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Local News | |
Build a local news site where users can log in, post and read about local news and events: | |
--- | |
## Testing | |
The system should include the data for at least 10 valid news articles. | |
You are required to create the following accounts to allow the system to be tested. All accounts should have the password `p455w0rd`: | |
1. `user1` | |
2. `user2` | |
3. `admin` (only needed if the stage 2 functionality is attempted). | |
--- | |
## Feature 1 | |
A home page tha should be visible even if a `user` is not logged in. If the `user` is logged in they should see an **Add news** link or button that takes the user to the _Add News_ page where they can add a news article, this should include: | |
1. The title. | |
2. A photo uploaded from their computer. | |
3. A detailed, multi-line news article that can be formatted using the _markdown_ syntax. | |
As well as the data from the form, your database should also store the following data (without asking the user to enter it). | |
1. The username of the person adding the article. | |
2. The current date and time. | |
3. The article status (set this to `new`). | |
> To demonstrate this feature and to prove that the form works correctly you will need to show that the data is being persisted correctly, either by running a database query or an API call depending on the platform and technology you are using. | |
## Feature 2 | |
The _Homepage_ should display summaries of all the news articles, each should show: | |
1. The title. | |
2. A thumbnail photo. | |
3. The date (but not the time) added (with the most recent at the top). | |
## Feature 3 | |
Each news article should have a **Details** link or button that takes the user to a _News Article_ screen. This should contain the full details of the news article, including: | |
1. The title. | |
2. The full-sized photo. | |
3. The username of the author. | |
4. The date added, but not the time. | |
5. The multi-paragraph, formatted news article with any _markdown_ replaced with html. | |
## Feature 4 | |
The intermediate tasks require you to make changes to the functionality: | |
1. Any articles with a status of `new` should not be displayed in the news feed. | |
2. If an admin user logs in they should see an **Authorise articles** link or button that takes them to a screen that only lists the summaries of articles with a status of `new`. | |
3. Each of these articles should have an **Authorise** link or button. Clicking this sets the status to `authorised` and returns the admin user to the _Authorise Articles_ screen. if there are no more articles to authorise they are returned to the home screen. | |
4. When an article is added, the database stores the current location as latitude and longitude. | |
5. Articles on the home screen display their approximate distance from the person viewing (in Km) and are ordered with the nearest at the top. | |
---- | |
## Extras | |
In some assignment briefs you are given marks for the appropriate use of media and using sensors built into the user's device. | |
### Sensors | |
In some assignment briefs you are given marks for the appropriate use of sensors and sensor data. You should be implementing: | |
1. When a news article is added it should be provided with a geo-location based on the location of the person adding the article. | |
2. When the user views an article it should show the location. | |
3. When the user is prompted to upload a photo they should be given the option of using the device camera (if available). | |
4. The home screen should display a map showing the locations of each news item: | |
1. Clicking on a pin should show a summary bubble showing the brief title and the person who wrote it. | |
2. Clicking on this should send the viewer to the news item page. | |
### Media | |
In the requirements listed above you need to provide the user with the ability to upload photos. For the extra media marks you will need to expand this by: | |
1. Providing the user with the choice of uploading photos, video clips or audio clips. | |
2. Giving users the option to directly capture images, audio and video clips using the built-in camera and/or microphone if available. | |
### Data | |
There are lots of online RESTful APIs you can make use of when developing this system. You should consider: | |
1. [News API](https://newsapi.org/s/uk-news-api) | |
2. [LocationIQ](https://locationiq.com) |