I apologize if this is not allowed or too general or vague.
I am a teacher frustrated by the fact that I cannot find a pre-made Google Sheets gradebook to do what I want. I decided to try to write one myself. Of course I not great at writing script but through trial and error and trying to decipher others code I am picking it up.
What I really want to know... is it possible to do what I envision or am I wasting my time?
I want to have a list of students in column 1 and enter an assignment title, type of assignment (there are 3 with different weights) and grade for each student in subsequent columns.. and be able to display a running cumulative grade based upon weighting - I know all of this can be done. The extra part is being able to send the student and parent an email if an individual assignment grade is lower than a 70. I am pretty sure this can be done. The part I don't know is what that would look like. For instance, would there be a run script button that needs to be added for every assignment column in the spread sheet or....
I hope this makes sense and again apologize for my noobishness..
Found this:https://www.google.com/amp/s/www.groovypost.com/howto/google-sheets-send-email-based-on-cell-value/amp/
Your goal sounds doable assuming you are sending these mails from your gmail address or your org is using enterprise gmail.
Only other concern id say to watch out for is accidentally sending the emails out over and over for the same grade event.
As a student, if i recieved a recurring daily email about the same low grade assignment a month ago i might eventually spam flag the source, invalidating all that hard work.
Related
I'm trying to improve the schedule spreadsheet for the café I'm working at.
Our employees can be baristas, bartenders, or both. I made a table with checkboxes for that. That's the Employee list tab.
In the Schedule planning tab we specify which days in a given month we can come to work. Sometimes people can work both morning (AM) and afternoon (PM) shifts in the same day, but not always, so it needs to be specified too.
In the Finalized schedule tab our manager would split the shifts among employees manually, which is the most complicated and time-consuming part of the whole process. They would constantly switch between tabs, checking who can work which days and shifts, then juggle with what's available. Needless to say, there's plenty of room for error there and sometimes it's quite a mess.
I would like to automatize it a little bit. I know a little about spreadsheets, but can't figure out a few basic things here to even get started. I suppose my main issue is "connecting" several individual cells - to get a particular result only when their values correspond correctly.
I would be eternally thankful for tips on any of the following points.
(There's also going to be a calculator for hours worked in another tab, but I've already sorted that out.)
https://docs.google.com/spreadsheets/d/18W1ScIDT0e7A7esOwnTkvIVtWzoOkMPo6pfqkTVLn7E/edit#gid=1743092005
I imagine the tabs feeding into each other in the following manner:
Employee list tab would serve as the foundation for the rest of the sheet. The other two tabs would pull employee names out of it (to avoid typos and subsequent errors, especially in the hour calculator tab), as well as their roles.
In the Schedule planning tab, the only thing I have troubles with is automatically generating new sections for each employee. The sheet linked above is obviously faux, there's many more people working at our café and people often come and go, so it would definitely save time if a horizontal list of names from Employee list (B3:B) could be generated into (C1:1) of Schedule planning. Is that possible?
Other than that, what's crucial here is the date (B3:B) and shift (C2:C).
The last tab is the most complicated. This is what our manager sinks hours and hours into.
As you can see, for each day, there's up to six slots available - three per shift: one each for baristas and bartenders, and then one more in case an extra pair of hands would be needed on that particular day/shift. This extra slot can be filled out by anyone available regardless of their usual role.
Ideally, I would like to have a dynamic dropdown list in each slot that would pull data from the previous two tabs. The criteria are as follows:
Name is pulled from Employee list (B3:B).
Role is pulled from Employee list (B3:C). For example, John is a barista, so he should appear only in Barista and Support slots; Bill, on the other hand, can appear in any slot.
Date is pulled from Schedule planning (B3:B). For example, Patrick should only appear available in the March 1, 4, 6 and 9 slots (and also only in the Bartender slot, as that is his role).
Shift is pulled from Schedule planning (C2:C). For example, if we would need a barista to work in the morning on March 4, the dropdown list would contain only Cathy and Bill, as they both fill the role and are available for the AM shift on that day.
Additionally, if a person has already been selected from the dropdown list, they shouldn't appear in the other two dropdown lists for that shift, even if they satisfy all other criteria. For example, if Bill appears in D16 (Barista, March 8, AM shift), he's "taken" and can't work any other role at that moment. (In other words, the same person can only appear once on the same row. I'm not sure it can be done via dropdown lists, but perhaps color formatting would do.)
I understand it's quite a project I need help with, but I'm really stuck here and don't know where to begin. My hope is that for some of you it might also be a fun game figuring this out with me.
Thanks a lot to whoever can contribute to this in any capacity.
So I'm building an ecommerce project in Rails that uses dynamic pricing for the items - purchasing something increases the price, and when an item isn't purchased for a certain amount of time the price drops.
I could do this manually at an arbitrary but consistent time, but I would really like to run at least the checking automatically. So far the only automation libraries/tools I've found for Rails have been test related, and because this relates directly to resources in Rails, I wasn't sure it made sense to search for a way to do this in Python.
In my project, the resource is called a Purchase and has relationships to the User and Item objects. What I envision is being able to search through all Purchase objects created in the last 24 hours. Doing it the other way round (going through all Items and their associated transactions) seems like a runtime nightmare, so I assume that's not even an option.
I'd be happy to post any code that would help. Thanks!
you have after_create callback ActiveRecord where you can increase the price. How to reduce price is more complex question, you need a job to run periodically and check for all Purchases.
How to get all related resources Shannon described quite well.
Given a scenario that tests sending a message to a 3rd-party API, I can add multiple givens and outcomes to a single scenario, for each property of the message. This makes the scenario quite complex.
I can also break these out into separate scenarios. But they really are not different scenarios.
This is a scenario with multiple givens and outcomes:
Scenario 1: An order
Given an order
And that has order ID equal to 42
And that has affiliate reference equal to foo
When the conversion for the order is sent
Then the conversion has an ID equal to 42
And the conversion has an affiliate ID equal to foo
And here I have broken it up into multiple scenarios:
Scenario 1: An order with a specific order ID
Given an order that has order ID equal to 42
When the conversion for the order is sent
Then the conversion has an ID equal to 42
Scenario 2: An order with a specific affiliate reference
Given an order that has affiliate reference equal to foo
When the conversion for the order is sent
Then the conversion has an affiliate ID equal to foo
Try having a conversation with someone in the business about the order. Ask them for an example of the kind of order that has an affiliate reference.
If they naturally talk about an order with a certain ID and affiliate reference, and those two things come together, it's fine to put it in one scenario. You'll probably hear them talk about both things in the same clause, for instance:
Bus: So, when we send the order for conversion, it should have the same ID and
affiliate reference.
MvO: Can you give me an example of those? The ID and affiliate
reference?
Bus: Sure, an ID is a simple integer, so, 42, and the affiliate
reference is the name of our affiliate, so something like 'Foo'.
(By the way, use realistic affiliate names if you can - it makes it easier for the business to spot if you've missed something!)
When we convert this to Gherkin, keeping the language as natural as possible (I wrote a blog post on this), we get something like:
Given an order with ID 42 and affiliate reference "foo"
When we send the order for conversion
Then the conversion should have the same ID and affiliate reference.
If, however, there are some orders which don't have affiliate references, or retaining the affiliate reference is a completely separate capability and the business talk about it separately, probably you want two scenarios.
Note there are some other benefits to talking to your business representatives!
First, they'll probably phrase the "when" in the active voice (we send the order) rather than the passive (the order is sent) which makes it much easier to see who's doing what. This is especially important in scenarios with multiple roles, and helps us think about who or what triggers the outcome. (Here's a blog post about tenses and voices in BDD.)
Second, you get a chance to question them! "Are there any orders which don't have affiliate references? Do all orders have IDs like that, or do you have some old orders with old-style IDs floating around in the system?" And so forth. If you can't think of questions to ask easily, bring a tester with you. Testers are great at thinking of questions to ask. (I wrote a blog post on this, too.)
Third, you're more likely to carry the same language the business use into the code, so it's going to be easier to maintain, and you'll be able to have conversations about it more easily too.
If your business aren't actually interested in conversations around what the API does then don't use Gherkin-based tools for the API tests. You can maintain a little DSL in plain old XUnit much more easily than in English.
To cover your question more generically: yes, it's fine to have multiple givens and outcomes in a scenario. I generally reckon that once you've got more than seven steps, you want to be splitting it into separate scenarios.
Make sure you have conversations around the scenarios, though, because a lot of these problems go away when you do.
I have a products model and an iTunes sales model. At the moment i'm fairly successfully reporting sales through scopes and ordered hashes. One flaw in the approach i've taken is that if there's no sales for a particular date I don't get a zero entry, just a gap for that date, which proves to be an issue when using something like Highcharts to plot the results.
I'm also soon to add new models for sales data from other sources, which will mean a rewrite to pull these figures into the product view and with my current approach I can see this being a complete headache when one report contains sales for a date but another doesn't.
I'm thinking I should instead for any given product be producing a range of dates (last 30 days for example) and then for those dates bring in the associated sales from my iTunes and other sales models. I'm just not sure how to approach this or if this is even the best approach to take.
Does anyone have experience of building something similar that can offer some guidance here please?
Thanks in advance!
It might not be the "right way" but you could always through a date lookup table in your DB and left join on it. That way you can be sure you have all the dates in the period of question present in your query results regardless of whether they have data.
We run an affiliate program. Users who sign up can gain points when they successfully recruit other users. However, spammers are abusing this program, and automatically signing up large numbers of accounts. We want to prevent this from happening by closing down clearly machine-generated accounts. My idea for this is to write a program to identify machine-generated account names, or at least select a subset for manual inspection.
So far, we have found that there are two types of abnormal ids:
The first one is that there are some ids looks very similar to others, such as:
wss12345
wss12346
wss12347
test1
test2
...
The second one is that there are some ids looks like randomly generated with out rules, such as:
MiDjiSxxiDekiE
NiMjKhJixLy
DAFDAB7643
...
For the first one, I use the Levenshtein(edit) distance. This method can find out some ids, which was illustrate in type 1. (I have done this, and can get good performance)
For the second one, I can calculate the probabilty for the ids, just like:
id = "DAFDAB7643:
p(id) = p(D)*p(A|D)*p(F|A)*p(D|F)*...*p(3|4)
So I can use the probability to filter out the abnormal ids. (Just an idea; I haven't tried it out.)
Can anyone give me other suggestions about this topic? How else could I approach this problem? Can you see flaws or omissions in my attempts?
Assuming that these new accounts refer back to the the recruiter's ID, I'd look at the rate and/or sheer number of new accounts associated with a given recruiter.
Some analysis on IP addresses or similar may also indicate if multiple users are coming from the same computer.
I'd use a dictionary of words, and kind of do the reverse of detecting poor passwords -- human user names should have dictionary words, personal names, lack punctuation, not include repeated characters, be mostly lower case etc.
Sort of going back to 1. above -- if a recruiter has an anamalously tight cluster of IDs, using the features you've already identified, would be a good flag. I think that this might be, essentially, #larsmans comment directly under the question.
I'd be curious to know if re-purposing password checking algorithms (item 3) provides any benefit.
You're not telling us what sort of site you are running, so this is a bit on the speculative side; but consider Stack Overflow as a prime example of successfully promoting good behavior through the use of a user reputation system, and weeding out many kinds of unwanted behaviors.
A quick, hackish fix might be to progressively deduct from the score when the amount of dormant recruit accounts grows larger, but a more rewarding and compelling fix is to award higher reputation scores for actually contributing to the site's content. However, this depends on the type of site you have; a stock market tips site, say, obviously works quite differently from a techical discussion forum.