[catsoop-users] CAT-SOOP Calendar Question

Madison K Landry almonds at mit.edu
Thu Dec 28 02:55:42 EST 2023


I generate the HTML rows myself with a homemade "make_table" function and remake the CSS each semester or so -- there's no in-built way AFAIK.  The function autogenerates all the <tr>, <td>, etc. elements, so I don't have to do it by hand each time and stress over the styling.  I also have a `image` function, `video` function, etc.  Other instructors might approach it differently.

Here's what I'm using this year, you can use for inspiration: <https://pastebin.com/raw/DQd94nre>.  It's not perfect by any means, it "just works" for my purposes, and I add features to it as needed.  In general for these things, you'd just print out the generated HTML from a <python> block (or @{...} shorthand syntax).

That's a stylish calendar though, kinda inspiring.  You can ask 6.100 staff how they went about it.  Looks like they have a custom grid container element (<https://introcomp.mit.edu/_static/6.100L_fa23/styles/homepage.css>) that's either from scratch or from somewhere popular that I don't know of, but it should be straightforward (although tedious) to copy over the styling yourself, since to me they just look like repeated boxes with a border-radius, some bold text, and some line breaks.

Hope this helps.

/m
________________________________
From: catsoop-users <catsoop-users-bounces at mit.edu> on behalf of Sheng Huang <shengh at mit.edu>
Sent: Wednesday, December 27, 2023 15:49
To: catsoop-users <catsoop-users at mit.edu>
Subject: [catsoop-users] CAT-SOOP Calendar Question

Thanks for answering!

Is there also example code to show how 6.100A/B/L created the calendar for the class? I was not able to find any default code.

Can you also point me in the direction of where to find how 6.100A/B/L created the calendar page? The link to their website is here: https://introcomp.mit.edu/6.100L_fa23

Thanks!

Best,
Sheng Huang

On Dec 24, 2023, at 8:48 AM, Madison K Landry <almonds at mit.edu> wrote:

That would be `csq_nsubmits` (see relevant code: <https://catsoop.org/hg/catsoop/file/tip/catsoop/__HANDLERS__/default/default.py>)

This can go in a preload.py, in a <python> block or in a particular <question> block.

Setting to `float("inf")` or `-1` allows infinite submissions.

Stay warm
/m
________________________________
From: catsoop-users <catsoop-users-bounces at mit.edu> on behalf of Sheng Huang <shengh at mit.edu>
Sent: Saturday, December 23, 2023 13:52
To: catsoop-users <catsoop-users at mit.edu>
Subject: [catsoop-users] Submission Count Question

Hello Cat-SOOP,

I have a question. Below each question there is the line that says “You have infinitely many submissions remaining.”

I have been looking through the code and can’t seem to find where I can specify how many submissions each question can be. Can you point me in the right direction? Thanks!

Best,
Sheng Huang

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.mit.edu/pipermail/catsoop-users/attachments/20231228/da2a82d6/attachment-0001.htm>


More information about the catsoop-users mailing list