Skip to content

Conversation

@Alex-Jordan
Copy link
Contributor

This adds a new variable to site.conf, $hide_new_courses. With this PR, unarchiving a course and keeping its old name, you get a course with its hidden status unchanged. But for unarchiving a course with a new name or making a completely new course, this variable controls whether or not it will be born hidden. More specifically:

If it is false (the distribution default):

  • new courses from "Add Courses" do not have the hide_directory file (no change)
  • new courses that are unarchived with their original name have or don't have hide_directory as they were when archived (no change)
  • new courses that are unarchived with a new name get hide_directory removed, if it is present (this is a change)

If it is true:

  • new courses from "Add Courses" get hide_directory file and this are born hidden (this is a change)
  • new courses that are unarchived with their original name have or don't have hide_directory as they were when archived (no change)
  • new courses that are unarchived with a new name get hide_directory added, if not already present (this is a change)

This will be useful for Runestone, where we always hide all courses (except the demonstration courses). Up to now, I have to manually hide each course after its creation.

This is also helpful for my regular PCC server. Our practice is to leave the prior term's courses open, but hidden. Then they get archived and closed two terms after the course ended. So later, if an instructor wants a new course that is a clone of the old course, we unarchive their old course with a new name (that includes the current term). But without this PR, the new course is born hidden when we don't want it that way.

@drgrice1
Copy link
Member

I don't agree with the change to behavior when $hide_new_courses is false, and a new course is unarchived with a new name. I frequently unarchive courses to a new name that were hidden, and want the unarchived course to still be hidden. (In fact, I don't want any courses visible on my server ever.)

Instead of creating a new course environment option, why not add a checkbox to the add course and unarchive course pages to control this?

@Alex-Jordan
Copy link
Contributor Author

Alex-Jordan commented Jan 11, 2024 via email

@drgrice1
Copy link
Member

Yeah, I suppose that works.

@drgrice1
Copy link
Member

Although as you pointed out setting $hide_new_courses to true works for my purposes, in thinking about this more, I still think there should be an option that fully preserves the current behavior (and it probably should be the default).

There are cases where the current behavior makes sense. For example, suppose that at some institution some courses are hidden (perhaps because they are meant to be accessed via LTI authentication which is my reason for hiding courses), and others that are not (perhaps these don't use LTI authentication). If this institution does not use the scheme that you describe that you use at PCC, and when a course is unarchived with a new name it should have the same hidden/unhidden status that it had when archived, then the new options don't cover this case.

So how about instead of making the $hide_new_courses purely boolean, make it have three possible values (maybe 'off', 'smart', and 'always'?) where 'off' is the current behavior, 'smart' is what false does with this pull request, and 'always' is what true does with this pull request. Those may not be the best value names, but are offered to describe the idea.

Alternately, consider the checkbox approach maybe?

@Alex-Jordan
Copy link
Contributor Author

I was thinking about the trinary option too this morning after the earlier messages. I'll go ahead and do that sometime soon. I think I am avoiding the checkboxes because I foresee myself having to check the box a lot. Runestone would have (almost) all courses hidden, and my PCC server would have new courses not be hidden. So one way or the other, I'd be checking that box over and over again.

@Alex-Jordan
Copy link
Contributor Author

Now the variable is named $new_courses_hidden_status. It can be 'hidden', 'visible', or anything else (including unset) for the three behaviors. The comments in site.conf.dist hopefully explain it well.

BTW, with this and the custom admin course name PR (#2295), there are new types of things in the config files: config options that affect how the admin course behaves. I put these things in site.conf. Does that seem correct? As opposed to defaults.config with an option to override using localOverrides.conf?

Copy link
Member

@drgrice1 drgrice1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good.

I think that setting this (and the custom admin course name in #2295) in site.conf is the correct place for this.

Copy link
Member

@pstaabp pstaabp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

@pstaabp pstaabp merged commit ce06f20 into openwebwork:develop Feb 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants