A document from MCS 275 Spring 2024, instructor Emily Dumas. You can also get the notebook file.

MCS 275 Spring 2024 Homework 13

  • Course Instructor: Emily Dumas

Deadline

This homework assignment must be submitted in Gradescope by Noon central time on Tuesday April 16, 2024.

After this assignment, there is just one more homework in MCS 275! (But don't forget about Project 4.)

Collaboration

Collaboration is prohibited, and while working on this you should only consult the resources (books, online, etc.) listed below.

Content

This assignment corresponds to Worksheet 13 and is the second one devoted to Flask web applications. Like Worksheet 13 it focuses on adding features to the sample web application from lecture.

Resources you may consult

The materials you may refer to for this homework are:

Point distribution

This homework assignment has a single problem. The grading breakdown is:

Points Item
4 Autograder syntax checks (problem 1)
10 Problem 2
14 Total

What to do if you're stuck

Ask your instructor or TA a question by email, in office hours, or on discord.

Advisory note

To work on this assignment you need to have:

  • Flask, and
  • A working local copy of either ActiveTask or TaskGain (links below)

Web application downloads

You probably have the sample web application from when you worked on Worksheet 13. As long as that version works, you don't need to download anything. But in case you want a fresh unmodified copy, here are the same links to the ZIP files given on that worksheet:

And here are versions that have the solutions to worksheet 13 incorporated into them:

2. Troubled task audit

In the task tracking application, let's define two types of "troubled" tasks:

  1. A stale task is one that is in the "waiting" state and where the creation time is at least one week ago.

  2. A long-running task is one that is the "in progress" state and where the last update time is at least one week ago.

The idea behind these definitions is that both types of tasks might require additional attention or action---stale tasks have been waiting for a long time and may have been forgotten, while long-running tasks may have hit some kind of obstacle preventing progress.

Add a feature to the task tracking web app so that accessing the URL localhost:5000/audit/troubled/ will show a page with the application logo/header, followed by a list of stale tasks, followed by a list of long-running tasks. Each list should have a header (h2) above it indicating what it shows. For each task in either list, the description, task id, state, and owner should be shown. The new page should use the same CSS stylesheet as the rest of the application.

The modifications should consist of

  • One function added to taskgain.py or activetask.py
  • One HTML template added to the templates/ subdirectory, which I recommend calling troubled_task_audit.html.

Test your work but once it is working, do not submit the entire application. Instead, copy and paste just the function you added to the python script into a new file called hwk13.py, and put the required header at the top of that file. Then submit two files:hwk13.py and your new HTML template troubled_task_audit.html.

Revision history

  • 2024-04-11 Initial publication